Commit 8b02e02b authored by mkaruza's avatar mkaruza Committed by Jan Lindström

MDEV-25698 SIGSEGV in wsrep_should_replicate_ddl

If temporary internal table is in use `hton` will not be set. Skip check
if DDL should be replicated in this case.
Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
parent 4927bf25
......@@ -10,3 +10,7 @@ Warning 1290 WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table should have
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
DROP TABLE t1;
SET GLOBAL wsrep_mode = default;
SET GLOBAL wsrep_mode = STRICT_REPLICATION;
CREATE VIEW v AS SELECT * FROM JSON_TABLE ('{"a":0}',"$" COLUMNS (a DECIMAL(1,1) path '$.a')) foo;
DROP VIEW v;
SET GLOBAL wsrep_mode = default;
......@@ -15,3 +15,11 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
DROP TABLE t1;
SET GLOBAL wsrep_mode = default;
# MDEV-25698 SIGSEGV in wsrep_should_replicate_ddl
SET GLOBAL wsrep_mode = STRICT_REPLICATION;
CREATE VIEW v AS SELECT * FROM JSON_TABLE ('{"a":0}',"$" COLUMNS (a DECIMAL(1,1) path '$.a')) foo;
DROP VIEW v;
SET GLOBAL wsrep_mode = default;
......@@ -2229,6 +2229,9 @@ bool wsrep_should_replicate_ddl(THD* thd, const handlerton *hton)
if (!wsrep_check_mode(WSREP_MODE_STRICT_REPLICATION))
return true;
if (!hton)
return true;
switch (hton->db_type)
{
case DB_TYPE_INNODB:
......
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