diff options
author | unknown <igor@olga.mysql.com> | 2007-06-14 18:55:07 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-06-14 18:55:07 -0700 |
commit | 36f8bfb22eda01d6d09c29007fe98d4a29610076 (patch) | |
tree | 799e301ff8d768ed960a74db8d9c00e028bb9e57 /sql/item_func.cc | |
parent | bcd6183fe7f242648ce6e04c8224c98531f1cbff (diff) | |
download | mariadb-git-36f8bfb22eda01d6d09c29007fe98d4a29610076.tar.gz |
Fixed bug #27932: the function LOCATE returned NULL if any
of its arguments was evaluated to NULL, while the predicate
LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE.
This happened because the Item_func_locate::fix_length_and_dec
method by mistake set the value of the maybe_null flag for
the function item to 0. In consequence of this the function
was considered as the one that could not ever return NULL.
mysql-test/r/func_str.result:
Added a test case for bug #27932.
mysql-test/t/func_str.test:
Added a test case for bug #27932.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index ab4a9c50332..17a2c584e9d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2507,7 +2507,6 @@ longlong Item_func_coercibility::val_int() void Item_func_locate::fix_length_and_dec() { - maybe_null= 0; max_length= MY_INT32_NUM_DECIMAL_DIGITS; agg_arg_charsets(cmp_collation, args, 2, MY_COLL_CMP_CONV, 1); } |