From: Date: August 18 2007 7:31pm Subject: bk commit into 5.0 tree (gshchepa:1.2496) BUG#30287 List-Archive: http://lists.mysql.com/commits/32716 X-Bug: 30287 Message-Id: <20070818173137.CCCB93D44E9@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of uchum. When uchum does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-08-18 22:31:31+05:00, gshchepa@stripped +1 -0 Fixed bug #30287. The server created temporary tables for filesort in the working directory instead of the specified tmpdir directory. sql/sql_select.cc@stripped, 2007-08-18 22:23:24+05:00, gshchepa@stripped +5 -5 Fixed bug #30287. create_myisam_from_heap, open_tmp_table and free_tmp_table have been modified to use the TABLE_SHARE::path value instead of the TABLE_SHARE::table_name value to create, open and close/delete temporary table files in the specified tmpdir directory instead of the working directory of the server. diff -Nrup a/sql/sql_select.cc b/sql/sql_select.cc --- a/sql/sql_select.cc 2007-07-31 16:24:13 +05:00 +++ b/sql/sql_select.cc 2007-08-18 22:23:24 +05:00 @@ -9934,7 +9934,7 @@ error: static bool open_tmp_table(TABLE *table) { int error; - if ((error=table->file->ha_open(table->s->table_name,O_RDWR, + if ((error=table->file->ha_open(table->s->path,O_RDWR, HA_OPEN_TMP_TABLE))) { table->file->print_error(error,MYF(0)); /* purecov: inspected */ @@ -10037,7 +10037,7 @@ static bool create_myisam_tmp_table(TABL OPTION_BIG_TABLES) create_info.data_file_length= ~(ulonglong) 0; - if ((error=mi_create(table->s->table_name,table->s->keys,&keydef, + if ((error=mi_create(table->s->path,table->s->keys,&keydef, (uint) (param->recinfo-param->start_recinfo), param->start_recinfo, table->s->uniques, &uniquedef, @@ -10081,7 +10081,7 @@ free_tmp_table(THD *thd, TABLE *entry) */ if (!(test_flags & TEST_KEEP_TMP_TABLES) || entry->s->db_type == DB_TYPE_HEAP) - entry->file->delete_table(entry->s->table_name); + entry->file->delete_table(entry->s->path); delete entry->file; } @@ -10172,7 +10172,7 @@ bool create_myisam_from_heap(THD *thd, T /* remove heap table and change to use myisam table */ (void) table->file->ha_rnd_end(); (void) table->file->close(); - (void) table->file->delete_table(table->s->table_name); + (void) table->file->delete_table(table->s->path); delete table->file; table->file=0; *table= new_table; @@ -10189,7 +10189,7 @@ bool create_myisam_from_heap(THD *thd, T (void) table->file->ha_rnd_end(); (void) new_table.file->close(); err1: - new_table.file->delete_table(new_table.s->table_name); + new_table.file->delete_table(new_table.s->path); delete new_table.file; err2: thd->proc_info=save_proc_info;