mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-4786 - merge 10.0-monty - 10.0
Fixed main.innodb_mysql_sync failure. TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE is not same as TDC_RT_REMOVE_NOT_OWN_AND_MARK_NOT_USABLE. Comment in sql_table.cc says: Storage engine has requested exclusive lock only for prepare phase and we are not under LOCK TABLES. Don't mark TABLE_SHARE as old in this case, as this won't allow opening of table by other threads during main phase of in-place ALTER TABLE. At this moment we hold exclusive metadata lock, all we should do is purge unused TABLE objects. sql/sql_base.cc: Restore 5.6 behavior of TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE. sql/sql_base.h: Restore 5.6 behavior of TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE.
This commit is contained in:
@ -9611,7 +9611,7 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
|
||||
*/
|
||||
if (remove_type == TDC_RT_REMOVE_NOT_OWN)
|
||||
share->remove_from_cache_at_close();
|
||||
else
|
||||
else if (remove_type != TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE)
|
||||
{
|
||||
/* Ensure that no can open the table while it's used */
|
||||
share->protect_against_usage();
|
||||
|
Reference in New Issue
Block a user