diff options
author | unknown <jimw@mysql.com> | 2005-03-01 19:05:48 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-03-01 19:05:48 -0800 |
commit | 1430a2a44319aa5ca1fa1b4e626fca7cec1243ad (patch) | |
tree | d4401945cb12d0479d56b038315a2c864f68e2d9 /sql/ha_heap.cc | |
parent | abd8200f77a0b5c8463628fa921f998cbf7498f9 (diff) | |
download | mariadb-git-1430a2a44319aa5ca1fa1b4e626fca7cec1243ad.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)
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
Diffstat (limited to 'sql/ha_heap.cc')
-rw-r--r-- | sql/ha_heap.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 3c2249ce281..c7c466c019d 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -408,7 +408,8 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd, int ha_heap::delete_table(const char *name) { char buff[FN_REFLEN]; - int error= heap_delete_table(fn_format(buff,name,"","",4+2)); + int error= heap_delete_table(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME)); return error == ENOENT ? 0 : error; } @@ -521,7 +522,8 @@ int ha_heap::create(const char *name, TABLE *table_arg, create_info->auto_increment_value - 1 : 0); hp_create_info.max_table_size=current_thd->variables.max_heap_table_size; max_rows = (ha_rows) (hp_create_info.max_table_size / mem_per_row); - error= heap_create(fn_format(buff,name,"","",4+2), + error= heap_create(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME), table_arg->keys,keydef, table_arg->reclength, (ulong) ((table_arg->max_rows < max_rows && table_arg->max_rows) ? |