mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
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.
This commit is contained in:
parent
7b555ff2c5
commit
cf3adaaa9e
3 changed files with 33 additions and 3 deletions
14
mysql-test/suite/galera/r/MDEV-25494.result
Normal file
14
mysql-test/suite/galera/r/MDEV-25494.result
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
SET SESSION binlog_format=STATEMENT;
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
|
||||||
|
CREATE TEMPORARY TABLE t (i INT) UNION=(t);
|
||||||
|
ALTER TABLE t ADD extrac CHAR(1);
|
||||||
|
SHOW CREATE TABLE t;
|
||||||
|
Table Create Table
|
||||||
|
t CREATE TEMPORARY TABLE `t` (
|
||||||
|
`i` int(11) DEFAULT NULL,
|
||||||
|
`extrac` char(1) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
DROP TABLE t;
|
7
mysql-test/suite/galera/t/MDEV-25494.test
Normal file
7
mysql-test/suite/galera/t/MDEV-25494.test
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
|
||||||
|
SET SESSION binlog_format=STATEMENT;
|
||||||
|
CREATE TEMPORARY TABLE t (i INT) UNION=(t);
|
||||||
|
ALTER TABLE t ADD extrac CHAR(1);
|
||||||
|
SHOW CREATE TABLE t;
|
||||||
|
DROP TABLE t;
|
|
@ -1201,14 +1201,23 @@ wsrep_append_fk_parent_table(THD* thd, TABLE_LIST* tables, wsrep::key_array* key
|
||||||
bool fail= false;
|
bool fail= false;
|
||||||
TABLE_LIST *table;
|
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();
|
thd->release_transactional_locks();
|
||||||
uint counter;
|
uint counter;
|
||||||
MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
|
MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
|
||||||
|
|
||||||
if (thd->open_temporary_tables(tables) ||
|
if (open_tables(thd, &tables, &counter, MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL))
|
||||||
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;
|
fail= true;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue