mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27861: Creating partitioned tables should not be allowed with wsrep_osu_method=TOI and wsrep_strict_ddl=ON
Problem was incorrect handling of partitioned tables, because db_type == DB_TYPE_PARTITION_DB wsrep_should_replicate_ddl incorrectly marked DDL as not replicatable. However, in partitioned tables we should check implementing storage engine from table->file->partition_ht() if available because if partition handler is InnoDB all DDL should be allowed even with wsrep_strict_ddl. For other storage engines DDL should not be allowed and error should be issued. This is 10.5 version of the fix. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
de216618e2
commit
22414d2ed0
@@ -588,8 +588,12 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
||||
table= tables->table;
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
/* Resolve should we replicate creation of the trigger.
|
||||
It should be replicated if storage engine(s) associated
|
||||
to trigger are replicated by Galera.
|
||||
*/
|
||||
if (WSREP(thd) &&
|
||||
!wsrep_should_replicate_ddl(thd, table->s->db_type()->db_type))
|
||||
!wsrep_should_replicate_ddl_iterate(thd, tables))
|
||||
goto end;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user