summaryrefslogtreecommitdiff
path: root/mysql-test/r/ps.result
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2005-09-08 21:30:05 +0200
committerunknown <andrey@lmy004.>2005-09-08 21:30:05 +0200
commit77589752cbd93b1e716208ff3c53b88bcc1f70d7 (patch)
treecd57feea4289bdb595fdb50a324b5904d8ee07eb /mysql-test/r/ps.result
parent2adf7f95967e9e8177b42c514f48b0b597dfe9e7 (diff)
downloadmariadb-git-77589752cbd93b1e716208ff3c53b88bcc1f70d7.tar.gz
fix for bug #12651 (item of a prepared query allocated on non-permanent
are thus dangling later) mysql-test/r/ps.result: test for bug #12651 (data allocated on thd's arena but not on permanent arena) mysql-test/t/ps.test: test for bug #12651 (data allocated on thd's arena but not on permanent arena) sql/sql_base.cc: if there is tree transformation then backup the current arena and use permanent one (for PS) otherwise the data will be deallocated after the prepare process is finished. this bug was introduced with the recent natural join patch
Diffstat (limited to 'mysql-test/r/ps.result')
-rw-r--r--mysql-test/r/ps.result8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index dc78f8d04ea..f1c3672083d 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -773,6 +773,14 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
select ? from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t1' at line 1
drop table t1;
+CREATE TABLE b12651_T1(a int) ENGINE=MYISAM;
+CREATE TABLE b12651_T2(b int) ENGINE=MYISAM;
+CREATE VIEW b12651_V1 as SELECT b FROM b12651_T2;
+PREPARE b12651 FROM 'SELECT 1 FROM b12651_T1 WHERE a IN (SELECT b FROM b12651_V1)';
+EXECUTE b12651;
+1
+DROP VIEW b12651_V1;
+DROP TABLE b12651_T1, b12651_T2;
prepare stmt from "select @@time_zone";
execute stmt;
@@time_zone