Commit 73a2ae9f authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-23764 Slave crashes in ha_storage_engine_is_enabled upon rename of view

view_pseudo_hton cannot be dereferenced
parent 3cd4d8dd
...@@ -93,7 +93,8 @@ id ...@@ -93,7 +93,8 @@ id
80 80
40 40
connection master; connection master;
DROP VIEW v1; RENAME TABLE v1 TO v2;
DROP VIEW v2;
DROP TABLE t1; DROP TABLE t1;
DROP VIEW v1; DROP VIEW v1;
ERROR 42S02: Unknown VIEW: 'test.v1' ERROR 42S02: Unknown VIEW: 'test.v1'
......
...@@ -38,7 +38,8 @@ SELECT * FROM t1; ...@@ -38,7 +38,8 @@ SELECT * FROM t1;
SELECT * FROM v1; SELECT * FROM v1;
connection master; connection master;
DROP VIEW v1; RENAME TABLE v1 TO v2;
DROP VIEW v2;
DROP TABLE t1; DROP TABLE t1;
--error ER_UNKNOWN_VIEW --error ER_UNKNOWN_VIEW
......
...@@ -303,7 +303,8 @@ do_rename(THD *thd, TABLE_LIST *ren_table, const LEX_CSTRING *new_db, ...@@ -303,7 +303,8 @@ do_rename(THD *thd, TABLE_LIST *ren_table, const LEX_CSTRING *new_db,
DBUG_RETURN(skip_error || if_exists ? 0 : 1); DBUG_RETURN(skip_error || if_exists ? 0 : 1);
} }
if (ha_check_if_updates_are_ignored(thd, hton, "RENAME")) if (hton != view_pseudo_hton &&
ha_check_if_updates_are_ignored(thd, hton, "RENAME"))
{ {
/* /*
Shared table. Just drop the old .frm as it's not correct anymore Shared table. Just drop the old .frm as it's not correct anymore
......
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