summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-03-01 19:05:48 -0800
committerjimw@mysql.com <>2005-03-01 19:05:48 -0800
commitac69a4a22c7d2753631b81eb5fe7a5d05a272bf2 (patch)
treed4401945cb12d0479d56b038315a2c864f68e2d9 /mysql-test
parentc99c44805c4104ad885e93a55b0986abfbb1e122 (diff)
downloadmariadb-git-ac69a4a22c7d2753631b81eb5fe7a5d05a272bf2.tar.gz
Make sure that the filename for temporary tables is built with fn_format()
so that extra slashes are handled in tmpdir. (Bug #8497)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/temp_table.result9
-rw-r--r--mysql-test/t/temp_table-master.opt1
-rw-r--r--mysql-test/t/temp_table.test9
3 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 10c0a2e3652..f08fe6ddd0f 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -97,3 +97,12 @@ Variable_name Value
Created_tmp_disk_tables 0
Created_tmp_tables 1
drop table t1;
+create table t1 (a int, b int, index(a), index(b));
+create table t2 (c int auto_increment, d varchar(255), primary key (c));
+insert into t1 values (3,1),(3,2);
+insert into t2 values (NULL, 'foo'), (NULL, 'bar');
+select d, c from t1 left join t2 on b = c where a = 3 order by d;
+d c
+bar 2
+foo 1
+drop table t1, t2;
diff --git a/mysql-test/t/temp_table-master.opt b/mysql-test/t/temp_table-master.opt
new file mode 100644
index 00000000000..026d3d4640c
--- /dev/null
+++ b/mysql-test/t/temp_table-master.opt
@@ -0,0 +1 @@
+--tmpdir=$MYSQL_TEST_DIR/var//tmp
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 74276c7668c..3e60917783a 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -89,3 +89,12 @@ flush status;
select * from t1 group by d;
show status like "created_tmp%tables";
drop table t1;
+
+# Bug #8497: tmpdir with extra slashes would cause failures
+#
+create table t1 (a int, b int, index(a), index(b));
+create table t2 (c int auto_increment, d varchar(255), primary key (c));
+insert into t1 values (3,1),(3,2);
+insert into t2 values (NULL, 'foo'), (NULL, 'bar');
+select d, c from t1 left join t2 on b = c where a = 3 order by d;
+drop table t1, t2;