diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-30 15:15:43 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-30 15:15:43 +0200 |
commit | 9d96cd6dcb3f171cbbe93c0f7061ce132a9087a7 (patch) | |
tree | 35ed35ec715be27cf87f8f67132283e347b9643b /sql/sql_class.cc | |
parent | 851e250953e531c2c5189dff0d7202cb79acf5d6 (diff) | |
download | mariadb-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.cc | 6 |
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); |