mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
#110 turn off replace into and insert ignore optimizations when binlog format != statement
This commit is contained in:
parent
975c904f16
commit
f2e73c9a6f
1 changed files with 1 additions and 5 deletions
|
@ -396,11 +396,7 @@ static inline bool do_ignore_flag_optimization(THD* thd, TABLE* table, bool opt_
|
|||
if (is_replace_into(thd) || is_insert_ignore(thd)) {
|
||||
uint pk_insert_mode = get_pk_insert_mode(thd);
|
||||
if ((!table->triggers && pk_insert_mode < 2) || pk_insert_mode == 0) {
|
||||
// if bin log row replication is on then ignore the session variable
|
||||
if (mysql_bin_log.is_open() &&
|
||||
(thd->variables.binlog_format != BINLOG_FORMAT_STMT && thd->variables.binlog_format != BINLOG_FORMAT_MIXED)) {
|
||||
do_opt = false;
|
||||
} else {
|
||||
if (mysql_bin_log.is_open() && thd->variables.binlog_format == BINLOG_FORMAT_STMT) {
|
||||
do_opt = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue