more order by fixes

parent e5483ab3
...@@ -115,15 +115,15 @@ execute stmt1 using @arg00; ...@@ -115,15 +115,15 @@ execute stmt1 using @arg00;
# variations on 'group_concat' # variations on 'group_concat'
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
# #
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
...@@ -223,7 +223,7 @@ execute stmt1 using @arg00, @arg01; ...@@ -223,7 +223,7 @@ execute stmt1 using @arg00, @arg01;
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
# parameter in LIKE # parameter in LIKE
prepare stmt1 from ' select b FROM t1 where b like ? '; prepare stmt1 from ' select b FROM t1 where b like ? ';
......
...@@ -192,23 +192,23 @@ a concat(b,?) ...@@ -192,23 +192,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -319,7 +319,7 @@ a ...@@ -319,7 +319,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
......
...@@ -192,23 +192,23 @@ a concat(b,?) ...@@ -192,23 +192,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -319,7 +319,7 @@ a ...@@ -319,7 +319,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
......
...@@ -193,23 +193,23 @@ a concat(b,?) ...@@ -193,23 +193,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -320,7 +320,7 @@ a ...@@ -320,7 +320,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
......
...@@ -235,23 +235,23 @@ a concat(b,?) ...@@ -235,23 +235,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -362,7 +362,7 @@ a ...@@ -362,7 +362,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
...@@ -3243,23 +3243,23 @@ a concat(b,?) ...@@ -3243,23 +3243,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -3370,7 +3370,7 @@ a ...@@ -3370,7 +3370,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
......
...@@ -192,23 +192,23 @@ a concat(b,?) ...@@ -192,23 +192,23 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLone,MySQLtwo,MySQLthree,MySQLfour MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
oneMySQL,twoMySQL,threeMySQL,fourMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
...@@ -319,7 +319,7 @@ a ...@@ -319,7 +319,7 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
one one
......
...@@ -193,24 +193,24 @@ a concat(b,?) ...@@ -193,24 +193,24 @@ a concat(b,?)
3 threeMySQL 3 threeMySQL
4 fourMySQL 4 fourMySQL
set @arg00='MySQL' ; set @arg00='MySQL' ;
select group_concat(@arg00,b) from t1 select group_concat(@arg00,b order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(@arg00,b) group_concat(@arg00,b order by a)
MySQLtwo,MySQLfour,MySQLthree,MySQLone MySQLone,MySQLtwo,MySQLthree,MySQLfour
prepare stmt1 from ' select group_concat(?,b) from t1 prepare stmt1 from ' select group_concat(?,b order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(?,b) group_concat(?,b order by a)
MySQLtwo,MySQLfour,MySQLthree,MySQLone MySQLone,MySQLtwo,MySQLthree,MySQLfour
select group_concat(b,@arg00) from t1 select group_concat(b,@arg00 order by a) from t1
group by 'a' ; group by 'a' ;
group_concat(b,@arg00) group_concat(b,@arg00 order by a)
twoMySQL,fourMySQL,threeMySQL,oneMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
prepare stmt1 from ' select group_concat(b,?) from t1 prepare stmt1 from ' select group_concat(b,? order by a) from t1
group by ''a'' ' ; group by ''a'' ' ;
execute stmt1 using @arg00; execute stmt1 using @arg00;
group_concat(b,?) group_concat(b,? order by a)
twoMySQL,fourMySQL,threeMySQL,oneMySQL oneMySQL,twoMySQL,threeMySQL,fourMySQL
set @arg00='first' ; set @arg00='first' ;
set @arg01='second' ; set @arg01='second' ;
set @arg02=NULL; set @arg02=NULL;
...@@ -320,11 +320,11 @@ a ...@@ -320,11 +320,11 @@ a
set @arg00= 'one' ; set @arg00= 'one' ;
set @arg01= 'two' ; set @arg01= 'two' ;
set @arg02= 'five' ; set @arg02= 'five' ;
prepare stmt1 from ' select b FROM t1 where b in (?,?,?) ' ; prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ;
execute stmt1 using @arg00, @arg01, @arg02 ; execute stmt1 using @arg00, @arg01, @arg02 ;
b b
two
one one
two
prepare stmt1 from ' select b FROM t1 where b like ? '; prepare stmt1 from ' select b FROM t1 where b like ? ';
set @arg00='two' ; set @arg00='two' ;
execute stmt1 using @arg00 ; execute stmt1 using @arg00 ;
...@@ -1334,7 +1334,7 @@ prepare stmt1 from 'update t1 set a=? where b=? ...@@ -1334,7 +1334,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
affected rows: 0 affected rows: 0
info: Rows matched: 0 Changed: 0 Warnings: 0 info: Rows matched: 0 Changed: 0 Warnings: 0
select a,b from t1 order by a; select a,b from t1 order by a ;
a b a b
1 one 1 one
2 two 2 two
......
...@@ -177,7 +177,7 @@ prepare stmt1 from 'update t1 set a=? where b=? ...@@ -177,7 +177,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
--enable_info --enable_info
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
--disable_info --disable_info
select a,b from t1 order by a; select a,b from t1 order by a ;
drop table t2 ; drop table t2 ;
## update with parameters in limit ## update with parameters in limit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment