diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 10:20:20 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 10:20:20 +0300 |
commit | 28f01f82e1cb682566017b52017469be7638dd49 (patch) | |
tree | d496cb0936d25973b95f6eb591508c2e493032b8 /sql/temporary_tables.cc | |
parent | a3099a3b4a394da360b5c1e7ae6dc985ae2f7f2f (diff) | |
parent | 80ed136e6dd4a021b1fc9b7bd7077bf989c3d247 (diff) | |
download | mariadb-git-bb-10.6-merge.tar.gz |
WIP merge 10.5 to 10.6bb-10.6-merge
FIXME: Disabled tests due to upgrading libmariadb:
main.mysql_client_test main.mysql_client_test_nonblock main.mysql_client_test_comp
Diffstat (limited to 'sql/temporary_tables.cc')
-rw-r--r-- | sql/temporary_tables.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index 1a8b5c471bd..981958abdb2 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2016, 2019, MariaDB Corporation. + Copyright (c) 2016, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -872,10 +872,12 @@ void THD::restore_tmp_table_share(TMP_TABLE_SHARE *share) bool THD::has_temporary_tables() { DBUG_ENTER("THD::has_temporary_tables"); - bool result= (rgi_slave - ? (rgi_slave->rli->save_temporary_tables && - !rgi_slave->rli->save_temporary_tables->is_empty()) - : (has_thd_temporary_tables())); + bool result= +#ifdef HAVE_REPLICATION + rgi_slave ? (rgi_slave->rli->save_temporary_tables && + !rgi_slave->rli->save_temporary_tables->is_empty()) : +#endif + has_thd_temporary_tables(); DBUG_RETURN(result); } @@ -1506,12 +1508,14 @@ bool THD::lock_temporary_tables() DBUG_RETURN(false); } +#ifdef HAVE_REPLICATION if (rgi_slave) { mysql_mutex_lock(&rgi_slave->rli->data_lock); temporary_tables= rgi_slave->rli->save_temporary_tables; m_tmp_tables_locked= true; } +#endif DBUG_RETURN(m_tmp_tables_locked); } @@ -1532,6 +1536,7 @@ void THD::unlock_temporary_tables() DBUG_VOID_RETURN; } +#ifdef HAVE_REPLICATION if (rgi_slave) { rgi_slave->rli->save_temporary_tables= temporary_tables; @@ -1539,6 +1544,7 @@ void THD::unlock_temporary_tables() mysql_mutex_unlock(&rgi_slave->rli->data_lock); m_tmp_tables_locked= false; } +#endif DBUG_VOID_RETURN; } |