[Maria-developers] Rev 2781: Merge in file:///home/psergey/dev/maria-5.3-subqueries-r10/
At file:///home/psergey/dev/maria-5.3-subqueries-r10/ ------------------------------------------------------------ revno: 2781 [merge] revision-id: psergey@askmonty.org-20100320120844-n8dvu5loib2fjvwl parent: psergey@askmonty.org-20100320120147-bbjquol551u9u8sq parent: timour@askmonty.org-20100315224130-321rym1lsuwz2j5z committer: Sergey Petrunya <psergey@askmonty.org> branch nick: maria-5.3-subqueries-r10 timestamp: Sat 2010-03-20 15:08:44 +0300 message: Merge modified: mysql-test/suite/pbxt/r/subselect.result subselect.result-20090402100035-4ilk9i91sh65vjcb-146 mysql-test/suite/pbxt/t/subselect.test subselect.test-20090402100035-4ilk9i91sh65vjcb-313 === modified file 'mysql-test/suite/pbxt/r/subselect.result' --- a/mysql-test/suite/pbxt/r/subselect.result 2010-03-20 12:01:47 +0000 +++ b/mysql-test/suite/pbxt/r/subselect.result 2010-03-20 12:08:44 +0000 @@ -876,6 +876,8 @@ 4.5 NULL drop table t1; +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; CREATE TABLE t1 (a int(11) NOT NULL default '0', PRIMARY KEY (a)); CREATE TABLE t2 (a int(11) default '0', INDEX (a)); INSERT INTO t1 VALUES (1),(2),(3),(4); @@ -1771,6 +1773,7 @@ Warnings: Note 1003 select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`) drop table t1,t2; +set @@optimizer_switch=@save_optimizer_switch; create table t1 (a int); insert into t1 values (1); explain select benchmark(1000, (select a from t1 where a=sha(rand()))); @@ -2750,6 +2753,8 @@ max(fld) 1 drop table t1; +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; CREATE TABLE t1 (one int, two int, flag char(1)); CREATE TABLE t2 (one int, two int, flag char(1)); INSERT INTO t1 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N'); @@ -2834,6 +2839,7 @@ Warnings: Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where (`test`.`t2`.`flag` = '0') group by `test`.`t2`.`one`,`test`.`t2`.`two` having (trigcond(((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`))) and trigcond(((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))) and trigcond(<is_not_null_test>(`test`.`t2`.`one`)) and trigcond(<is_not_null_test>(`test`.`t2`.`two`))))) AS `test` from `test`.`t1` DROP TABLE t1,t2; +set @@optimizer_switch=@save_optimizer_switch; CREATE TABLE t1 (a char(5), b char(5)); INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa'); SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb')); @@ -3004,6 +3010,8 @@ 1 1 1 3 DROP TABLE t1, t2; +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; CREATE TABLE t1(a int, INDEX (a)); INSERT INTO t1 VALUES (1), (3), (5), (7); INSERT INTO t1 VALUES (NULL); @@ -3019,6 +3027,7 @@ 2 NULL 3 1 DROP TABLE t1,t2; +set @@optimizer_switch=@save_optimizer_switch; CREATE TABLE t1 (a DATETIME); INSERT INTO t1 VALUES ('1998-09-23'), ('2003-03-25'); CREATE TABLE t2 AS SELECT === modified file 'mysql-test/suite/pbxt/t/subselect.test' --- a/mysql-test/suite/pbxt/t/subselect.test 2009-11-24 10:19:08 +0000 +++ b/mysql-test/suite/pbxt/t/subselect.test 2010-03-20 12:08:44 +0000 @@ -477,6 +477,9 @@ # Null with keys # +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; + CREATE TABLE t1 (a int(11) NOT NULL default '0', PRIMARY KEY (a)); CREATE TABLE t2 (a int(11) default '0', INDEX (a)); INSERT INTO t1 VALUES (1),(2),(3),(4); @@ -1121,6 +1124,8 @@ explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id); drop table t1,t2; +set @@optimizer_switch=@save_optimizer_switch; + # # Static tables & rund() in subqueries # @@ -1784,6 +1789,9 @@ # Bug #11867: queries with ROW(,elems>) IN (SELECT DISTINCT <cols> FROM ...) # +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; + CREATE TABLE t1 (one int, two int, flag char(1)); CREATE TABLE t2 (one int, two int, flag char(1)); INSERT INTO t1 VALUES(1,2,'Y'),(2,3,'Y'),(3,4,'Y'),(5,6,'N'),(7,8,'N'); @@ -1811,6 +1819,9 @@ explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1; DROP TABLE t1,t2; +set @@optimizer_switch=@save_optimizer_switch; + + # # Bug #12392: where cond with IN predicate for rows and NULL values in table # @@ -1972,6 +1983,9 @@ # with possible NULL values by index access from the outer query # +set @save_optimizer_switch=@@optimizer_switch; +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=off"; + CREATE TABLE t1(a int, INDEX (a)); INSERT INTO t1 VALUES (1), (3), (5), (7); INSERT INTO t1 VALUES (NULL); @@ -1984,6 +1998,8 @@ DROP TABLE t1,t2; +set @@optimizer_switch=@save_optimizer_switch; + # # Bug #11302: getObject() returns a String for a sub-query of type datetime # @@ -3096,6 +3112,7 @@ DROP TABLE t1,t2; + # # Bug #32400: Complex SELECT query returns correct result only on some # occasions
participants (1)
-
Sergey Petrunya