1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge Bug#43230 into mysql-5.1-bugteam

This commit is contained in:
Davi Arnaut
2009-04-03 16:46:00 -03:00
6 changed files with 236 additions and 4 deletions

View File

@@ -1745,6 +1745,22 @@ typedef struct st_lex : public Query_tables_list
bool escape_used;
bool is_lex_started; /* If lex_start() did run. For debugging. */
/*
Special case for SELECT .. FOR UPDATE and LOCK TABLES .. WRITE.
Protect from a impending GRL as otherwise the thread might deadlock
if it starts waiting for the GRL in mysql_lock_tables.
The protection is needed because there is a race between setting
the global read lock and waiting for all open tables to be closed.
The problem is a circular wait where a thread holding "old" open
tables will wait for the global read lock to be released while the
thread holding the global read lock will wait for all "old" open
tables to be closed -- the flush part of flush tables with read
lock.
*/
bool protect_against_global_read_lock;
st_lex();
virtual ~st_lex()