1
0
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:
istruewing@stella.local
2008-03-26 10:56:03 +01:00
14 changed files with 152 additions and 31 deletions

View File

@ -859,6 +859,19 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
SELECT_LEX *select_lex= &thd->lex->select_lex;
DBUG_ENTER("mysql_prepare_update");
/*
Statement-based replication of UPDATE ... 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();
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
table_list->grant.want_privilege= table->grant.want_privilege=
(SELECT_ACL & ~table->grant.privilege);