mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN WITH TEMPORARY TABLE -> ERRORS
Analysis ======== Point in time recovery using mysqlbinlog containing queries operating on temporary tables results in an error. While writing the query log event in the binary log, the thread id used for execution of DROP TABLE and DELETE commands were incorrect. The thread variable 'thread_specific_used' is used to determine whether a specific thread id is to used while executing the statements i.e using 'SET @@session.pseudo_thread_id'. This variable was not set correctly for DROP TABLE query and was never set for DELETE query. The thread id is important for temporary tables since the tables are session specific. DROP TABLE and DELETE queries executed using a wrong thread id resulted in errors while applying the queries generated by mysqlbinlog utility. Fix === Set the 'thread_specific_used' THD variable for DROP TABLE and DELETE queries. ReviewBoard: 21833
This commit is contained in:
committed by
Sergei Golubchik
parent
7473a71a28
commit
2536c0b1eb
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2018, MariaDB
|
||||
Copyright (c) 2000, 2019, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2019, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -2358,8 +2358,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
table->table_name););
|
||||
}
|
||||
DEBUG_SYNC(thd, "rm_table_no_locks_before_binlog");
|
||||
thd->thread_specific_used|= (trans_tmp_table_deleted ||
|
||||
non_trans_tmp_table_deleted);
|
||||
thd->thread_specific_used= TRUE;
|
||||
error= 0;
|
||||
err:
|
||||
if (wrong_tables.length())
|
||||
|
Reference in New Issue
Block a user