1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-40929 : CREATE TABLE ... AS SELECT is not replicated in Galera when the table is partitioned

Problem was that check for partitioned tables was missing
because then partition implementing handlerton should be used in
condition instead.

Thanks to Roel Van de Paar <roel.vandepaar@mariadb.com> for
providing test case and fix candidate.
This commit is contained in:
Jan Lindström
2026-09-01 07:21:04 +03:00
committed by Jan Lindström
parent b3830bce9a
commit 1bc9eca856
3 changed files with 60 additions and 2 deletions

View File

@@ -5404,8 +5404,12 @@ bool select_create::send_eof()
if (!table->s->tmp_table)
{
#ifdef WITH_WSREP
// For partitioned tables need to look implementing hton
const handlerton* ht= table->file->partition_ht() ?
table->file->partition_ht() :
table->file->ht;
if (WSREP(thd) &&
table->file->ht->db_type == DB_TYPE_INNODB)
ht->db_type == DB_TYPE_INNODB)
{
if (thd->wsrep_trx_id() == WSREP_UNDEFINED_TRX_ID)
{