#At file:///export/home/tmp/mysql2/icp-test-fix/ based on revid:martin.hansson@stripped
3538 Olav Sandstaa 2011-01-20
Follow-up patch for test case for Bug #58816.
The test case turns off index condition pushdown as part of the test
but does not restore it to the value it had before the test case. This
makes all test cases following it run with index condition pushdown
turned off. The fix is to save the value of optimzier_switch before the
test starts and restore it after the test.
@ mysql-test/include/icp_tests.inc
Save the value of the optimizer switch before the test case
for Bug#58816 and restore it after.
@ mysql-test/r/innodb_icp.result
Save the value of the optimizer switch before the test case
for Bug#58816 and restore it after.
@ mysql-test/r/innodb_icp_none.result
Save the value of the optimizer switch before the test case
for Bug#58816 and restore it after.
@ mysql-test/r/myisam_icp.result
Save the value of the optimizer switch before the test case
for Bug#58816 and restore it after.
@ mysql-test/r/myisam_icp_none.result
Save the value of the optimizer switch before the test case
for Bug#58816 and restore it after.
modified:
mysql-test/include/icp_tests.inc
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp_none.result
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp_none.result
=== modified file 'mysql-test/include/icp_tests.inc'
=== modified file 'mysql-test/include/icp_tests.inc'
--- a/mysql-test/include/icp_tests.inc 2011-01-13 07:33:03 +0000
+++ b/mysql-test/include/icp_tests.inc 2011-01-20 14:57:03 +0000
@@ -659,6 +659,9 @@
--echo # switching ICP off"
--echo #
+# Save optimizer switch setting
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
+
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT NOT NULL,
@@ -675,6 +678,9 @@
DROP TABLE t1;
+# Restore optimzer switch setting
+set optimizer_switch= @save_optimizer_switch_bug58816;
+
--echo #
--echo # Bug#58837: ICP crash or valgrind error due to uninitialized
--echo # value in innobase_index_cond
=== modified file 'mysql-test/r/innodb_icp.result'
--- a/mysql-test/r/innodb_icp.result 2011-01-13 07:33:03 +0000
+++ b/mysql-test/r/innodb_icp.result 2011-01-20 14:57:03 +0000
@@ -602,6 +602,7 @@
# Bug #58816 "Extra temporary duplicate rows in result set when
# switching ICP off"
#
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT NOT NULL,
@@ -619,6 +620,7 @@
4 3
5 1
DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
#
# Bug#58837: ICP crash or valgrind error due to uninitialized
# value in innobase_index_cond
=== modified file 'mysql-test/r/innodb_icp_none.result'
--- a/mysql-test/r/innodb_icp_none.result 2011-01-13 07:33:03 +0000
+++ b/mysql-test/r/innodb_icp_none.result 2011-01-20 14:57:03 +0000
@@ -601,6 +601,7 @@
# Bug #58816 "Extra temporary duplicate rows in result set when
# switching ICP off"
#
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT NOT NULL,
@@ -618,6 +619,7 @@
4 3
5 1
DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
#
# Bug#58837: ICP crash or valgrind error due to uninitialized
# value in innobase_index_cond
=== modified file 'mysql-test/r/myisam_icp.result'
--- a/mysql-test/r/myisam_icp.result 2011-01-13 07:33:03 +0000
+++ b/mysql-test/r/myisam_icp.result 2011-01-20 14:57:03 +0000
@@ -600,6 +600,7 @@
# Bug #58816 "Extra temporary duplicate rows in result set when
# switching ICP off"
#
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT NOT NULL,
@@ -617,6 +618,7 @@
4 3
5 1
DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
#
# Bug#58837: ICP crash or valgrind error due to uninitialized
# value in innobase_index_cond
=== modified file 'mysql-test/r/myisam_icp_none.result'
--- a/mysql-test/r/myisam_icp_none.result 2011-01-13 07:33:03 +0000
+++ b/mysql-test/r/myisam_icp_none.result 2011-01-20 14:57:03 +0000
@@ -599,6 +599,7 @@
# Bug #58816 "Extra temporary duplicate rows in result set when
# switching ICP off"
#
+set @save_optimizer_switch_bug58816= @@optimizer_switch;
CREATE TABLE t1 (
pk INT NOT NULL,
c1 INT NOT NULL,
@@ -616,6 +617,7 @@
4 3
5 1
DROP TABLE t1;
+set optimizer_switch= @save_optimizer_switch_bug58816;
#
# Bug#58837: ICP crash or valgrind error due to uninitialized
# value in innobase_index_cond
Attachment: [text/bzr-bundle] bzr/olav.sandstaa@oracle.com-20110120145703-1r29my2q0oux817s.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk branch (olav.sandstaa:3538) Bug#58816 | Olav Sandstaa | 20 Jan |