Already approved bug fix for #1561.
Bug happens in INTERVAL function when number of compared arguments is 8 or more.
This commit is contained in:
parent
7cd80807ec
commit
35b8a0cde9
@ -50,3 +50,9 @@ id elt(two.val,'one','two')
|
|||||||
2 one
|
2 one
|
||||||
4 two
|
4 two
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56);
|
||||||
|
INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56)
|
||||||
|
1
|
||||||
|
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56, 77);
|
||||||
|
INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56, 77)
|
||||||
|
1
|
||||||
|
@ -35,3 +35,8 @@ insert into t2 values (1,1),(2,1),(3,1),(4,2);
|
|||||||
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
|
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
|
||||||
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
|
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
# some more INTERVAL tests
|
||||||
|
|
||||||
|
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56);
|
||||||
|
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56, 77);
|
||||||
|
@ -603,7 +603,7 @@ longlong Item_func_interval::val_int()
|
|||||||
if (intervals)
|
if (intervals)
|
||||||
{ // Use binary search to find interval
|
{ // Use binary search to find interval
|
||||||
uint start,end;
|
uint start,end;
|
||||||
start= 1;
|
start= 0;
|
||||||
end= row->cols()-2;
|
end= row->cols()-2;
|
||||||
while (start != end)
|
while (start != end)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user