diff options
author | unknown <bell@sanja.is.com.ua> | 2002-10-07 22:21:17 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-10-07 22:21:17 +0300 |
commit | 31568581c557b8ed8d6b47874e50ddca808227e6 (patch) | |
tree | de3d4ce5401de2dc95a2a7ffa5f95a71b64f0f0e /sql | |
parent | 72a3c80dbb131339406ec4a815f423a1bd8926cc (diff) | |
download | mariadb-git-31568581c557b8ed8d6b47874e50ddca808227e6.tar.gz |
fixed error handling bug
mysql-test/r/subselect.result:
test for error handling bug
mysql-test/t/subselect.test:
test for error handling bug
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_subselect.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 99fc0bcdb67..7e0b2e201ec 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -119,21 +119,30 @@ Item::Type Item_subselect::type() const double Item_singleval_subselect::val () { if (engine->exec()) + { + assign_null(); return 0; + } return real_value; } longlong Item_singleval_subselect::val_int () { if (engine->exec()) + { + assign_null(); return 0; + } return int_value; } String *Item_singleval_subselect::val_str (String *str) { if (engine->exec() || null_value) + { + assign_null(); return 0; + } return &str_value; } @@ -157,21 +166,30 @@ void Item_exists_subselect::fix_length_and_dec() double Item_exists_subselect::val () { if (engine->exec()) + { + assign_null(); return 0; + } return (double) value; } longlong Item_exists_subselect::val_int () { if (engine->exec()) + { + assign_null(); return 0; + } return value; } String *Item_exists_subselect::val_str(String *str) { if (engine->exec()) + { + assign_null(); return 0; + } str->set(value); return str; } |