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:
@ -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
|
||||
|
Reference in New Issue
Block a user