#At file:///home/olav/mysql/develop/opt-bug43360/ based on revid:alik@ibmvm-20091008093643-fjns7fky4mc00jfw
3649 Olav.Sandstaa@stripped 2009-10-08
Bug#43360 - Server crash with a simple multi-table update
Add a test case for this bug to the optimizer_unfixed_bugs suite.
Note that this test passes for the current version of the 6.0 codebase. In order to
reproduce this bug it is neccessary to re-enable InnoDB's support for index
condition pushdown in the file storage/innobase/handler/ha_innodb.h.
@ mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
Result file for test case for Bug#43360 - Server crash with a simple multi-table update
@ mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
Test case for Bug#43360 - Server crash with a simple multi-table update
added:
mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
=== added file 'mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result'
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result 2009-10-08 19:44:58 +0000
@@ -0,0 +1,43 @@
+#
+# Bug#43360 - Server crash with a simple multi-table update
+#
+CREATE TABLE t1 (
+a CHAR(2) NOT NULL PRIMARY KEY,
+b VARCHAR(20) NOT NULL,
+KEY (b)
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+a CHAR(2) NOT NULL PRIMARY KEY,
+b VARCHAR(20) NOT NULL,
+KEY (b)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+('AB','MySQLAB'),
+('JA','Sun Microsystems'),
+('MS','Microsoft'),
+('IB','IBM- Inc.'),
+('GO','Google Inc.');
+INSERT INTO t2 VALUES
+('AB','Sweden'),
+('JA','USA'),
+('MS','United States of America'),
+('IB','North America'),
+('GO','South America');
+Warnings:
+Warning 1265 Data truncated for column 'b' at row 3
+UPDATE t1,t2 SET t1.b=UPPER(t1.b) WHERE t1.b LIKE 'United%';
+SELECT * FROM t1;
+a b
+GO Google Inc.
+IB IBM- Inc.
+MS Microsoft
+AB MySQLAB
+JA Sun Microsystems
+SELECT * FROM t2;
+a b
+IB North America
+GO South America
+AB Sweden
+MS United States of Ame
+JA USA
+DROP TABLE t1,t2;
=== added file 'mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test'
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test 2009-10-08 19:44:58 +0000
@@ -0,0 +1,46 @@
+
+--echo #
+--echo # Bug#43360 - Server crash with a simple multi-table update
+--echo #
+
+# Note: This test passes in the current version of the 6.0 codebase.
+# In order to reproduce the bug you need to re-enable InnoDB's
+# support for Index Condition Pushdown. See description in the
+# bug report about the necessary change in storage/innobase/
+# handler/ha_innodb.h.
+
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (
+ a CHAR(2) NOT NULL PRIMARY KEY,
+ b VARCHAR(20) NOT NULL,
+ KEY (b)
+) ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+ a CHAR(2) NOT NULL PRIMARY KEY,
+ b VARCHAR(20) NOT NULL,
+ KEY (b)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+('AB','MySQLAB'),
+('JA','Sun Microsystems'),
+('MS','Microsoft'),
+('IB','IBM- Inc.'),
+('GO','Google Inc.');
+
+INSERT INTO t2 VALUES
+('AB','Sweden'),
+('JA','USA'),
+('MS','United States of America'),
+('IB','North America'),
+('GO','South America');
+
+UPDATE t1,t2 SET t1.b=UPPER(t1.b) WHERE t1.b LIKE 'United%';
+
+SELECT * FROM t1;
+
+SELECT * FROM t2;
+
+DROP TABLE t1,t2;
Attachment: [text/bzr-bundle] bzr/olav.sandstaa@sun.com-20091008194458-a7zrpjxc68vpked2.bundle