From 3a7169572ce4759724d8532191c8e8a10cff3a7f Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 31 Oct 2011 01:13:12 -0700 Subject: [PATCH] Backported the test case for bug 59843 from the mysql-5.6 code line. (Failed to reproduce the bug in mariadb-5.3). --- mysql-test/include/icp_tests.inc | 17 +++++++++++++++++ mysql-test/r/innodb_icp.result | 17 +++++++++++++++++ mysql-test/r/maria_icp.result | 17 +++++++++++++++++ mysql-test/r/myisam_icp.result | 17 +++++++++++++++++ 4 files changed, 68 insertions(+) diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc index 6bc545ac71e..28121251377 100644 --- a/mysql-test/include/icp_tests.inc +++ b/mysql-test/include/icp_tests.inc @@ -597,6 +597,23 @@ INSERT INTO t1 (i2) VALUES (1); DROP TABLE t1; +--echo # +--echo # Bug #11766678 - 59843: +--echo # USING UNINITIALISED VALUE IN USES_INDEX_FIELDS_ONLY +--echo # + +CREATE TABLE t1 ( + col999 FLOAT NOT NULL, + COL1000 VARBINARY(179) NOT NULL, + col1003 DATE DEFAULT NULL, + KEY idx4267 (col1000, col1003) +); + +INSERT INTO t1 VALUES (),(); +SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate(); + +DROP TABLE t1; + --echo # --echo # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89 --echo # diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index 869d8dbafc8..1b0749e0555 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -558,6 +558,23 @@ pk i1 c1 i2 INSERT INTO t1 (i2) VALUES (1); DROP TABLE t1; # +# Bug #11766678 - 59843: +# USING UNINITIALISED VALUE IN USES_INDEX_FIELDS_ONLY +# +CREATE TABLE t1 ( +col999 FLOAT NOT NULL, +COL1000 VARBINARY(179) NOT NULL, +col1003 DATE DEFAULT NULL, +KEY idx4267 (col1000, col1003) +); +INSERT INTO t1 VALUES (),(); +Warnings: +Warning 1364 Field 'col999' doesn't have a default value +Warning 1364 Field 'COL1000' doesn't have a default value +SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate(); +col999 +DROP TABLE t1; +# # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89 # CREATE TABLE t1 ( f11 int) ; diff --git a/mysql-test/r/maria_icp.result b/mysql-test/r/maria_icp.result index ea824ece764..e1d3d58d36d 100644 --- a/mysql-test/r/maria_icp.result +++ b/mysql-test/r/maria_icp.result @@ -564,6 +564,23 @@ pk i1 c1 i2 INSERT INTO t1 (i2) VALUES (1); DROP TABLE t1; # +# Bug #11766678 - 59843: +# USING UNINITIALISED VALUE IN USES_INDEX_FIELDS_ONLY +# +CREATE TABLE t1 ( +col999 FLOAT NOT NULL, +COL1000 VARBINARY(179) NOT NULL, +col1003 DATE DEFAULT NULL, +KEY idx4267 (col1000, col1003) +); +INSERT INTO t1 VALUES (),(); +Warnings: +Warning 1364 Field 'col999' doesn't have a default value +Warning 1364 Field 'COL1000' doesn't have a default value +SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate(); +col999 +DROP TABLE t1; +# # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89 # CREATE TABLE t1 ( f11 int) ; diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result index 5e33fee7d02..8b560b06fa4 100644 --- a/mysql-test/r/myisam_icp.result +++ b/mysql-test/r/myisam_icp.result @@ -562,6 +562,23 @@ pk i1 c1 i2 INSERT INTO t1 (i2) VALUES (1); DROP TABLE t1; # +# Bug #11766678 - 59843: +# USING UNINITIALISED VALUE IN USES_INDEX_FIELDS_ONLY +# +CREATE TABLE t1 ( +col999 FLOAT NOT NULL, +COL1000 VARBINARY(179) NOT NULL, +col1003 DATE DEFAULT NULL, +KEY idx4267 (col1000, col1003) +); +INSERT INTO t1 VALUES (),(); +Warnings: +Warning 1364 Field 'col999' doesn't have a default value +Warning 1364 Field 'COL1000' doesn't have a default value +SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate(); +col999 +DROP TABLE t1; +# # BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89 # CREATE TABLE t1 ( f11 int) ;