diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-02-10 15:26:39 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-02-10 15:26:39 +0100 |
commit | 757a6cd1ad1f41dabfd53b9935c724f4f08ba19b (patch) | |
tree | 00bf4f26d082edb731997dc4180dcdc9f1b2155e /sql/sql_update.cc | |
parent | fad409480e880ccab1c2a5eaafae46d3cb92440f (diff) | |
download | mariadb-git-757a6cd1ad1f41dabfd53b9935c724f4f08ba19b.tar.gz |
Workaround for DTrace-related bugs.
Bumped up version number to 0.2.1
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a0fcb2020a4..49ec1a33873 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1193,19 +1193,20 @@ bool mysql_multi_update(THD *thd, List<Item> *values, COND *conds, ulonglong options, - enum enum_duplicates handle_duplicates, bool ignore, - SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex) + enum enum_duplicates handle_duplicates, + bool ignore, + SELECT_LEX_UNIT *unit, + SELECT_LEX *select_lex, + multi_update **result) { - multi_update *result; bool res; DBUG_ENTER("mysql_multi_update"); - if (!(result= new multi_update(table_list, + if (!(*result= new multi_update(table_list, thd->lex->select_lex.leaf_tables, fields, values, handle_duplicates, ignore))) { - MYSQL_MULTI_UPDATE_DONE(1, 0, 0); DBUG_RETURN(TRUE); } @@ -1221,20 +1222,18 @@ bool mysql_multi_update(THD *thd, (ORDER *)NULL, options | SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK | OPTION_SETUP_TABLES_DONE, - result, unit, select_lex); + *result, unit, select_lex); DBUG_PRINT("info",("res: %d report_error: %d", res, (int) thd->is_error())); res|= thd->is_error(); if (unlikely(res)) { /* If we had a another error reported earlier then this will be ignored */ - result->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR)); - result->abort(); + (*result)->send_error(ER_UNKNOWN_ERROR, ER(ER_UNKNOWN_ERROR)); + (*result)->abort(); } - MYSQL_MULTI_UPDATE_DONE(res, result->num_found(), result->num_updated()); - delete result; thd->abort_on_warning= 0; - DBUG_RETURN(FALSE); + DBUG_RETURN(res); } |