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:
@ -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;
|
||||
|
Reference in New Issue
Block a user