1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-24956: ALTER TABLE not replicated with Galera in MariaDB 10.5.9

`WSREP_CLIENT` is used as condition for starting ALTER/OPTIMIZE/REPAIR TOI.
Using this condition async replicated affected DDL's will not be replicated.
Fixed by removing this condition.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
mkaruza
2021-03-31 14:59:50 +02:00
committed by Jan Lindström
parent 915983e1cc
commit f8488370d6
5 changed files with 269 additions and 6 deletions

View File

@ -447,8 +447,6 @@ dbug_err:
*/
static bool wsrep_toi_replication(THD *thd, TABLE_LIST *tables)
{
if (!WSREP(thd) || !WSREP_CLIENT(thd)) return false;
LEX *lex= thd->lex;
/* only handle OPTIMIZE and REPAIR here */
switch (lex->sql_command)
@ -549,10 +547,13 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
for (table= tables; table; table= table->next_local)
table->table= NULL;
#ifdef WITH_WSREP
if (wsrep_toi_replication(thd, tables))
if (WSREP(thd))
{
WSREP_INFO("wsrep TOI replication of has failed, skipping OPTIMIZE");
goto err;
if(wsrep_toi_replication(thd, tables))
{
WSREP_INFO("wsrep TOI replication of has failed.");
goto err;
}
}
#endif /* WITH_WSREP */