mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-24830 : Write a warning to error log if Galera replicates InnoDB table with no primary key
Two new features for Galera * Write a warning to error log if Galera replicates table with storage engine not supported by Galera (at the moment only InnoDB is supported ** Warning is pushed to client also ** MyISAM is allowed if wsrep_replicate_myisam=ON * Write a warning to error log if Galera replicates table with no primary key ** Warning is pushed to client also ** MyISAM is allowed if wsrep_relicate_myisam=ON * In both cases apply flood control if > 10 same warning is writen to error log (requires log_warnings > 1), flood control will suppress warnings for 300 seconds
This commit is contained in:
@ -4431,13 +4431,16 @@ restart:
|
||||
tbl->reginfo.lock_type= tables->lock_type;
|
||||
}
|
||||
#ifdef WITH_WSREP
|
||||
/*
|
||||
/*
|
||||
At this point we have SE associated with table so we can check wsrep_mode
|
||||
rules at this point.
|
||||
*/
|
||||
if (WSREP(thd) &&
|
||||
if (WSREP(thd) &&
|
||||
wsrep_thd_is_local(thd) &&
|
||||
!wsrep_check_mode_after_open_table(thd, tbl->file->ht->db_type))
|
||||
tbl &&
|
||||
tables == *start &&
|
||||
!wsrep_check_mode_after_open_table(thd,
|
||||
tbl->file->ht, tables))
|
||||
{
|
||||
error= TRUE;
|
||||
goto error;
|
||||
@ -4445,35 +4448,7 @@ restart:
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP(thd) &&
|
||||
wsrep_replicate_myisam &&
|
||||
(*start) &&
|
||||
(*start)->table &&
|
||||
(*start)->table->file->ht == myisam_hton &&
|
||||
wsrep_thd_is_local(thd) &&
|
||||
!is_stat_table(&(*start)->db, &(*start)->alias) &&
|
||||
thd->get_command() != COM_STMT_PREPARE &&
|
||||
((thd->lex->sql_command == SQLCOM_INSERT ||
|
||||
thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
|
||||
thd->lex->sql_command == SQLCOM_REPLACE ||
|
||||
thd->lex->sql_command == SQLCOM_REPLACE_SELECT ||
|
||||
thd->lex->sql_command == SQLCOM_UPDATE ||
|
||||
thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
|
||||
thd->lex->sql_command == SQLCOM_LOAD ||
|
||||
thd->lex->sql_command == SQLCOM_DELETE)))
|
||||
{
|
||||
wsrep_before_rollback(thd, true);
|
||||
wsrep_after_rollback(thd, true);
|
||||
wsrep_after_statement(thd);
|
||||
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start));
|
||||
}
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
error:
|
||||
#ifdef WITH_WSREP
|
||||
wsrep_error_label:
|
||||
#endif
|
||||
THD_STAGE_INFO(thd, stage_after_opening_tables);
|
||||
thd_proc_info(thd, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user