1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34647 : 'INSERT...SELECT' on MyISAM table suddenly replicated by Galera

Replication of MyISAM and Aria DML is experimental and best
effort only. Earlier change make INSERT SELECT on both
MyISAM and Aria to replicate using TOI and STATEMENT
replication. Replication should happen only if user
has set needed wsrep_mode setting.

Note: This commit contains additional changes compared
to those already made for the 10.5 branch.

+ small refactoring after main fix.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
Jan Lindström
2024-07-26 09:04:30 +03:00
committed by Julius Goryavsky
parent b1f7522170
commit a50a5e0f3b
5 changed files with 17 additions and 5 deletions

View File

@@ -4728,8 +4728,11 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
if (!wsrep_toi)
{
/* Currently we support TOI for MyISAM only. */
if (db_type == DB_TYPE_MYISAM && wsrep_replicate_myisam)
if ((db_type == DB_TYPE_MYISAM && wsrep_check_mode(WSREP_MODE_REPLICATE_MYISAM)) ||
(db_type == DB_TYPE_ARIA && wsrep_check_mode(WSREP_MODE_REPLICATE_ARIA)))
{
WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
}
}
}
}