From 6bbdacae209a1916bdb4d4d4f418d25cb6142d2b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Oct 2007 14:27:21 +0200 Subject: Bug #31884: Assertion + crash in subquery in the SELECT clause. Item_in_subselect's only externally callable method is val_bool(). However the nullability in the wrapper class (Item_in_optimizer) is established by calling the "forbidden" method val_int(). Fixed to use the correct method (val_bool() ) to establish nullability of Item_in_subselect in Item_in_optimizer. mysql-test/r/subselect.result: Bug #31884: test case mysql-test/t/subselect.test: Bug #31884: test case sql/item_subselect.h: Bug #31884: Use the correct method to establish nullability --- sql/item_subselect.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/item_subselect.h') diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 118609671b8..51dcd3ca175 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -306,6 +306,7 @@ public: double val_real(); String *val_str(String*); my_decimal *val_decimal(my_decimal *); + void update_null_value () { (void) val_bool(); } bool val_bool(); void top_level_item() { abort_on_null=1; } inline bool is_top_level_item() { return abort_on_null; } -- cgit v1.2.1