1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for the bug #3089: SUBSTRING bug when mixed with CONCAT and ORDER BY

This commit is contained in:
ram@gw.mysql.r18.ru
2004-03-09 16:52:37 +04:00
parent 6a10859bee
commit 8ffd9a9190
3 changed files with 24 additions and 1 deletions

View File

@ -624,3 +624,13 @@ Note 1003 select high_priority md5(_latin1'hello') AS `md5('hello')`,sha(_latin1
SELECT lpad(12345, 5, "#");
lpad(12345, 5, "#")
12345
create table t1 (id int(1), str varchar(10)) DEFAULT CHARSET=utf8;
insert into t1 values (1,'aaaaaaaaaa'), (2,'bbbbbbbbbb');
create table t2 (id int(1), str varchar(10)) DEFAULT CHARSET=utf8;
insert into t2 values (1,'cccccccccc'), (2,'dddddddddd');
select substring(concat(t1.str, t2.str), 1, 15) "name" from t1, t2
where t2.id=t1.id order by name;
name
aaaaaaaaaaccccc
bbbbbbbbbbddddd
drop table t1, t2;