1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave

- Decrease "slave_open_temp_tables" during reopen of truncated table.
 - Add test "rpl_trunc_temp"
This commit is contained in:
msvensson@neptunus.(none)
2006-03-08 10:15:48 +01:00
parent a744ab78ba
commit 8162610a39
3 changed files with 59 additions and 0 deletions

View File

@ -641,6 +641,8 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
close_temporary(table,0);
if (thd->slave_thread)
--slave_open_temp_tables;
*fn_ext(path)=0; // Remove the .frm extension
ha_create_table(path, &create_info,1);
// We don't need to call invalidate() because this table is not in cache