mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Make sure that the filename for temporary tables is built with fn_format()
so that extra slashes are handled in tmpdir. (Bug #8497) sql/ha_heap.cc: use constants instead of magic integers on fn_format() calls sql/sql_select.cc: Construct filename for temporary tables using fn_format() to get consistent filenames. mysql-test/t/temp_table.test: Add new regression test mysql-test/r/temp_table.result: Add new test results
This commit is contained in:
@ -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;
|
||||
|
1
mysql-test/t/temp_table-master.opt
Normal file
1
mysql-test/t/temp_table-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--tmpdir=$MYSQL_TEST_DIR/var//tmp
|
@ -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;
|
||||
|
Reference in New Issue
Block a user