1407
1406
assert(select_lex->offset_limit == 0);
1408
1407
unit->set_limit(select_lex);
1409
res= (up_result= mysql_update(session, all_tables,
1410
select_lex->item_list,
1413
select_lex->order_list.elements,
1414
(order_st *) select_lex->order_list.first,
1415
unit->select_limit_cnt,
1416
lex->duplicates, lex->ignore));
1417
/* mysql_update return 2 if we need to switch to multi-update */
1408
res= mysql_update(session, all_tables,
1409
select_lex->item_list,
1412
select_lex->order_list.elements,
1413
(order_st *) select_lex->order_list.first,
1414
unit->select_limit_cnt,
1415
lex->duplicates, lex->ignore);
1421
1417
case SQLCOM_UPDATE_MULTI:
1423
1419
assert(first_table == all_tables && first_table != 0);
1424
/* if we switched from normal update, rights are checked */
1427
if ((res= multi_update_precheck(session, all_tables)))
1433
res= mysql_multi_update_prepare(session);
1420
if ((res= multi_update_precheck(session, all_tables)))
1423
if ((res= mysql_multi_update_prepare(session)))
1441
1426
res= mysql_multi_update(session, all_tables,
1442
1427
&select_lex->item_list,