Commit 25cb2b37 authored by Jan Lindström's avatar Jan Lindström

MDEV-22128 : Server with wsrep_on crashes in do_rename upon RENAME TABLE on a view

We need to make sure that hton is not same as view_pseudo_hton
that is not NULL but not usable.
parent e545a60b
connection node_2;
connection node_1;
CREATE VIEW v AS SELECT 1;
RENAME TABLE v TO v2;
DROP VIEW v2;
--source include/galera_cluster.inc
CREATE VIEW v AS SELECT 1;
RENAME TABLE v TO v2;
# Cleanup
DROP VIEW v2;
......@@ -323,7 +323,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, const LEX_CSTRING *new_db,
DBUG_ASSERT(!thd->locked_tables_mode);
#ifdef WITH_WSREP
if (WSREP(thd) && hton &&
if (WSREP(thd) && hton && hton != view_pseudo_hton &&
!wsrep_should_replicate_ddl(thd, hton->db_type))
DBUG_RETURN(1);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment