Commit 03865c5f authored by unknown's avatar unknown

Better fix for count(distinct) bug


include/my_sys.h:
  Remove compiler warning
mysql-test/mysql-test-run.sh:
  Don't examine log files when you run with --extern
parent 7910884c
......@@ -143,7 +143,7 @@ extern ulonglong safemalloc_mem_limit;
#define CALLER_INFO , __FILE__, __LINE__
#define ORIG_CALLER_INFO , sFile, uLine
#else
#define my_checkmalloc() (0)
#define my_checkmalloc()
#undef TERMINATE
#define TERMINATE(A) {}
#define QUICK_SAFEMALLOC
......
......@@ -607,7 +607,9 @@ report_stats () {
$ECHO "http://www.mysql.com/doc/M/y/MySQL_test_suite.html"
fi
#
if test -z "$USE_RUNNING_SERVER"
then
# Report if there was any fatal warnings/errors in the log files
#
$RM -f $MY_LOG_DIR/warnings $MY_LOG_DIR/warnings.tmp
......@@ -630,6 +632,7 @@ report_stats () {
echo "WARNING: Got errors/warnings while running tests. Please examine"
echo "$MY_LOG_DIR/warnings for details."
fi
fi
}
mysql_install_db () {
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -918,7 +918,7 @@ int dump_leaf(byte* key, uint32 count __attribute__((unused)),
}
void Item_sum_count_distinct::no_rows_in_result()
Item_sum_count_distinct::~Item_sum_count_distinct()
{
if (table)
free_tmp_table(current_thd, table);
......
......@@ -185,7 +185,7 @@ class Item_sum_count_distinct :public Item_sum_int
:Item_sum_int(list),table(0),used_table_cache(~(table_map) 0),
tmp_table_param(0),use_tree(0),always_null(0)
{ quick_group=0; }
~Item_sum_count_distinct() { no_rows_in_result(); }
~Item_sum_count_distinct();
table_map used_tables() const { return used_table_cache; }
enum Sumfunctype sum_func () const { return COUNT_DISTINCT_FUNC; }
......@@ -196,7 +196,7 @@ class Item_sum_count_distinct :public Item_sum_int
void update_field(int offset) { return ; } // Never called
const char *func_name() const { return "count_distinct"; }
bool setup(THD *thd);
void no_rows_in_result();
void no_rows_in_result() {}
unsigned int size_of() { return sizeof(*this);}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment