MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:March 26 2010 7:34am
Subject:bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:3432)
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.1-bugteam/ based on revid:azundris@stripped

 3432 Sergey Glukhov	2010-03-26 [merge]
      5.0-bugteam->5.1-bugteam merge
     @ mysql-test/r/join.result
        5.0-bugteam->5.1-bugteam merge
     @ mysql-test/t/join.test
        5.0-bugteam->5.1-bugteam merge
     @ sql/sql_select.cc
        5.0-bugteam->5.1-bugteam merge

    modified:
      mysql-test/r/join.result
      mysql-test/t/join.test
      sql/sql_select.cc
=== modified file 'mysql-test/r/join.result'
--- a/mysql-test/r/join.result	2010-03-24 10:45:09 +0000
+++ b/mysql-test/r/join.result	2010-03-26 07:33:00 +0000
@@ -1134,6 +1134,18 @@ Warnings:
 Note	1003	select 1 AS `1` from `test`.`t1` left join `test`.`t1` `t2` on((1 = 1)) left join (`test`.`t1` left join `test`.`t1` `t2` on((1 = 1))) on(rand()) where 1
 DROP VIEW v1;
 DROP TABLE t1;
+#
+# Bug#52177 crash with explain, row comparison, join, text field
+#
+CREATE TABLE t1 (a TINYINT, b TEXT, KEY (a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (0,''),(0,'');
+FLUSH TABLES;
+EXPLAIN SELECT 1 FROM t1 LEFT JOIN t1 a ON 1
+WHERE ROW(t1.a, 1111.11) = ROW(1111.11, 1111.11) AND
+ROW(t1.b, 1111.11) <=> ROW('','');
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
 End of 5.0 tests.
 CREATE TABLE t1 (f1 int);
 CREATE TABLE t2 (f1 int);

=== modified file 'mysql-test/t/join.test'
--- a/mysql-test/t/join.test	2010-03-24 10:45:09 +0000
+++ b/mysql-test/t/join.test	2010-03-26 07:33:00 +0000
@@ -796,6 +796,17 @@ SELECT 1 FROM v1 right join v1 AS v2 ON 
 DROP VIEW v1;
 DROP TABLE t1;
 
+--echo #
+--echo # Bug#52177 crash with explain, row comparison, join, text field
+--echo #
+CREATE TABLE t1 (a TINYINT, b TEXT, KEY (a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (0,''),(0,'');
+FLUSH TABLES;
+EXPLAIN SELECT 1 FROM t1 LEFT JOIN t1 a ON 1
+WHERE ROW(t1.a, 1111.11) = ROW(1111.11, 1111.11) AND
+ROW(t1.b, 1111.11) <=> ROW('','');
+DROP TABLE t1;
+
 --echo End of 5.0 tests.
 
 

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-03-24 10:45:09 +0000
+++ b/sql/sql_select.cc	2010-03-26 07:33:00 +0000
@@ -1106,7 +1106,7 @@ JOIN::optimize()
     }
   }
 
-  if (conds &&!outer_join && const_table_map != found_const_table_map && 
+  if (conds && const_table_map != found_const_table_map &&
       (select_options & SELECT_DESCRIBE) &&
       select_lex->master_unit() == &thd->lex->unit) // upper level SELECT
   {


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20100326073300-daw2smymkxhs3vvh.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:3432)Sergey Glukhov30 Mar