summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-07-13 20:36:54 +0300
committerGeorgi Kodinov <joro@sun.com>2009-07-13 20:36:54 +0300
commit8f64c16c259d760e227cb0ab270ad007473cdea2 (patch)
treeb51de7ece35f1ee2f89556f42ea5a616174cdbf7 /sql/sql_update.cc
parentadff023c71e6c2af80ec3b8235d1a0c078995f51 (diff)
parent80dd3a593a2d10281e77c242b827abb5b3a9dd92 (diff)
downloadmariadb-git-8f64c16c259d760e227cb0ab270ad007473cdea2.tar.gz
Merge of the fix for bug #40113 to 5.1.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 17cc683e14a..6884f863326 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -292,7 +292,7 @@ int mysql_update(THD *thd,
if (select_lex->inner_refs_list.elements &&
fix_inner_refs(thd, all_fields, select_lex, select_lex->ref_pointer_array))
- DBUG_RETURN(-1);
+ DBUG_RETURN(1);
if (conds)
{
@@ -332,7 +332,14 @@ int mysql_update(THD *thd,
{
delete select;
free_underlaid_joins(thd, select_lex);
- if (error)
+ /*
+ There was an error or the error was already sent by
+ the quick select evaluation.
+ TODO: Add error code output parameter to Item::val_xxx() methods.
+ Currently they rely on the user checking DA for
+ errors when unwinding the stack after calling Item::val_xxx().
+ */
+ if (error || thd->is_error())
{
DBUG_RETURN(1); // Error in where
}