List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:November 20 2009 2:21pm
Subject:bzr commit into mysql-6.0-codebase-bugfixing branch (kostja:3720)
View as plain text  
#At file:///opt/local/work/6.0-codebase/ based on revid:kostja@stripped

 3720 Konstantin Osipov	2009-11-20 [merge]
      Merge with 6.0-codebase.

    modified:
      mysql-test/r/subselect.result
      mysql-test/r/subselect_no_mat.result
      mysql-test/r/subselect_no_opts.result
      mysql-test/r/subselect_no_semijoin.result
      mysql-test/r/subselect_sj.result
      mysql-test/r/subselect_sj_jcl6.result
      mysql-test/r/union.result
      mysql-test/t/subselect.test
      mysql-test/t/subselect_sj.test
      mysql-test/t/union.test
      sql/sql_insert.cc
=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2009-11-09 10:27:46 +0000
+++ b/mysql-test/r/subselect.result	2009-11-20 09:16:27 +0000
@@ -4718,6 +4718,9 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 a	incorrect
 1	1
 DROP TABLE t1,t2,t3;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);
 CREATE TABLE t2( a INT, b INT );

=== modified file 'mysql-test/r/subselect_no_mat.result'
--- a/mysql-test/r/subselect_no_mat.result	2009-11-03 18:09:53 +0000
+++ b/mysql-test/r/subselect_no_mat.result	2009-11-20 09:16:27 +0000
@@ -4722,6 +4722,9 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 a	incorrect
 1	1
 DROP TABLE t1,t2,t3;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);
 CREATE TABLE t2( a INT, b INT );

=== modified file 'mysql-test/r/subselect_no_opts.result'
--- a/mysql-test/r/subselect_no_opts.result	2009-11-03 18:09:53 +0000
+++ b/mysql-test/r/subselect_no_opts.result	2009-11-20 09:16:27 +0000
@@ -4722,6 +4722,9 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 a	incorrect
 1	1
 DROP TABLE t1,t2,t3;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);
 CREATE TABLE t2( a INT, b INT );

=== modified file 'mysql-test/r/subselect_no_semijoin.result'
--- a/mysql-test/r/subselect_no_semijoin.result	2009-11-03 18:09:53 +0000
+++ b/mysql-test/r/subselect_no_semijoin.result	2009-11-20 09:16:27 +0000
@@ -4722,6 +4722,9 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 a	incorrect
 1	1
 DROP TABLE t1,t2,t3;
+#
+# Bug#33204: INTO is allowed in subselect, causing inconsistent results
+#
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);
 CREATE TABLE t2( a INT, b INT );

=== modified file 'mysql-test/r/subselect_sj.result'
--- a/mysql-test/r/subselect_sj.result	2009-11-17 10:12:07 +0000
+++ b/mysql-test/r/subselect_sj.result	2009-11-20 11:48:50 +0000
@@ -463,3 +463,40 @@ int_key
 7
 DROP TABLE t0, t1, t2;
 # End of bug#46550
+
+Bug#46797 "Crash in fix_semijoin_strategies_for_picked_join_order 
+with semijoin=on"
+
+CREATE TABLE t1 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+);
+CREATE TABLE t2 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+);
+INSERT INTO t2 VALUES
+(NULL),(NULL),(NULL),(NULL),('a'),('a'),('a'),('b'),('b'),('b'),('b'),('c'),
+('c'),('c'),('c'),('c'),('c'),('c'),('d'),('d'),('d'),('d'),('d'),('d'),('e'),
+('e'),('e'),('e'),('e'),('e'),('f'),('f'),('f'),('g'),('g'),('h'),('h'),('h'),
+('h'),('i'),('j'),('j'),('j'),('k'),('k'),('l'),('l'),('m'),('m'),('m'),('m'),
+('n'),('n'),('n'),('o'),('o'),('o'),('p'),('p'),('p'),('q'),('q'),('q'),('r'),
+('r'),('r'),('r'),('s'),('s'),('s'),('s'),('t'),('t'),('t'),('t'),('u'),('u'),
+('u'),('u'),('v'),('v'),('v'),('v'),('w'),('w'),('w'),('w'),('w'),('w'),('x'),
+('x'),('x'),('y'),('y'),('y'),('y'),('z'),('z'),('z'),('z');
+CREATE TABLE t3 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t3 VALUES
+(NULL),('c'),('d'),('e'),('f'),('h'),('j'),('k'),('k'),('m'),('m'),('m'),
+('n'),('o'),('r'),('t'),('t'),('u'),('w'),('y');
+SELECT varchar_key FROM t3 
+WHERE (SELECT varchar_key FROM t3 
+WHERE (varchar_key,varchar_key) 
+IN (SELECT t1.varchar_key, t2 .varchar_key 
+FROM t1 RIGHT JOIN t2 ON t1.varchar_key  
+)  
+);
+varchar_key
+DROP TABLE t1, t2, t3;

=== modified file 'mysql-test/r/subselect_sj_jcl6.result'
--- a/mysql-test/r/subselect_sj_jcl6.result	2009-11-17 10:12:07 +0000
+++ b/mysql-test/r/subselect_sj_jcl6.result	2009-11-20 11:48:50 +0000
@@ -467,6 +467,43 @@ int_key
 7
 DROP TABLE t0, t1, t2;
 # End of bug#46550
+
+Bug#46797 "Crash in fix_semijoin_strategies_for_picked_join_order 
+with semijoin=on"
+
+CREATE TABLE t1 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+);
+CREATE TABLE t2 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+);
+INSERT INTO t2 VALUES
+(NULL),(NULL),(NULL),(NULL),('a'),('a'),('a'),('b'),('b'),('b'),('b'),('c'),
+('c'),('c'),('c'),('c'),('c'),('c'),('d'),('d'),('d'),('d'),('d'),('d'),('e'),
+('e'),('e'),('e'),('e'),('e'),('f'),('f'),('f'),('g'),('g'),('h'),('h'),('h'),
+('h'),('i'),('j'),('j'),('j'),('k'),('k'),('l'),('l'),('m'),('m'),('m'),('m'),
+('n'),('n'),('n'),('o'),('o'),('o'),('p'),('p'),('p'),('q'),('q'),('q'),('r'),
+('r'),('r'),('r'),('s'),('s'),('s'),('s'),('t'),('t'),('t'),('t'),('u'),('u'),
+('u'),('u'),('v'),('v'),('v'),('v'),('w'),('w'),('w'),('w'),('w'),('w'),('x'),
+('x'),('x'),('y'),('y'),('y'),('y'),('z'),('z'),('z'),('z');
+CREATE TABLE t3 (
+varchar_key varchar(1) DEFAULT NULL,
+KEY varchar_key (varchar_key)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t3 VALUES
+(NULL),('c'),('d'),('e'),('f'),('h'),('j'),('k'),('k'),('m'),('m'),('m'),
+('n'),('o'),('r'),('t'),('t'),('u'),('w'),('y');
+SELECT varchar_key FROM t3 
+WHERE (SELECT varchar_key FROM t3 
+WHERE (varchar_key,varchar_key) 
+IN (SELECT t1.varchar_key, t2 .varchar_key 
+FROM t1 RIGHT JOIN t2 ON t1.varchar_key  
+)  
+);
+varchar_key
+DROP TABLE t1, t2, t3;
 set join_cache_level=default;
 show variables like 'join_cache_level';
 Variable_name	Value

=== modified file 'mysql-test/r/union.result'
--- a/mysql-test/r/union.result	2009-05-15 07:27:27 +0000
+++ b/mysql-test/r/union.result	2009-11-20 09:16:27 +0000
@@ -1546,8 +1546,13 @@ Warnings:
 Note	1003	select '0' AS `a` from `test`.`t1` union select '0' AS `a` from `test`.`t1` order by `a`
 DROP TABLE t1;
 End of 5.0 tests
+#
+# Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take 
+# subselects into account
+#
 CREATE TABLE t1 (a INT);
 INSERT INTO t1 VALUES (1);
+# Tests fix in parser rule select_derived_union.
 SELECT a INTO @v FROM (
 SELECT a FROM t1
 UNION
@@ -1572,6 +1577,7 @@ SELECT a INTO OUTFILE 'union.out.file7' 
 ERROR HY000: Incorrect usage of UNION and INTO
 SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
 ERROR HY000: Incorrect usage of UNION and INTO
+# Tests fix in parser rule query_expression_body.
 SELECT ( SELECT a UNION SELECT a ) INTO @v FROM t1;
 SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE  'union.out.file3' FROM t1;
 SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1;

=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test	2009-11-09 10:27:46 +0000
+++ b/mysql-test/t/subselect.test	2009-11-20 09:16:27 +0000
@@ -3686,9 +3686,9 @@ SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.
 
 DROP TABLE t1,t2,t3;
 
-#
-# Bug#33204 INTO is allowed in subselect, causing inconsistent results
-#
+-- echo #
+-- echo # Bug#33204: INTO is allowed in subselect, causing inconsistent results
+-- echo #
 CREATE TABLE t1( a INT );
 INSERT INTO t1 VALUES (1),(2);
 

=== modified file 'mysql-test/t/subselect_sj.test'
--- a/mysql-test/t/subselect_sj.test	2009-11-17 10:12:07 +0000
+++ b/mysql-test/t/subselect_sj.test	2009-11-20 11:48:50 +0000
@@ -357,3 +357,44 @@ WHERE t0.varchar_nokey  IN (  
 DROP TABLE t0, t1, t2;
 
 --echo # End of bug#46550
+
+--echo
+--echo Bug#46797 "Crash in fix_semijoin_strategies_for_picked_join_order 
+--echo with semijoin=on"
+--echo
+CREATE TABLE t1 (
+  varchar_key varchar(1) DEFAULT NULL,
+  KEY varchar_key (varchar_key)
+);
+
+CREATE TABLE t2 (
+  varchar_key varchar(1) DEFAULT NULL,
+  KEY varchar_key (varchar_key)
+);
+INSERT INTO t2 VALUES
+  (NULL),(NULL),(NULL),(NULL),('a'),('a'),('a'),('b'),('b'),('b'),('b'),('c'),
+  ('c'),('c'),('c'),('c'),('c'),('c'),('d'),('d'),('d'),('d'),('d'),('d'),('e'),
+  ('e'),('e'),('e'),('e'),('e'),('f'),('f'),('f'),('g'),('g'),('h'),('h'),('h'),
+  ('h'),('i'),('j'),('j'),('j'),('k'),('k'),('l'),('l'),('m'),('m'),('m'),('m'),
+  ('n'),('n'),('n'),('o'),('o'),('o'),('p'),('p'),('p'),('q'),('q'),('q'),('r'),
+  ('r'),('r'),('r'),('s'),('s'),('s'),('s'),('t'),('t'),('t'),('t'),('u'),('u'),
+  ('u'),('u'),('v'),('v'),('v'),('v'),('w'),('w'),('w'),('w'),('w'),('w'),('x'),
+  ('x'),('x'),('y'),('y'),('y'),('y'),('z'),('z'),('z'),('z');
+
+CREATE TABLE t3 (
+  varchar_key varchar(1) DEFAULT NULL,
+  KEY varchar_key (varchar_key)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t3 VALUES
+  (NULL),('c'),('d'),('e'),('f'),('h'),('j'),('k'),('k'),('m'),('m'),('m'),
+  ('n'),('o'),('r'),('t'),('t'),('u'),('w'),('y');
+ 
+SELECT varchar_key FROM t3 
+WHERE (SELECT varchar_key FROM t3 
+       WHERE (varchar_key,varchar_key) 
+         IN (SELECT t1.varchar_key, t2 .varchar_key 
+             FROM t1 RIGHT JOIN t2 ON t1.varchar_key  
+            )  
+      );
+
+DROP TABLE t1, t2, t3;

=== modified file 'mysql-test/t/union.test'
--- a/mysql-test/t/union.test	2009-05-15 07:27:27 +0000
+++ b/mysql-test/t/union.test	2009-11-20 09:16:27 +0000
@@ -93,7 +93,6 @@ SELECT @a:=1 UNION SELECT @a:=@a+1;
 (SELECT 1) UNION (SELECT 2) ORDER BY (SELECT a);
 (SELECT 1,3) UNION (SELECT 2,1) ORDER BY (SELECT 2);
 
-
 #
 # Test bug reported by joc@stripped
 #
@@ -1023,14 +1022,15 @@ DROP TABLE t1;
 
 
 --echo End of 5.0 tests
-#
-# Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take subselects 
-# into account
-#
+
+-- echo #
+-- echo # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take 
+-- echo # subselects into account
+-- echo #
 CREATE TABLE t1 (a INT);
 INSERT INTO t1 VALUES (1);
 
-# Test fix in parser rule select_derived_union.
+-- echo # Tests fix in parser rule select_derived_union.
 SELECT a INTO @v FROM (
   SELECT a FROM t1
   UNION
@@ -1059,7 +1059,7 @@ SELECT a INTO OUTFILE 'union.out.file7' 
 --error ER_WRONG_USAGE
 SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
 
-# Tests fix in parser rule query_expression_body.
+-- echo # Tests fix in parser rule query_expression_body.
 SELECT ( SELECT a UNION SELECT a ) INTO @v FROM t1;
 SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE  'union.out.file3' FROM t1;
 SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1;

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2009-11-20 12:49:47 +0000
+++ b/sql/sql_insert.cc	2009-11-20 14:21:20 +0000
@@ -2103,6 +2103,7 @@ TABLE *Delayed_insert::get_local_table(T
         my_message(ER_QUERY_INTERRUPTED, ER(ER_QUERY_INTERRUPTED), MYF(0));
       else
         my_message(thd.stmt_da->sql_errno(), thd.stmt_da->message(), MYF(0));
+      goto error;
     }
   }
   share= table->s;


Attachment: [text/bzr-bundle] bzr/kostja@sun.com-20091120142120-5trzbu5jy88v4vgw.bundle
Thread
bzr commit into mysql-6.0-codebase-bugfixing branch (kostja:3720)Konstantin Osipov20 Nov