summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.fi>2002-03-02 09:51:24 +0200
committerunknown <monty@tik.mysql.fi>2002-03-02 09:51:24 +0200
commitad4fcb8a01f297f914e9e75d44b04e10fd91eb97 (patch)
tree7c46a4aab7560f176209fe10d40e1ec2df488a46 /sql/filesort.cc
parentae670b76660fd66d046fd96af88be303c1d91006 (diff)
downloadmariadb-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/filesort.cc')
-rw-r--r--sql/filesort.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index a5f42d5731e..7e3d1c96f57 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -452,10 +452,7 @@ static void make_sortkey(register SORTPARAM *param,
{
if (field->is_null())
{
- if (sort_field->reverse)
- bfill(to,sort_field->length+1,(char) 255);
- else
- bzero((char*) to,sort_field->length+1);
+ bzero((char*) to,sort_field->length+1);
to+= sort_field->length+1;
continue;
}