mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
merge
sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged
This commit is contained in:
commit
c9fa9615a3
4 changed files with 52 additions and 5 deletions
|
|
@ -1020,3 +1020,13 @@ select * from t1 where 'f' > any (select s1 from t1);
|
|||
select * from t1 where 'f' > any (select s1 from t1 union select s1 from t1);
|
||||
explain select * from t1 where 'f' > any (select s1 from t1 union select s1 from t1);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# filesort in subquery (restoring join_tab)
|
||||
#
|
||||
CREATE TABLE t1 (number char(11) NOT NULL default '') TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874');
|
||||
CREATE TABLE t2 (code char(5) NOT NULL default '',UNIQUE KEY code (code)) TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t2 VALUES ('1'),('1226'),('1245'),('1862'),('18623'),('1874'),('1967'),('6');
|
||||
select c.number as phone,(select p.code from t2 p where c.number like concat(p.code, '%') order by length(p.code) desc limit 1) as code from t1 c;
|
||||
drop table t1, t2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue