summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-04-03 16:46:00 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-04-03 16:46:00 -0300
commitec762cbd8220a5b7c1e1a8c9f1f8dbffac7e64ef (patch)
tree043456df5b0aad4de66f579a537690947263e592 /sql/sql_lex.h
parent48f435316d4ea7fbf344c01d6dcfd3d5d6d4c908 (diff)
parentaebaf079d1611532767dd0c9b183ca73a07b6ac9 (diff)
downloadmariadb-git-ec762cbd8220a5b7c1e1a8c9f1f8dbffac7e64ef.tar.gz
Merge Bug#43230 into mysql-5.1-bugteam
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index f34a1c7c36f..172940cf9d7 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -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()