[Commits] Rev 3381: Added a test case for LP bug #915291. in file:///home/igor/maria/maria-5.3-mwl247/

Igor Babaev igor at askmonty.org
Thu Jan 19 05:38:03 EET 2012


At file:///home/igor/maria/maria-5.3-mwl247/

------------------------------------------------------------
revno: 3381
revision-id: igor at askmonty.org-20120119033803-jzwax615w1q3k22n
parent: igor at askmonty.org-20120117112649-ebl7chbvsass72jn
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.3-mwl247
timestamp: Wed 2012-01-18 19:38:03 -0800
message:
  Added a test case for LP bug #915291.
  The bug was fixed by the patch for bug 914560. 
-------------- next part --------------
=== modified file 'mysql-test/r/innodb_ext_key.result'
--- a/mysql-test/r/innodb_ext_key.result	2012-01-17 11:26:49 +0000
+++ b/mysql-test/r/innodb_ext_key.result	2012-01-19 03:38:03 +0000
@@ -585,5 +585,26 @@
 2	MATERIALIZED	s2	ALL	NULL	NULL	NULL	NULL	2	Using join buffer (flat, BNL join)
 DROP TABLE t1;
 set optimizer_switch=@save_optimizer_switch;
+#
+# LP Bug #915291: query using a materialized view
+#                 + extended_keys = on
+# (valgrinf complains fixed by the patch for bug #914560)
+#
+set @save_optimizer_switch=@@optimizer_switch;
+SET optimizer_switch = 'derived_with_keys=on';
+SET optimizer_switch = 'extended_keys=on';
+CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('j'), ('v');
+CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('j'), ('v');
+CREATE TABLE t3 (c varchar(1));
+INSERT INTO t2 VALUES ('m'), ('n');
+CREATE VIEW v
+AS SELECT DISTINCT * FROM t2 STRAIGHT_JOIN t3;
+SELECT * FROM t1, v WHERE a = b;
+a	b	c
+DROP VIEW v;
+DROP TABLE t1,t2,t3;
+set optimizer_switch=@save_optimizer_switch;
 set optimizer_switch=@save_ext_key_optimizer_switch;
 SET SESSION STORAGE_ENGINE=DEFAULT;

=== modified file 'mysql-test/t/innodb_ext_key.test'
--- a/mysql-test/t/innodb_ext_key.test	2012-01-17 11:26:49 +0000
+++ b/mysql-test/t/innodb_ext_key.test	2012-01-19 03:38:03 +0000
@@ -312,5 +312,35 @@
 
 set optimizer_switch=@save_optimizer_switch;
 
+--echo #
+--echo # LP Bug #915291: query using a materialized view
+--echo #                 + extended_keys = on
+--echo # (valgrinf complains fixed by the patch for bug #914560)
+--echo #
+
+set @save_optimizer_switch=@@optimizer_switch;
+
+SET optimizer_switch = 'derived_with_keys=on';
+SET optimizer_switch = 'extended_keys=on';
+
+CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('j'), ('v');
+
+CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('j'), ('v');
+
+CREATE TABLE t3 (c varchar(1));
+INSERT INTO t2 VALUES ('m'), ('n');
+
+CREATE VIEW v
+  AS SELECT DISTINCT * FROM t2 STRAIGHT_JOIN t3;
+
+SELECT * FROM t1, v WHERE a = b;
+
+DROP VIEW v;
+DROP TABLE t1,t2,t3;
+
+set optimizer_switch=@save_optimizer_switch;
+
 set optimizer_switch=@save_ext_key_optimizer_switch;
 SET SESSION STORAGE_ENGINE=DEFAULT;



More information about the commits mailing list