From 5f1f2fc0e443f098af24d21f7d1ec1a8166a4030 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sat, 15 Jun 2013 18:32:08 +0300 Subject: Applied all changes from Igor and Sanja --- sql/sql_update.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 0d1cb7de5f2..eab8b3af84c 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -138,7 +138,7 @@ static bool check_fields(THD *thd, List &items) while ((item= it++)) { - if (!(field= item->filed_for_view_update())) + if (!(field= item->field_for_view_update())) { /* item has name, because it comes from VIEW SELECT list */ my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), item->name); @@ -824,7 +824,7 @@ int mysql_update(THD *thd, } else table->file->unlock_row(); - thd->warning_info->inc_current_row_for_warning(); + thd->get_stmt_da()->inc_current_row_for_warning(); if (thd->is_error()) { error= 1; @@ -932,7 +932,7 @@ int mysql_update(THD *thd, char buff[MYSQL_ERRMSG_SIZE]; my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated, - (ulong) thd->warning_info->statement_warn_count()); + (ulong) thd->get_stmt_da()->statement_warn_count()); my_ok(thd, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated, id, buff); DBUG_PRINT("info",("%ld records updated", (long) updated)); @@ -1117,7 +1117,7 @@ bool unsafe_key_update(List leaves, table_map tables_for_update) // The primary key can cover multiple columns KEY key_info= table1->key_info[table1->s->primary_key]; KEY_PART_INFO *key_part= key_info.key_part; - KEY_PART_INFO *key_part_end= key_part + key_info.key_parts; + KEY_PART_INFO *key_part_end= key_part + key_info.user_defined_key_parts; for (;key_part != key_part_end; ++key_part) { -- cgit v1.2.1 From 2534521f9a7d66b48cb9ca9402e82a0c58b156d8 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 18 Jun 2013 02:01:34 +0300 Subject: Fixed some merge issues: - temporary tables now works - mysql-system_tables updated to not use temporary tables - PASSWORD() function fixed - Support for STATS_AUTO_RECALC, STATS_PERSISTENT and STATS_SAMPLE_PAGES table options --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index eab8b3af84c..1dd83fa8865 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -932,7 +932,7 @@ int mysql_update(THD *thd, char buff[MYSQL_ERRMSG_SIZE]; my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated, - (ulong) thd->get_stmt_da()->statement_warn_count()); + (ulong) thd->get_stmt_da()->current_statement_warn_count()); my_ok(thd, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated, id, buff); DBUG_PRINT("info",("%ld records updated", (long) updated)); -- cgit v1.2.1 From dfcc502ab540b4d93fe3d40d0bac15fa3ae449dd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Jun 2013 14:32:14 +0300 Subject: Finished merging wl5986 started by Igor. --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 1dd83fa8865..cf853ffaed7 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1829,7 +1829,7 @@ multi_update::~multi_update() } -int multi_update::send_data(List ¬_used_values) +bool multi_update::send_data(List ¬_used_values) { TABLE_LIST *cur_table; DBUG_ENTER("multi_update::send_data"); -- cgit v1.2.1 From e7606294b2bbd70be118cc81c5818dc643a770bf Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Jun 2013 13:17:27 +0300 Subject: A fix of unions with duplicate rows and returning bug fix for lp:732124 union + limit returns wrong result --- sql/sql_update.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index cf853ffaed7..1dd83fa8865 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1829,7 +1829,7 @@ multi_update::~multi_update() } -bool multi_update::send_data(List ¬_used_values) +int multi_update::send_data(List ¬_used_values) { TABLE_LIST *cur_table; DBUG_ENTER("multi_update::send_data"); -- cgit v1.2.1