summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2010-01-29 15:55:35 +0200
committerAndrei Elkin <aelkin@mysql.com>2010-01-29 15:55:35 +0200
commit7db8e764714ddb7901400000fa1dfe45263b4773 (patch)
treefbc37022e71a351e885b0fd3f6c76d1fa4561b1b /sql/sql_base.cc
parent0c3617581e37120942051b19dc7dbfe66cddb672 (diff)
downloadmariadb-git-7db8e764714ddb7901400000fa1dfe45263b4773.tar.gz
Bug #50192 Strange effect in replication test, trigger, auto_increment
The auto-inc unsafe warning makes sense even though it's just one auto-inc table could be involved via a trigger or a stored function. However its content was not updated by bug@45677 fixes continuing to mention two tables whereas the fixes refined semantics of replication of auto_increment in stored routine. Fixed with updating the error message, renaming the error and an internal unsafe-condition constants. A documentation notice ====================== Inserting into an autoincrement column in a stored function or a trigger is unsafe for replication. Even with just one autoincrement column, if the routine is invoked more than once slave is not guaranteed to execute the statement graph same way as the master. And since it's impossible to estimate how many times a routine can be invoked at the query pre-execution phase (see lock_tables), the statement is marked pessimistically unsafe.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index eb59600b360..e7f014d39a5 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5181,7 +5181,7 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
if (thd->variables.binlog_format != BINLOG_FORMAT_ROW && tables &&
has_write_table_with_auto_increment(thd->lex->first_not_own_table()))
{
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_TWO_AUTOINC_COLUMNS);
+ thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS);
thd->set_current_stmt_binlog_format_row_if_mixed();
}
}