summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-21 03:00:52 +0300
committerunknown <monty@donna.mysql.com>2000-08-21 03:00:52 +0300
commit55c5016f92383fdf7cd14de4ef3ec5afbb89fd5a (patch)
treef46edbbf41f400440bde25519820b29885305b1b /sql/item_sum.cc
parent259c7ea0f84f25d82ec7b818e5b770f0bc7917d3 (diff)
downloadmariadb-git-55c5016f92383fdf7cd14de4ef3ec5afbb89fd5a.tar.gz
RENAME TABLE table_name TO new_table_name ; Faster Alloc
Small bug fixes myisammrg/myrg_rfirst.c: Change mode to -rw-rw-r-- myisammrg/myrg_rlast.c: Change mode to -rw-rw-r-- myisammrg/myrg_rnext.c: Change mode to -rw-rw-r-- myisammrg/myrg_rprev.c: Change mode to -rw-rw-r-- Docs/manual.texi: Update of RENAME configure.in: Portability fix include/global.h: Fix for ODBC and Intel Ia64 include/mysqld_error.h: RENAME TABLE myisam/myisamchk.c: Faster --fast myisammrg/myrg_queue.c: Bug fix myisammrg/myrg_rkey.c: Portability fix sql-bench/test-insert.sh: Fix for duplicate key test sql/ChangeLog: Changelog sql/Makefile.am: RENAME TABLE sql/item_sum.cc: Fix for COUNT(DISTINCT) sql/lock.cc: RENAME TABLE sql/share/czech/errmsg.sys: RENAME TABLE sql/share/czech/errmsg.txt: RENAME TABLE sql/share/danish/errmsg.sys: RENAME TABLE sql/share/danish/errmsg.txt: RENAME TABLE sql/share/dutch/errmsg.sys: RENAME TABLE sql/share/dutch/errmsg.txt: RENAME TABLE sql/share/english/errmsg.sys: RENAME TABLE sql/share/english/errmsg.txt: RENAME TABLE sql/share/estonia/errmsg.sys: RENAME TABLE sql/share/estonia/errmsg.txt: RENAME TABLE sql/share/french/errmsg.sys: RENAME TABLE sql/share/french/errmsg.txt: RENAME TABLE sql/share/german/errmsg.sys: RENAME TABLE sql/share/german/errmsg.txt: RENAME TABLE sql/share/greek/errmsg.sys: RENAME TABLE sql/share/greek/errmsg.txt: RENAME TABLE sql/share/hungarian/errmsg.sys: RENAME TABLE sql/share/hungarian/errmsg.txt: RENAME TABLE sql/share/italian/errmsg.sys: RENAME TABLE sql/share/italian/errmsg.txt: RENAME TABLE sql/share/japanese/errmsg.sys: RENAME TABLE sql/share/japanese/errmsg.txt: RENAME TABLE sql/share/korean/errmsg.sys: RENAME TABLE sql/share/korean/errmsg.txt: RENAME TABLE sql/share/norwegian-ny/errmsg.txt: RENAME TABLE sql/share/norwegian/errmsg.txt: RENAME TABLE sql/share/polish/errmsg.sys: RENAME TABLE sql/share/polish/errmsg.txt: RENAME TABLE sql/share/portuguese/errmsg.sys: RENAME TABLE sql/share/portuguese/errmsg.txt: RENAME TABLE sql/share/romania/errmsg.sys: RENAME TABLE sql/share/romania/errmsg.txt: RENAME TABLE sql/share/romanian/errmsg.txt: ***MISSING WEAVE*** sql/share/russian/errmsg.sys: RENAME TABLE sql/share/russian/errmsg.txt: RENAME TABLE sql/share/slovak/errmsg.sys: RENAME TABLE sql/share/slovak/errmsg.txt: RENAME TABLE sql/share/spanish/errmsg.sys: RENAME TABLE sql/share/spanish/errmsg.txt: RENAME TABLE sql/share/swedish/errmsg.OLD: RENAME TABLE sql/share/swedish/errmsg.sys: RENAME TABLE sql/share/swedish/errmsg.txt: RENAME TABLE sql/slave.cc: Faster alloc sql/sql_base.cc: RENAME TABLE sql/sql_class.cc: Faster alloc sql/sql_class.h: Faster alloc sql/sql_insert.cc: Fix bug in INSERT ... SELECT to BDB table sql/sql_lex.h: RENAME TABLE sql/sql_select.cc: Faster alloc sql/sql_show.cc: Faster alloc sql/sql_table.cc: RENAME TABLE sql/sql_yacc.yy: RENAME TABLE sql/thr_malloc.cc: Faster alloc sql/unireg.h: RENAME TABLE strings/ctype-sjis.c: Portability fix
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 408e5d941ae..1c236e19bda 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -839,6 +839,10 @@ bool Item_sum_count_distinct::add()
copy_fields(tmp_table_param);
copy_funcs(tmp_table_param->funcs);
+ for (Field **field=table->field ; *field ; field++)
+ if ((*field)->is_real_null(0))
+ return 0; // Don't count NULL
+
if ((error=table->file->write_row(table->record[0])))
{
if (error != HA_ERR_FOUND_DUPP_KEY &&