summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index e6a906a43c1..cec410a0e62 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -474,7 +474,8 @@ int mysql_update(THD *thd,
goto err;
}
}
- init_ftfuncs(thd, select_lex, 1);
+ if (init_ftfuncs(thd, select_lex, 1))
+ goto err;
table->mark_columns_needed_for_update();
@@ -545,7 +546,8 @@ int mysql_update(THD *thd,
*/
if (thd->lex->describe)
goto produce_explain_and_leave;
- explain= query_plan.save_explain_update_data(query_plan.mem_root, thd);
+ if (!(explain= query_plan.save_explain_update_data(query_plan.mem_root, thd)))
+ goto err;
ANALYZE_START_TRACKING(&explain->command_tracker);
@@ -1103,7 +1105,8 @@ produce_explain_and_leave:
We come here for various "degenerate" query plans: impossible WHERE,
no-partitions-used, impossible-range, etc.
*/
- query_plan.save_explain_update_data(query_plan.mem_root, thd);
+ if (!query_plan.save_explain_update_data(query_plan.mem_root, thd))
+ goto err;
emit_explain_and_leave:
int err2= thd->lex->explain->send_explain(thd);
@@ -1836,7 +1839,7 @@ int multi_update::prepare(List<Item> &not_used_values,
switch_to_nullable_trigger_fields(*values_for_table[i], table);
}
}
- copy_field= new Copy_field[max_fields];
+ copy_field= new (thd->mem_root) Copy_field[max_fields];
DBUG_RETURN(thd->is_fatal_error != 0);
}