summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-02-10 17:03:27 +0200
committerunknown <monty@mashka.mysql.fi>2003-02-10 17:03:27 +0200
commit03865c5fb1ad3de32dd4fc85acdce48e18df67a4 (patch)
treeda26feecd7cbf846809f47cafec851ab3a897b7c
parent7910884c5cbb59e89041506a12b9a3a567a97067 (diff)
downloadmariadb-git-03865c5fb1ad3de32dd4fc85acdce48e18df67a4.tar.gz
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
-rw-r--r--include/my_sys.h2
-rw-r--r--mysql-test/mysql-test-run.sh5
-rw-r--r--sql/item_sum.cc4
-rw-r--r--sql/item_sum.h4
4 files changed, 9 insertions, 6 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 4bd9f53f7e4..9610033e2a9 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -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
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 0f12dd9122a..3e498703ada 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -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 () {
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 3c5f1a23704..b6bbc12efd6 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1,4 +1,4 @@
-/* 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);
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 62cb5974388..29ac1f1d1b1 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -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);}
};