mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
The problem was that TRUNCATE TABLE didn't take a exclusive lock on a table if it resorted to truncating via delete of all rows in the table. Specifically for InnoDB tables, this could break proper isolation as InnoDB ends up aborting some granted locks when truncating a table. The solution is to take a exclusive metadata lock before TRUNCATE TABLE can proceed. This guarantees that no other transaction is using the table. Incompatible change: Truncate via delete no longer fails if sql_safe_updates is activated (this was a undocumented side effect).
This commit is contained in:
@ -43,8 +43,6 @@ bool check_key_in_view(THD *thd, TABLE_LIST * view);
|
||||
|
||||
bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view);
|
||||
|
||||
frm_type_enum mysql_frm_type(THD *thd, char *path, enum legacy_db_type *dbt);
|
||||
|
||||
int view_checksum(THD *thd, TABLE_LIST *view);
|
||||
|
||||
extern TYPELIB updatable_views_with_limit_typelib;
|
||||
|
Reference in New Issue
Block a user