summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-11-06 12:35:49 +0400
committerunknown <ramil@mysql.com>2005-11-06 12:35:49 +0400
commitd1a8ccc12767d31b4353311f71edb14b8a4240d1 (patch)
tree53d260c825548593c1fdd773653a936d61fe83e8 /sql/item_func.cc
parentfb4c949f57b281a232ea581e26b8c48be6c1d873 (diff)
downloadmariadb-git-d1a8ccc12767d31b4353311f71edb14b8a4240d1.tar.gz
Fix for bug #13044: BIT_COUNT with NULL values.
sql/item_func.cc: Fix for bug #13044: BIT_COUNT with NULL values. Always set null_value.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 855e86b2382..e83d1f35db8 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1138,11 +1138,8 @@ longlong Item_func_find_in_set::val_int()
longlong Item_func_bit_count::val_int()
{
ulonglong value= (ulonglong) args[0]->val_int();
- if (args[0]->null_value)
- {
- null_value=1; /* purecov: inspected */
+ if ((null_value= args[0]->null_value))
return 0; /* purecov: inspected */
- }
return (longlong) my_count_bits(value);
}