diff options
author | unknown <monty@mashka.mysql.fi> | 2003-02-03 20:20:32 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-02-03 20:20:32 +0200 |
commit | 8c1c18fbc9772b311c19eec2f7f2bbda29f3e15e (patch) | |
tree | 9969b64873b025006c1eb0dba4dddc67e5501c19 /sql/item_sum.h | |
parent | 0aebbb9e96e881c7d9690aa182e894d14e4903b3 (diff) | |
download | mariadb-git-8c1c18fbc9772b311c19eec2f7f2bbda29f3e15e.tar.gz |
Fix for MIN/MAX with empty tables
MIN(key_column) could in some cases return NULL on a column with NULL and other values.
MIN(key_column) and MAX(key_column) could in some cases return wrong values when used in OUTER JOIN.
configure.in:
Updated version number
libmysqld/libmysqld.c:
Portability fix (for windows)
mysql-test/r/func_group.result:
Added test case for MIN/MAX problems
mysql-test/t/func_group.test:
Added test case for MIN/MAX problems
sql/item.h:
Fix for MIN/MAX with empty tables
sql/item_sum.h:
Fix for MIN/MAX with empty tables
sql/opt_sum.cc:
MIN(key_column) could in some cases return NULL on a column
with NULL and other values.
MIN(key_column) and MAX(key_column) could in some cases
return wrong values when used in OUTER JOIN.
sql/sql_select.cc:
Fix for MIN/MAX with empty tables
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 2cf92343ebb..04f95dfd778 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -69,6 +69,7 @@ public: void make_field(Send_field *field); void print(String *str); void fix_num_length_and_dec(); + void no_rows_in_result() { reset(); } virtual bool setup(THD *thd) {return 0;} unsigned int size_of() { return sizeof(*this);} }; @@ -135,6 +136,7 @@ class Item_sum_count :public Item_sum_int bool const_item() const { return !used_table_cache; } enum Sumfunctype sum_func () const { return COUNT_FUNC; } void reset(); + void no_rows_in_result() { count=0; } bool add(); void make_const(longlong count_arg) { count=count_arg; used_table_cache=0; } longlong val_int(); |