summaryrefslogtreecommitdiff
path: root/mysql-test/t/derived.test
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-09-12 17:05:29 +0300
committerunknown <sanja@askmonty.org>2013-09-12 17:05:29 +0300
commit1a01e3b959102402de1547fb2c7b912269032882 (patch)
tree851353bd1fa398cb98e82afe30c4578f17838c1f /mysql-test/t/derived.test
parent7e4845beea1a86dc53dc67908a2779ea2f0190a2 (diff)
downloadmariadb-git-1a01e3b959102402de1547fb2c7b912269032882.tar.gz
MDEV-5005: Subquery in Procedure somehow affecting temporary table
Removed unneeded set of TABLE_LIST::skip_temporary flag.
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r--mysql-test/t/derived.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 7defc55b473..b0db0e8100a 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -320,4 +320,36 @@ DROP TABLE t1;
--echo # End of 5.0 tests
+--echo #
+--echo # MDEV-5005: Subquery in Procedure somehow affecting temporary table
+--echo #
+
+create temporary table if not exists t1 (id int not null);
+
+select A.* from ( select tt.* from t1 tt ) A;
+
+prepare stmt from "select A.* from ( select tt.* from t1 tt ) A ";
+execute stmt;
+deallocate prepare stmt;
+
+drop temporary table t1;
+
+--delimiter |
+CREATE PROCEDURE p ()
+BEGIN
+ select A.* from ( select tt.* from t1 tt ) A ;
+END |
+--delimiter ;
+
+create temporary table if not exists t1 (id int not null);
+
+CALL p();
+CALL p();
+
+drop procedure p;
+
+drop temporary table t1;
+
+--echo # End of 5.3 tests
+
set optimizer_switch=@save_derived_optimizer_switch;