mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
do not log the drop internal temporary tables into the binary log
mark killed partially completed updates with an error code in binlog stop replication if the master reports a possible partial/killed update test partially killed update
This commit is contained in:
@ -497,13 +497,14 @@ void close_temporary_tables(THD *thd)
|
||||
TABLE *table,*next;
|
||||
uint init_query_buf_size = 11, query_buf_size; // "drop table "
|
||||
char* query, *p;
|
||||
bool found_user_tables = 0;
|
||||
|
||||
LINT_INIT(p);
|
||||
query_buf_size = init_query_buf_size;
|
||||
|
||||
for (table=thd->temporary_tables ; table ; table=table->next)
|
||||
{
|
||||
query_buf_size += table->key_length;
|
||||
|
||||
}
|
||||
|
||||
if(query_buf_size == init_query_buf_size)
|
||||
@ -519,15 +520,20 @@ void close_temporary_tables(THD *thd)
|
||||
{
|
||||
if(query) // we might be out of memory, but this is not fatal
|
||||
{
|
||||
p = strxmov(p,table->table_cache_key,".",
|
||||
// skip temporary tables not created directly by the user
|
||||
if(table->table_name[0] != '#')
|
||||
{
|
||||
p = strxmov(p,table->table_cache_key,".",
|
||||
table->table_name,",", NullS);
|
||||
// here we assume table_cache_key always starts
|
||||
// with \0 terminated db name
|
||||
// here we assume table_cache_key always starts
|
||||
// with \0 terminated db name
|
||||
found_user_tables = 1;
|
||||
}
|
||||
}
|
||||
next=table->next;
|
||||
close_temporary(table);
|
||||
}
|
||||
if (query && mysql_bin_log.is_open())
|
||||
if (query && found_user_tables && mysql_bin_log.is_open())
|
||||
{
|
||||
uint save_query_len = thd->query_length;
|
||||
*--p = 0;
|
||||
|
Reference in New Issue
Block a user