1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Added support for BACKUP LOCK / BACKUP UNLOCK

This commit is contained in:
Michael Widenius
2019-01-14 15:46:49 +02:00
parent 3975e22d55
commit aad0165cea
11 changed files with 186 additions and 10 deletions

View File

@ -772,6 +772,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;
/*
The following statements can deal with temporary tables,
@ -5233,6 +5234,17 @@ end_with_restore_list:
if (!(res= run_backup_stage(thd, lex->backup_stage)))
my_ok(thd);
break;
case SQLCOM_BACKUP_LOCK:
if (check_global_access(thd, RELOAD_ACL))
goto error;
/* first table is set for lock. For unlock the list is empty */
if (first_table)
res= backup_lock(thd, first_table);
else
backup_unlock(thd);
if (!res)
my_ok(thd);
break;
case SQLCOM_CREATE_DB:
{
if (prepare_db_action(thd, lex->create_info.or_replace() ?