diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
commit | 6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch) | |
tree | 48ba2cbdda863b644108e93ace3668333ae0d193 /sql/sql_class.cc | |
parent | ea91bb6801b1b619d64fa137ea351eca9de683ec (diff) | |
parent | 5bbe929d706e26cb3f9b291da6009526a17b1545 (diff) | |
download | mariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 16773ab3018..0ae95ef5de1 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -6942,10 +6942,18 @@ void THD::rgi_lock_temporary_tables() temporary_tables= rgi_slave->rli->save_temporary_tables; } -void THD::rgi_unlock_temporary_tables() +void THD::rgi_unlock_temporary_tables(bool clear) { rgi_slave->rli->save_temporary_tables= temporary_tables; mysql_mutex_unlock(&rgi_slave->rli->data_lock); + if (clear) + { + /* + Temporary tables are shared with other by sql execution threads. + As a safety messure, clear the pointer to the common area. + */ + temporary_tables= 0; + } } bool THD::rgi_have_temporary_tables() |