Commit c7ab6761 authored by Jan Lindström's avatar Jan Lindström

MDEV-22075 : Server crashes in wsrep_should_replicate_ddl_iterate upon CREATE VIEW

Fixed incorrect pointer reference when table is not available.
parent 6cf8f05f
connection node_2;
connection node_1;
CREATE OR REPLACE VIEW v AS WITH cte AS ( SELECT 1 ) SELECT * FROM cte;
DROP VIEW v;
--source include/galera_cluster.inc
CREATE OR REPLACE VIEW v AS WITH cte AS ( SELECT 1 ) SELECT * FROM cte;
# Cleanup
DROP VIEW v;
......@@ -1744,7 +1744,8 @@ bool wsrep_should_replicate_ddl_iterate(THD* thd, const TABLE_LIST* table_list)
{
for (const TABLE_LIST* it= table_list; it; it= it->next_global)
{
if (!wsrep_should_replicate_ddl(thd, it->table->s->db_type()->db_type))
if (it->table &&
!wsrep_should_replicate_ddl(thd, it->table->s->db_type()->db_type))
return false;
}
}
......
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