server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-27861: Creating partitioned tables should not be allowed with ws…

Open janlindstrom opened this issue 1 year ago • 0 comments

…rep_osu_method=TOI and wsrep_strict_ddl=ON

  • [x] The Jira issue number for this PR is: MDEV-27861

Description

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.

How can this PR be tested?

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended. Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature and the PR is based against the latest MariaDB development branch.
  • [ x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [x ] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [ x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

janlindstrom avatar Jul 27 '23 05:07 janlindstrom