summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBUILD/compile-alpha-ccc2
-rwxr-xr-xBUILD/compile-alpha-debug2
-rwxr-xr-xBUILD/compile-pentium-pgcc2
-rwxr-xr-xBUILD/compile-solaris-sparc2
-rwxr-xr-xBUILD/compile-solaris-sparc-debug2
-rwxr-xr-xBUILD/compile-solaris-sparc-purify2
-rw-r--r--sql/item.cc10
-rw-r--r--sql/sql_base.cc12
-rw-r--r--sql/sql_expression_cache.cc15
-rw-r--r--sql/sql_lex.cc20
-rw-r--r--sql/sql_select.cc7
-rw-r--r--storage/heap/hp_create.c10
12 files changed, 59 insertions, 27 deletions
diff --git a/BUILD/compile-alpha-ccc b/BUILD/compile-alpha-ccc
index 59ed241d51c..3b22e4f1191 100755
--- a/BUILD/compile-alpha-ccc
+++ b/BUILD/compile-alpha-ccc
@@ -8,7 +8,7 @@ make -k maintainer-clean
path=`dirname $0`
. "$path/autorun.sh"
-CC=ccc CFLAGS="-fast -O3 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=ev6 -Wa,-mev6" CXXLDFLAGS='/usr/lib/compaq/libots-2.2.7/libots.so /usr/lib/compaq/cpml-5.0.0/libcpml_ev6.a' ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client
+CC=ccc CFLAGS="-fast -O3 -fomit-frame-pointer" CXX=g++ CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=ev6 -Wa,-mev6" CXXLDFLAGS='/usr/lib/compaq/libots-2.2.7/libots.so /usr/lib/compaq/cpml-5.0.0/libcpml_ev6.a' ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client
make
rm */.deps/*
make
diff --git a/BUILD/compile-alpha-debug b/BUILD/compile-alpha-debug
index 94fe8a2b414..2d8869227dc 100755
--- a/BUILD/compile-alpha-debug
+++ b/BUILD/compile-alpha-debug
@@ -8,5 +8,5 @@ make -k maintainer-clean
path=`dirname $0`
. "$path/autorun.sh"
-CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
+CFLAGS=-O1 CC=gcc CXX=g++ CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
make
diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc
index c13a6ff14f7..5b2193c9fe9 100755
--- a/BUILD/compile-pentium-pgcc
+++ b/BUILD/compile-pentium-pgcc
@@ -8,7 +8,7 @@ path=`dirname $0`
. "$path/autorun.sh"
export PATH=/usr/local/pgcc/bin:$PATH
-CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
+CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
gmake -j 4
diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc
index bc74d7275f3..df3cf1e26c3 100755
--- a/BUILD/compile-solaris-sparc
+++ b/BUILD/compile-solaris-sparc
@@ -9,6 +9,6 @@ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
path=`dirname $0`
. "$path/autorun.sh"
-CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
+CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
make -j 4
diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug
index 43cabd644fa..e960039baff 100755
--- a/BUILD/compile-solaris-sparc-debug
+++ b/BUILD/compile-solaris-sparc-debug
@@ -6,6 +6,6 @@ make -k clean || true
path=`dirname $0`
. "$path/autorun.sh"
-CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
+CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
make -j 4
diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify
index 989587fbe99..22fe5b5616e 100755
--- a/BUILD/compile-solaris-sparc-purify
+++ b/BUILD/compile-solaris-sparc-purify
@@ -37,7 +37,7 @@ make -k maintainer-clean || true
path=`dirname $0`
. "$path/autorun.sh"
-CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
+CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=g++ CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
make -j 4
diff --git a/sql/item.cc b/sql/item.cc
index 45245f07258..14b9d2a58a4 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -471,6 +471,7 @@ void Item::print_item_w_name(String *str, enum_query_type query_type)
void Item::cleanup()
{
DBUG_ENTER("Item::cleanup");
+ DBUG_PRINT("enter", ("this: %p", this));
fixed=0;
marker= 0;
if (orig_name)
@@ -6701,8 +6702,7 @@ bool Item_direct_ref::get_date(MYSQL_TIME *ltime,uint fuzzydate)
Item_cache_wrapper::~Item_cache_wrapper()
{
- delete expr_cache;
- /* expr_value is Item so it will be destroyed from list of Items */
+ DBUG_ASSERT(expr_cache == 0);
}
@@ -6761,10 +6761,13 @@ bool Item_cache_wrapper::fix_fields(THD *thd __attribute__((unused)),
void Item_cache_wrapper::cleanup()
{
+ DBUG_ENTER("Item_cache_wrapper::cleanup");
+ Item_result_field::cleanup();
delete expr_cache;
expr_cache= 0;
- // expr_value is Item so it will be destroyed from list of Items
+ /* expr_value is Item so it will be destroyed from list of Items */
expr_value= 0;
+ DBUG_VOID_RETURN;
}
@@ -6787,6 +6790,7 @@ void Item_cache_wrapper::cleanup()
bool Item_cache_wrapper::set_cache(THD *thd, List<Item*> &depends_on)
{
DBUG_ENTER("Item_cache_wrapper::set_cache");
+ DBUG_ASSERT(expr_cache == 0);
expr_cache= new Expression_cache_tmptable(thd, depends_on, expr_value);
DBUG_RETURN(expr_cache == NULL);
}
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 435dd84dca9..93c4ac45f86 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -7513,13 +7513,11 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
List<Item> *sum_func_list,
uint wild_num)
{
- if (!wild_num)
- return(0);
-
Item *item;
List_iterator<Item> it(fields);
Query_arena *arena, backup;
DBUG_ENTER("setup_wild");
+ DBUG_ASSERT(wild_num != 0);
/*
Don't use arena if we are not in prepared statements or stored procedures
@@ -7608,6 +7606,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array,
List_iterator<Item> it(fields);
bool save_is_item_list_lookup;
DBUG_ENTER("setup_fields");
+ DBUG_PRINT("enter", ("ref_pointer_array: %p", ref_pointer_array));
thd->mark_used_columns= mark_used_columns;
DBUG_PRINT("info", ("thd->mark_used_columns: %d", thd->mark_used_columns));
@@ -7842,10 +7841,11 @@ bool setup_tables_and_check_access(THD *thd,
{
TABLE_LIST *leaves_tmp= NULL;
bool first_table= true;
+ DBUG_ENTER("setup_tables_and_check_access");
if (setup_tables(thd, context, from_clause, tables,
&leaves_tmp, select_insert))
- return TRUE;
+ DBUG_RETURN(TRUE);
if (leaves)
*leaves= leaves_tmp;
@@ -7857,11 +7857,11 @@ bool setup_tables_and_check_access(THD *thd,
want_access, leaves_tmp, FALSE))
{
tables->hide_view_error(thd);
- return TRUE;
+ DBUG_RETURN(TRUE);
}
first_table= 0;
}
- return FALSE;
+ DBUG_RETURN(FALSE);
}
diff --git a/sql/sql_expression_cache.cc b/sql/sql_expression_cache.cc
index 188d93e8b8a..db1f47c5603 100644
--- a/sql/sql_expression_cache.cc
+++ b/sql/sql_expression_cache.cc
@@ -1,3 +1,17 @@
+/* Copyright (C) 2010-2011 Monty Program Ab & Oleksandr Byelkin
+
+ 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
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysql_priv.h"
#include "sql_select.h"
@@ -84,7 +98,6 @@ void Expression_cache_tmptable::init()
cache_table_param.field_count= list->elements + 1;
/* postpone table creation to index description */
cache_table_param.skip_create_table= 1;
- cache_table= NULL;
items.push_front(val);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d0f9b5cd58d..3b655bac5af 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2053,20 +2053,22 @@ ulong st_select_lex::get_table_join_options()
bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num)
{
+ DBUG_ENTER("st_select_lex::setup_ref_array");
+
if (ref_pointer_array)
- return 0;
+ DBUG_RETURN(0);
/*
- We have to create array in prepared statement memory if it is
+ We have to create array in prepared statement memory if it is a
prepared statement
*/
- Query_arena *arena= thd->stmt_arena;
- return (ref_pointer_array=
- (Item **)arena->alloc(sizeof(Item*) * (n_child_sum_items +
- item_list.elements +
- select_n_having_items +
- select_n_where_fields +
- order_group_num)*5)) == 0;
+ ref_pointer_array=
+ (Item **)thd->stmt_arena->alloc(sizeof(Item*) * (n_child_sum_items +
+ item_list.elements +
+ select_n_having_items +
+ select_n_where_fields +
+ order_group_num)*5);
+ DBUG_RETURN(ref_pointer_array == 0);
}
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 917d35170a6..012ddea421a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -561,7 +561,8 @@ JOIN::prepare(Item ***rref_pointer_array,
table_ptr->table->maybe_null= 1;
}
- if (setup_wild(thd, tables_list, fields_list, &all_fields, wild_num) ||
+ if ((wild_num && setup_wild(thd, tables_list, fields_list, &all_fields,
+ wild_num)) ||
select_lex->setup_ref_array(thd, og_num) ||
setup_fields(thd, (*rref_pointer_array), fields_list, MARK_COLUMNS_READ,
&all_fields, 1) ||
@@ -2554,6 +2555,7 @@ JOIN::destroy()
void JOIN::cleanup_item_list(List<Item> &items) const
{
+ DBUG_ENTER("JOIN::cleanup_item_list");
if (!items.is_empty())
{
List_iterator_fast<Item> it(items);
@@ -2561,6 +2563,7 @@ void JOIN::cleanup_item_list(List<Item> &items) const
while ((item= it++))
item->cleanup();
}
+ DBUG_VOID_RETURN;
}
@@ -12651,7 +12654,6 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
{
if (open_tmp_table(table))
goto err;
- table->db_stat= HA_OPEN_KEYFILE+HA_OPEN_RNDFILE;
}
thd->mem_root= mem_root_save;
@@ -12807,6 +12809,7 @@ bool open_tmp_table(TABLE *table)
table->db_stat=0;
return(1);
}
+ table->db_stat= HA_OPEN_KEYFILE+HA_OPEN_RNDFILE;
(void) table->file->extra(HA_EXTRA_QUICK); /* Faster */
return(0);
}
diff --git a/storage/heap/hp_create.c b/storage/heap/hp_create.c
index 2036bd7166f..f9d0a48324d 100644
--- a/storage/heap/hp_create.c
+++ b/storage/heap/hp_create.c
@@ -39,6 +39,10 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
share= 0;
}
}
+ else
+ {
+ DBUG_PRINT("info", ("Creating internal (no named) temporary table"));
+ }
if (!share)
{
@@ -255,10 +259,15 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records,
static inline void heap_try_free(HP_SHARE *share)
{
+ DBUG_ENTER("heap_try_free");
if (share->open_count == 0)
hp_free(share);
else
+ {
+ DBUG_PRINT("info", ("Table is still in use. Will be freed on close"));
share->delete_on_close= 1;
+ }
+ DBUG_VOID_RETURN;
}
@@ -277,6 +286,7 @@ int heap_delete_table(const char *name)
else
{
result= my_errno=ENOENT;
+ DBUG_PRINT("error", ("Could not find table '%s'", name));
}
pthread_mutex_unlock(&THR_LOCK_heap);
DBUG_RETURN(result);