1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

MDEV-13911 Support ORDER BY and LIMIT in multi-table update

This commit is contained in:
Sergei Golubchik
2017-09-26 10:28:00 +02:00
parent b6a5be9eaa
commit 26ff92f7ac
5 changed files with 51 additions and 15 deletions

View File

@@ -4525,6 +4525,7 @@ end_with_restore_list:
else
res= 0;
unit->set_limit(select_lex);
res= mysql_multi_update_prepare(thd);
#ifdef HAVE_REPLICATION
@@ -9059,7 +9060,6 @@ Item * all_any_subquery_creator(THD *thd, Item *left_expr,
bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
{
const char *msg= 0;
TABLE_LIST *table;
LEX *lex= thd->lex;
SELECT_LEX *select_lex= &lex->select_lex;
@@ -9115,15 +9115,6 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
}
}
if (select_lex->order_list.elements)
msg= "ORDER BY";
else if (select_lex->select_limit)
msg= "LIMIT";
if (msg)
{
my_error(ER_WRONG_USAGE, MYF(0), "UPDATE", msg);
DBUG_RETURN(TRUE);
}
DBUG_RETURN(FALSE);
}