-
Committer:
Alexey Kopytov
-
Date:
2011-07-05 17:56:02 UTC
-
Revision ID:
akopytov@gmail.com-20110705175602-qd7jupz6e9ur0lz5
Bug #745241: quering global_temporary_tables causes server crash
The problem was in an insufficient locking in
fill_global_temporary_tables(). Iterating thread's temporary_tables list
could lead to race conditions, because other server code assumes that
list to only be accessed by a single (the current) thread at any time.
Fixed by introducing a new mutex in THD protecting the temporary_tables
list and acquiring that mutex when modifying the list or in
fill_global_temporary_tables().