summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2022-01-11 13:53:34 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2022-01-18 07:10:48 +0200
commitcf3adaaa9e045e57e0460e48ea77c4f6a700c9ba (patch)
treeed009682e57ff6e8debc090aac0c42270c072eca /sql/wsrep_mysqld.cc
parent7b555ff2c5cd5e7436cf9151790889aa9bcd6a70 (diff)
downloadmariadb-git-cf3adaaa9e045e57e0460e48ea77c4f6a700c9ba.tar.gz
MDEV-25494 : Assertion `tl->table == __null' failed in bool THD::open_temporary_table(TABLE_LIST*)
There is no need to open or process temporary tables at wsrep_append_fk_parent_table.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index f2b04393340..7d682f6e997 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1201,14 +1201,23 @@ wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* tables, wsrep::key_array* key
bool fail= false;
TABLE_LIST *table;
+ for (table= tables; table; table= table->next_local)
+ {
+ if (is_temporary_table(table))
+ {
+ WSREP_DEBUG("Temporary table %s.%s already opened query=%s", table->db.str,
+ table->table_name.str, wsrep_thd_query(thd));
+ return false;
+ }
+ }
+
thd->release_transactional_locks();
uint counter;
MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
- if (thd->open_temporary_tables(tables) ||
- open_tables(thd, &tables, &counter, MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL))
+ if (open_tables(thd, &tables, &counter, MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL))
{
- WSREP_DEBUG("unable to open table for FK checks for %s", thd->query());
+ WSREP_DEBUG("Unable to open table for FK checks for %s", wsrep_thd_query(thd));
fail= true;
goto exit;
}