1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
Rinat Ibragimov
2020-10-21 23:34:36 +03:00
committed by Monty
parent ac8d205795
commit 709ba7dcae
10 changed files with 277 additions and 4 deletions

View File

@ -780,7 +780,7 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_ALTER_SERVER]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DROP_SERVER]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_BACKUP]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_BACKUP_LOCK]= 0;
sql_command_flags[SQLCOM_BACKUP_LOCK]= CF_AUTO_COMMIT_TRANS;
/*
The following statements can deal with temporary tables,
@ -5002,6 +5002,13 @@ mysql_execute_command(THD *thd)
goto error;
}
/* Should not lock tables while BACKUP LOCK is active */
if (thd->mdl_backup_lock)
{
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
goto error;
}
/*
Here we have to pre-open temporary tables for LOCK TABLES.