summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp_trans.test
diff options
context:
space:
mode:
authorTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-08-08 17:45:43 +0100
committerTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-08-08 17:45:43 +0100
commit0619bd57028a27a4bb58ca0dec8e5889f3d96a8e (patch)
treecc3e4367c702b80f1519e45cda93846dc00c8c2b /mysql-test/t/sp_trans.test
parent5962cadcfae4f8b7842578ab308798a9b5295a32 (diff)
parente6bc34e2c375545dd77c4655c6b3071cb1879339 (diff)
downloadmariadb-git-0619bd57028a27a4bb58ca0dec8e5889f3d96a8e.tar.gz
manual merge
Diffstat (limited to 'mysql-test/t/sp_trans.test')
-rw-r--r--mysql-test/t/sp_trans.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test
index c114d397e43..39ac086071b 100644
--- a/mysql-test/t/sp_trans.test
+++ b/mysql-test/t/sp_trans.test
@@ -598,6 +598,39 @@ select distinct f1, bug13575(f1) from t3 order by f1|
drop function bug13575|
drop table t3|
+#
+# BUG#11758414: Default storage_engine not honored when set
+# from within a stored procedure
+#
+SELECT @@GLOBAL.storage_engine INTO @old_engine|
+SET @@GLOBAL.storage_engine=InnoDB|
+SET @@SESSION.storage_engine=InnoDB|
+# show defaults at define-time
+SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
+SHOW SESSION VARIABLES LIKE 'storage_engine'|
+CREATE PROCEDURE bug11758414()
+BEGIN
+ SET @@GLOBAL.storage_engine="MyISAM";
+ SET @@SESSION.storage_engine="MyISAM";
+ # show defaults at execution time / that setting them worked
+ SHOW GLOBAL VARIABLES LIKE 'storage_engine';
+ SHOW SESSION VARIABLES LIKE 'storage_engine';
+ CREATE TABLE t1 (id int);
+ CREATE TABLE t2 (id int) ENGINE=InnoDB;
+ # show we're heeding the default (at run-time, not parse-time!)
+ SHOW CREATE TABLE t1;
+ # show that we didn't break explicit override with ENGINE=...
+ SHOW CREATE TABLE t2;
+END;
+|
+CALL bug11758414|
+# show that changing defaults within SP stuck
+SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
+SHOW SESSION VARIABLES LIKE 'storage_engine'|
+DROP PROCEDURE bug11758414|
+DROP TABLE t1, t2|
+SET @@GLOBAL.storage_engine=@old_engine|
+
--echo #
--echo # End of 5.1 tests
--echo #