MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Martin Hansson Date:March 18 2010 11:08am
Subject:bzr push into mysql-pe branch (martin.hansson:3979 to 3980) Bug#47762
View as plain text  
 3980 Martin Hansson	2010-03-18
      Post-push fix to disable a subset of the test case for Bug#47762. 
      The bug exposed two bugs in 6.0. They were reported as follows.
      
      Bug no 52174: Sometimes wrong plan when reading a MAX value 
      from non-NULL index
      
      Bug no 52173: Reading NULL value from non-NULL index gives wrong 
      result in embedded server 
      
      Both bugs taken together affect a much smaller class of queries than #47762, 
      so the fix stays for now.

    modified:
      mysql-test/include/min_null_cond.inc
      mysql-test/r/group_min_max.result
      mysql-test/t/group_min_max.test
 3979 Mats Kindahl	2010-03-17 [merge]
      Null-merging back-ported patch to BUG#49618 from mysql-5.1-bugteam to mysql-pe.

=== modified file 'mysql-test/include/min_null_cond.inc'
--- a/mysql-test/include/min_null_cond.inc	2010-03-16 14:51:00 +0000
+++ b/mysql-test/include/min_null_cond.inc	2010-03-18 11:08:27 +0000
@@ -18,11 +18,13 @@ EXPLAIN
 SELECT MIN( a ) FROM t1 WHERE a < NULL;
 SELECT MIN( a ) FROM t1 WHERE a < NULL;
 
+if (!$skip_null_safe_test)
+{
 --replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x
 EXPLAIN
 SELECT MIN( a ) FROM t1 WHERE a <=> NULL;
 SELECT MIN( a ) FROM t1 WHERE a <=> NULL;
-
+}
 --replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x
 EXPLAIN
 SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND 10;

=== modified file 'mysql-test/r/group_min_max.result'
--- a/mysql-test/r/group_min_max.result	2010-03-16 16:18:48 +0000
+++ b/mysql-test/r/group_min_max.result	2010-03-18 11:08:27 +0000
@@ -2691,6 +2691,17 @@ DROP TABLE t1;
 ## Test for NOT NULLs
 CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY);
 INSERT INTO t1 VALUES (1), (2), (3);
+#
+# NULL-safe operator test disabled for non-NULL indexed columns.
+#
+# See bugs
+#
+# - Bug#52173: Reading NULL value from non-NULL index gives
+#   wrong result in embedded server 
+#
+# - Bug#52174: Sometimes wrong plan when reading a MAX value from 
+#   non-NULL index
+#
 EXPLAIN
 SELECT MIN( a ) FROM t1 WHERE a = NULL;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
@@ -2720,13 +2731,6 @@ SELECT MIN( a ) FROM t1 WHERE a < NULL;
 MIN( a )
 NULL
 EXPLAIN
-SELECT MIN( a ) FROM t1 WHERE a <=> NULL;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-x	x	x	x	x	x	x	x	x	No matching min/max row
-SELECT MIN( a ) FROM t1 WHERE a <=> NULL;
-MIN( a )
-NULL
-EXPLAIN
 SELECT MIN( a ) FROM t1 WHERE a BETWEEN NULL AND 10;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 x	x	x	x	x	x	x	x	x	Impossible WHERE noticed after reading const tables

=== modified file 'mysql-test/t/group_min_max.test'
--- a/mysql-test/t/group_min_max.test	2010-03-16 16:18:48 +0000
+++ b/mysql-test/t/group_min_max.test	2010-03-18 11:08:27 +0000
@@ -1070,6 +1070,18 @@ DROP TABLE t1;
 --echo ## Test for NOT NULLs
 CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY);
 INSERT INTO t1 VALUES (1), (2), (3);
+--echo #
+--echo # NULL-safe operator test disabled for non-NULL indexed columns.
+--echo #
+--echo # See bugs
+--echo #
+--echo # - Bug#52173: Reading NULL value from non-NULL index gives
+--echo #   wrong result in embedded server 
+--echo #
+--echo # - Bug#52174: Sometimes wrong plan when reading a MAX value from 
+--echo #   non-NULL index
+--echo #
+--let $skip_null_safe_test= 1
 --source include/min_null_cond.inc
 DROP TABLE t1;
 


Attachment: [text/bzr-bundle] bzr/martin.hansson@sun.com-20100318110827-0k679quzbbk9lwuu.bundle
Thread
bzr push into mysql-pe branch (martin.hansson:3979 to 3980) Bug#47762Martin Hansson18 Mar