mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge stella.local:/home2/mydev/mysql-5.1-ateam
into stella.local:/home2/mydev/mysql-5.1-axmrg
This commit is contained in:
@ -418,6 +418,19 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
|
||||
DBUG_ENTER("mysql_prepare_delete");
|
||||
List<Item> all_fields;
|
||||
|
||||
/*
|
||||
Statement-based replication of DELETE ... LIMIT is not safe as order of
|
||||
rows is not defined, so in mixed mode we go to row-based.
|
||||
|
||||
Note that we may consider a statement as safe if ORDER BY primary_key
|
||||
is present. However it may confuse users to see very similiar statements
|
||||
replicated differently.
|
||||
*/
|
||||
if (thd->lex->current_select->select_limit)
|
||||
{
|
||||
thd->lex->set_stmt_unsafe();
|
||||
thd->set_current_stmt_binlog_row_based_if_mixed();
|
||||
}
|
||||
thd->lex->allow_sum_func= 0;
|
||||
if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
|
||||
&thd->lex->select_lex.top_join_list,
|
||||
|
Reference in New Issue
Block a user