From 55ed38e533e825894561d370f81ee2ab7f999b8f Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Wed, 17 Jan 2007 11:27:33 +0100 Subject: [PATCH 1/4] Cset exclude: msvensson@neptunus.(none)|ChangeSet|20060825084614|09755 --- mysql-test/r/myisam.result | 4 ++-- mysql-test/t/myisam.test | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73cee4835bf..a95d57b4513 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -927,12 +927,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) 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 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 7868e7bad4e..22f5bf18c0d 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -861,20 +861,14 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a; enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection session2; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a; enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection default; From 248c76823010738d9320d32c4eee1a5a92c1cf40 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Wed, 17 Jan 2007 12:12:24 +0100 Subject: [PATCH 2/4] Cset exclude: msvensson@pilot.mysql.com|ChangeSet|20070117102733|42618 --- mysql-test/r/myisam.result | 4 ++-- mysql-test/t/myisam.test | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index a95d57b4513..73cee4835bf 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -927,12 +927,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 22f5bf18c0d..7868e7bad4e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -861,14 +861,20 @@ 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; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR 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; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR show create table t1; connection default; From 543bc0165f039f5b148c750483615705680ca5a3 Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Wed, 17 Jan 2007 12:22:00 +0100 Subject: [PATCH 3/4] Bug#21122 SHOW CREATE TABLE: directory output only sometimes Bug #25000 myisam.test fails on 'pb-valgrind-*' Valgrind - Move tests that need symlink to symlink.test --- mysql-test/r/myisam.result | 21 --------------------- mysql-test/r/symlink.result | 21 +++++++++++++++++++++ mysql-test/t/myisam.test | 35 ----------------------------------- mysql-test/t/symlink.test | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 56 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 73cee4835bf..62d3e679eb2 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -923,27 +923,6 @@ SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; Variable_name Value myisam_repair_threads 1 -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' -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; CREATE TABLE t1(a VARCHAR(16)); INSERT INTO t1 VALUES('aaaaaaaa'),(NULL); UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa'; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index f6779689133..b104ce50a56 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -102,3 +102,24 @@ t1 CREATE TABLE `t1` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 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 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +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 7868e7bad4e..01e7a08ae53 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -854,41 +854,6 @@ DROP TABLE t1; # SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; -# 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/log" select 9 a; -enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -show create table t1; - -connection session2; -disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; -enable_query_log; -# If running test suite with a non standard tmp dir, the "show create table" -# will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -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; # # BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index c0c1db3d553..201a2866c4f 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -133,4 +133,41 @@ enable_query_log; show create table 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/log" select 9 a; +enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +show create table t1; + +connection session2; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +enable_query_log; +# If running test suite with a non standard tmp dir, the "show create table" +# will print "DATA_DIRECTORY=". Use replace_result to mask it out +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +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 From 009324b12b0b2092b902d056cb8a2a4f77e9212b Mon Sep 17 00:00:00 2001 From: "msvensson@pilot.mysql.com" <> Date: Fri, 19 Jan 2007 12:03:03 +0100 Subject: [PATCH 4/4] Use $MYSQLTESTVARDIR --- mysql-test/r/symlink.result | 4 ++-- mysql-test/t/symlink.test | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index c64d34aa80c..891efb7a0cf 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -115,12 +115,12 @@ show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TEST_DIR/var/log/' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' create table t1 (a int) engine=myisam select 42 a; select * from t1; a diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 94890eab93d..9a498eaadc9 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -147,20 +147,20 @@ connect (session2,localhost,root,,); connection session1; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 9 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a; enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; connection session2; disable_query_log; -eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/log" select 99 a; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a; enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; connection default;