diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2006-12-22 09:29:28 +0400 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2006-12-22 09:29:28 +0400 |
commit | 294ae90d9c8e997f481a982fde926203864b4591 (patch) | |
tree | ddd29b141c9a275f24f6361a13d2e0f413c8c5c5 /sql/item.h | |
parent | 6a304f3fc19fd4dcde5bb9c0c580b8f0f77dd439 (diff) | |
download | mariadb-git-294ae90d9c8e997f481a982fde926203864b4591.tar.gz |
Fix for bug #21976: Unnecessary warning with count(decimal)
We use val_int() calls (followed by null_value check) to determine
nullness in some Item_sum_count' and Item_sum_count_distinct' methods,
as a side effect we get extra warnings raised in the val_int().
Fix: use is_null() instead.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/item.h b/sql/item.h index 0cfb0b01fd8..eb98ecd6021 100644 --- a/sql/item.h +++ b/sql/item.h @@ -701,12 +701,11 @@ public: virtual bool get_date_result(TIME *ltime,uint fuzzydate) { return get_date(ltime,fuzzydate); } /* - This function is used only in Item_func_isnull/Item_func_isnotnull - (implementations of IS NULL/IS NOT NULL clauses). Item_func_is{not}null - calls this method instead of one of val/result*() methods, which - normally will set null_value. This allows to determine nullness of - a complex expression without fully evaluating it. - Any new item which can be NULL must implement this call. + The method allows to determine nullness of a complex expression + without fully evaluating it, instead of calling val/result*() then + checking null_value. Used in Item_func_isnull/Item_func_isnotnull + and Item_sum_count/Item_sum_count_distinct. + Any new item which can be NULL must implement this method. */ virtual bool is_null() { return 0; } |