mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#3339 (Issue warnings when statement-based replication may fail):
Replacing binlog_row_based_if_mixed with variable binlog_stmt_flags holding several flags and adding member functions to manipulate the flags. Added code to generate a warning when an attempt to log an unsafe statement to the binary log was made. The warning is both pushed to the SHOW WARNINGS table and written to the error log. The prevent flooding the error log, the warning is just written to the error log once per open session.
This commit is contained in:
@ -1048,6 +1048,17 @@ public:
|
||||
|
||||
private:
|
||||
uint binlog_table_maps; // Number of table maps currently in the binlog
|
||||
|
||||
enum enum_binlog_flag {
|
||||
BINLOG_FLAG_UNSAFE_STMT_PRINTED,
|
||||
BINLOG_FLAG_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
Flags with per-thread information regarding the status of the
|
||||
binary log.
|
||||
*/
|
||||
uint32 binlog_flags;
|
||||
public:
|
||||
uint get_binlog_table_maps() const {
|
||||
return binlog_table_maps;
|
||||
@ -1599,6 +1610,7 @@ public:
|
||||
void restore_sub_statement_state(Sub_statement_state *backup);
|
||||
void set_n_backup_active_arena(Query_arena *set, Query_arena *backup);
|
||||
void restore_active_arena(Query_arena *set, Query_arena *backup);
|
||||
|
||||
inline void set_current_stmt_binlog_row_based_if_mixed()
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user