mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
5
mysql-test/suite/galera/r/galera_view.result
Normal file
5
mysql-test/suite/galera/r/galera_view.result
Normal file
@ -0,0 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE VIEW v AS SELECT 1;
|
||||
RENAME TABLE v TO v2;
|
||||
DROP VIEW v2;
|
7
mysql-test/suite/galera/t/galera_view.test
Normal file
7
mysql-test/suite/galera/t/galera_view.test
Normal file
@ -0,0 +1,7 @@
|
||||
--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
|
||||
|
Reference in New Issue
Block a user