diff options
author | unknown <monty@tik.mysql.fi> | 2002-03-02 09:51:24 +0200 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2002-03-02 09:51:24 +0200 |
commit | ad4fcb8a01f297f914e9e75d44b04e10fd91eb97 (patch) | |
tree | 7c46a4aab7560f176209fe10d40e1ec2df488a46 /sql/item_sum.h | |
parent | ae670b76660fd66d046fd96af88be303c1d91006 (diff) | |
download | mariadb-git-ad4fcb8a01f297f914e9e75d44b04e10fd91eb97.tar.gz |
Fix sorting of NULL values (Should always be first)
Fix problem with HAVING and MAX() IS NOT NULL
Docs/manual.texi:
Changelog & NULL usage with ORDER BY
client/mysqldump.c:
Cleanup disable keys
mysql-test/r/distinct.result:
Fix results after ORDER BY with NULL fix
mysql-test/r/group_by.result:
Fix results after ORDER BY with NULL fix
mysql-test/r/having.result:
Testcase for bug with HAVING
mysql-test/t/distinct.test:
Test for DISTINCT + ORDER BY DESC bug
mysql-test/t/having.test:
Test of HAVING and MAX IS NOT NULL
sql/filesort.cc:
Fix sorting of NULL values (Should always be first)
sql/item.h:
Fix problem with HAVING and MAX() IS NOT NULL
sql/item_sum.h:
Fix problem with HAVING and MAX() IS NOT NULL
sql/opt_range.cc:
Fix problem with HAVING and MAX() IS NOT NULL
sql/opt_range.h:
Fix sorting of NULL values
sql/sql_select.cc:
Fix sorting of ORDER BY ... DESC on NULL values.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 4840ae8298d..a963799b6a7 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -64,6 +64,7 @@ public: { return new Item_field(field);} table_map used_tables() const { return ~(table_map) 0; } /* Not used */ bool const_item() const { return 0; } + bool is_null() { return null_value; } void update_used_tables() { } void make_field(Send_field *field); void print(String *str); @@ -202,6 +203,7 @@ public: enum Type type() const { return FIELD_AVG_ITEM; } double val(); longlong val_int() { return (longlong) val(); } + bool is_null() { (void) val_int(); return null_value; } String *val_str(String*); void make_field(Send_field *field); void fix_length_and_dec() {} @@ -239,6 +241,7 @@ public: double val(); longlong val_int() { return (longlong) val(); } String *val_str(String*); + bool is_null() { (void) val_int(); return null_value; } void make_field(Send_field *field); void fix_length_and_dec() {} }; |