Loading mysql-test/r/order_by.result +13 −0 Original line number Diff line number Diff line Loading @@ -723,3 +723,16 @@ col2 col col 2 2 2 1 3 3 drop table t1, t2; create table t1 (a char(25)); insert into t1 set a = repeat('x', 20); insert into t1 set a = concat(repeat('x', 19), 'z'); insert into t1 set a = concat(repeat('x', 19), 'ab'); insert into t1 set a = concat(repeat('x', 19), 'aa'); set max_sort_length=20; select a from t1 order by a; a xxxxxxxxxxxxxxxxxxxab xxxxxxxxxxxxxxxxxxxaa xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxz drop table t1; mysql-test/t/order_by.test +13 −0 Original line number Diff line number Diff line Loading @@ -486,3 +486,16 @@ select t2.col2 as col, t2.col from t2 order by t2.col; select t2.col2, t2.col, t2.col from t2 order by t2.col; drop table t1, t2; # # Bug #5428: a problem with small max_sort_length value # create table t1 (a char(25)); insert into t1 set a = repeat('x', 20); insert into t1 set a = concat(repeat('x', 19), 'z'); insert into t1 set a = concat(repeat('x', 19), 'ab'); insert into t1 set a = concat(repeat('x', 19), 'aa'); set max_sort_length=20; select a from t1 order by a; drop table t1; strings/ctype-simple.c +1 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,7 @@ int my_strnxfrm_simple(CHARSET_INFO * cs, const uchar *src, uint srclen) { uchar *map= cs->sort_order; DBUG_ASSERT(len >= srclen); len= min(len,srclen); set_if_smaller(len, srclen); if (dest != src) { const uchar *end; Loading Loading
mysql-test/r/order_by.result +13 −0 Original line number Diff line number Diff line Loading @@ -723,3 +723,16 @@ col2 col col 2 2 2 1 3 3 drop table t1, t2; create table t1 (a char(25)); insert into t1 set a = repeat('x', 20); insert into t1 set a = concat(repeat('x', 19), 'z'); insert into t1 set a = concat(repeat('x', 19), 'ab'); insert into t1 set a = concat(repeat('x', 19), 'aa'); set max_sort_length=20; select a from t1 order by a; a xxxxxxxxxxxxxxxxxxxab xxxxxxxxxxxxxxxxxxxaa xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxz drop table t1;
mysql-test/t/order_by.test +13 −0 Original line number Diff line number Diff line Loading @@ -486,3 +486,16 @@ select t2.col2 as col, t2.col from t2 order by t2.col; select t2.col2, t2.col, t2.col from t2 order by t2.col; drop table t1, t2; # # Bug #5428: a problem with small max_sort_length value # create table t1 (a char(25)); insert into t1 set a = repeat('x', 20); insert into t1 set a = concat(repeat('x', 19), 'z'); insert into t1 set a = concat(repeat('x', 19), 'ab'); insert into t1 set a = concat(repeat('x', 19), 'aa'); set max_sort_length=20; select a from t1 order by a; drop table t1;
strings/ctype-simple.c +1 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,7 @@ int my_strnxfrm_simple(CHARSET_INFO * cs, const uchar *src, uint srclen) { uchar *map= cs->sort_order; DBUG_ASSERT(len >= srclen); len= min(len,srclen); set_if_smaller(len, srclen); if (dest != src) { const uchar *end; Loading