diff options
author | acurtis@xiphis.org <> | 2006-07-05 17:18:59 -0700 |
---|---|---|
committer | acurtis@xiphis.org <> | 2006-07-05 17:18:59 -0700 |
commit | 86132d5d8fcb42d3753c5ed8e244210f5adfb829 (patch) | |
tree | 399f52e407d89318f0656e4e938b4f98d202ea6d /mysql-test | |
parent | dbc1ca22a0edc49e05d5be7cdb4b5ee755a3c45a (diff) | |
download | mariadb-git-86132d5d8fcb42d3753c5ed8e244210f5adfb829.tar.gz |
Bug#8706
"temporary table with data directory option fails"
myisam should not use user-specified table name when creating
temporary tables and use generated connection specific real name.
Test included.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/myisam.result | 21 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 31 |
2 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index cd1bc5c34e8..ce601944f97 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -769,3 +769,24 @@ a b xxxxxxxxx bbbbbb xxxxxxxxx bbbbbb DROP TABLE t1; +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t1 (a int) engine=myisam select 42 a; +select * from t1; +a +9 +select * from t1; +a +99 +select * from t1; +a +42 +drop table t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index ca49db40ae4..be7bec117f3 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -726,4 +726,35 @@ UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb'; SELECT * FROM t1; DROP TABLE t1; +# +# Bug#8706 - temporary table with data directory option fails +# +connect (session1,localhost,root,,); +connect (session2,localhost,root,,); + +connection session1; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a; +enable_query_log; +show create table t1; + +connection session2; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a; +enable_query_log; +show create table t1; + +connection default; +create table t1 (a int) engine=myisam select 42 a; + +connection session1; +select * from t1; +disconnect session1; +connection session2; +select * from t1; +disconnect session2; +connection default; +select * from t1; +drop table t1; + # End of 4.1 tests |