mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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. myisam/mi_create.c: Bug#8706 When creating a temporary table with directory override, ensure that the real filename is using the hidden temporary name otherwise multiple clients cannot have same named temporary tables without conflict. mysql-test/r/myisam.result: Bug#8706 Test for bug mysql-test/t/myisam.test: Bug#8706 Test for bug
This commit is contained in:
@ -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;
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user