diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-05-05 20:41:58 +0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-05-05 20:41:58 +0200 |
commit | 6bee08c61dbb89837edc04de8e49fed411f17770 (patch) | |
tree | 119a0053bfa574d7efee096e23cb467bdfdcea52 /sql/sql_lex.h | |
parent | e9f38910daa8feb7e916773a43f8bd50c6ffc2ef (diff) | |
parent | 75da023da6aea082d30d100e95052bb56738d25b (diff) | |
download | mariadb-git-6bee08c61dbb89837edc04de8e49fed411f17770.tar.gz |
Merge from 5.0-pe-stage into main.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 9f020f4adc5..3e762581e04 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1176,6 +1176,22 @@ typedef struct st_lex : public Query_tables_list bool escape_used; + /* + 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() |