summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-10-30 15:15:43 +0200
committerGeorgi Kodinov <joro@sun.com>2009-10-30 15:15:43 +0200
commit9d96cd6dcb3f171cbbe93c0f7061ce132a9087a7 (patch)
tree35ed35ec715be27cf87f8f67132283e347b9643b /sql/sql_class.cc
parent851e250953e531c2c5189dff0d7202cb79acf5d6 (diff)
downloadmariadb-git-9d96cd6dcb3f171cbbe93c0f7061ce132a9087a7.tar.gz
Bug #48291 : crash with row() operator,select into @var, and
subquery returning multiple rows Error handling was missing when handling subqueires in WHERE and when assigning a SELECT result to a @variable. This caused crash(es). Fixed by adding error handling code to both the WHERE condition evaluation and to assignment to an @variable.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 7d26759cb16..06f2229a050 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2068,9 +2068,11 @@ bool select_dumpvar::send_data(List<Item> &items)
else
{
Item_func_set_user_var *suv= new Item_func_set_user_var(mv->s, item);
- suv->fix_fields(thd, 0);
+ if (suv->fix_fields(thd, 0))
+ DBUG_RETURN (1);
suv->save_item_result(item);
- suv->update();
+ if (suv->update())
+ DBUG_RETURN (1);
}
}
DBUG_RETURN(0);