mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-20945: BACKUP UNLOCK + FTWRL assertion failure
MDEV-20945: BACKUP UNLOCK + FTWRL assertion failure | SIGSEGV in I_P_List from MDL_context::release_lock on INSERT w/ BACKUP LOCK (on optimized builds) | Assertion `ticket->m_duration == MDL_EXPLICIT' failed BACKUP LOCK behavior is modified so it won't be used wrong: - BACKUP LOCK should commit any active transactions. - BACKUP LOCK should not be allowed in stored procedures. - When BACKUP LOCK is active, don't allow any DDL's for that connection. - FTWRL is forbidden on the same connection while BACKUP LOCK is active. Reviewed-by: monty@mariadb.com
This commit is contained in:
@ -3630,10 +3630,17 @@ public:
|
||||
return server_status & SERVER_STATUS_IN_TRANS;
|
||||
}
|
||||
void give_protection_error();
|
||||
/*
|
||||
Give an error if any of the following is true for this connection
|
||||
- BACKUP STAGE is active
|
||||
- FLUSH TABLE WITH READ LOCK is active
|
||||
- BACKUP LOCK table_name is active
|
||||
*/
|
||||
inline bool has_read_only_protection()
|
||||
{
|
||||
if (current_backup_stage == BACKUP_FINISHED &&
|
||||
!global_read_lock.is_acquired())
|
||||
!global_read_lock.is_acquired() &&
|
||||
!mdl_backup_lock)
|
||||
return FALSE;
|
||||
give_protection_error();
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user