diff options
-rwxr-xr-x | BUILD/build_mccge.sh | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | sql/mysql_priv.h | 3 | ||||
-rw-r--r-- | sql/sql_parse.cc | 32 | ||||
-rw-r--r-- | sql/sql_update.cc | 21 |
5 files changed, 39 insertions, 21 deletions
diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh index 83e1ba4266e..9fe0948b192 100755 --- a/BUILD/build_mccge.sh +++ b/BUILD/build_mccge.sh @@ -1401,7 +1401,7 @@ set_solaris_configs() compiler_flags="$compiler_flags -xregs=frameptr" compiler_flags="$compiler_flags -xO4" elif test "x$fast_flag" = "xgeneric" ; then - compiler_flags="$compiler_flags -xO3" + compiler_flags="$compiler_flags -xO2" else compiler_flags="$compiler_flags -xO" fi diff --git a/configure.in b/configure.in index 9baa574829d..67f58f05d2b 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.31-pv-0.2.0) +AM_INIT_AUTOMAKE(mysql, 5.1.31-pv-0.2.1) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 3d856dd532e..6367dfee91e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1226,7 +1226,8 @@ bool mysql_multi_update(THD *thd, TABLE_LIST *table_list, List<Item> *fields, List<Item> *values, COND *conds, ulonglong options, enum enum_duplicates handle_duplicates, bool ignore, - SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex); + SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex, + multi_update **result); bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table, List<Item> &fields, List_item *values, List<Item> &update_fields, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 074d53735de..50a55c3a587 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3046,13 +3046,31 @@ end_with_restore_list: #ifdef HAVE_REPLICATION } /* unlikely */ #endif - MYSQL_MULTI_UPDATE_START(thd->query); - res= mysql_multi_update(thd, all_tables, - &select_lex->item_list, - &lex->value_list, - select_lex->where, - select_lex->options, - lex->duplicates, lex->ignore, unit, select_lex); + { + multi_update *result_obj; + MYSQL_MULTI_UPDATE_START(thd->query); + res= mysql_multi_update(thd, all_tables, + &select_lex->item_list, + &lex->value_list, + select_lex->where, + select_lex->options, + lex->duplicates, + lex->ignore, + unit, + select_lex, + &result_obj); + if (result_obj) + { + MYSQL_MULTI_UPDATE_DONE(res, result_obj->num_found(), + result_obj->num_updated()); + res= FALSE; /* Ignore errors here */ + delete result_obj; + } + else + { + MYSQL_MULTI_UPDATE_DONE(1, 0, 0); + } + } break; } case SQLCOM_REPLACE: 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); } |