1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Sdditional fix-up for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock

FLUSH LOGS should ignore SET GLOBAL READ_ONLY.
This commit is contained in:
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2007-06-18 22:22:31 +05:00
parent 6ab97748fe
commit 5b22bc3bd5
3 changed files with 10 additions and 7 deletions

View File

@@ -4020,9 +4020,10 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
TABLE **start,**ptr;
uint lock_flag= MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN;
/* Don't honor the GLOBAL READ LOCK if called from a logger */
/* Ignore GLOBAL READ LOCK and GLOBAL READ_ONLY if called from a logger */
if (logger.is_privileged_thread(thd))
lock_flag|= MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK;
lock_flag|= (MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK |
MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY);
if (!(ptr=start=(TABLE**) thd->alloc(sizeof(TABLE*)*count)))
DBUG_RETURN(-1);