From 6294c68ee4403065f42d05006b06d29e335e6bc4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Feb 2005 23:44:13 -0600 Subject: Bootstrap: Add new manual.texi include files Build-tools/Bootstrap: Add new manual.texi include files --- Build-tools/Bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap index 8b769dca3c4..64f865362ca 100755 --- a/Build-tools/Bootstrap +++ b/Build-tools/Bootstrap @@ -278,7 +278,7 @@ if (defined $opt_changelog) unless ($opt_skip_manual) { &logger("Updating manual files"); - foreach $file qw/internals manual reservedwords/ + foreach $file qw/internals manual reservedwords errmsg-table cl-errmsg-table/ { system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0 or &abort("Could not update $file.texi in $target_dir/Docs/!"); -- cgit v1.2.1 From cd68042bce9feee77fa0088c1919980bdf3e73a7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 12:05:08 +0400 Subject: sql_select.cc: Redundant "Item::" was removed. sql/sql_select.cc: Redundant "Item::" was removed. --- sql/sql_select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 7aa1c968d4b..2f459d40de7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11404,8 +11404,8 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, in is field of view table => check that references on translation table are same */ - ((*select_item)->type() == Item::Item::REF_ITEM && - view_ref->type() == Item::Item::REF_ITEM && + ((*select_item)->type() == Item::REF_ITEM && + view_ref->type() == Item::REF_ITEM && ((Item_ref *) (*select_item))->ref == ((Item_ref *) view_ref)->ref))) /* -- cgit v1.2.1 From 26d51de7683404861217683b3f6fe2f2812ed730 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 12:17:59 +0400 Subject: A fix (mysql_priv.h should be included first) --- sql/sql_map.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/sql_map.cc b/sql/sql_map.cc index e557840957e..4bb3482c7e6 100644 --- a/sql/sql_map.cc +++ b/sql/sql_map.cc @@ -19,9 +19,8 @@ #pragma implementation // gcc: Class implementation #endif -#include - #include "mysql_priv.h" +#include #ifdef HAVE_SYS_MMAN_H #include #endif -- cgit v1.2.1 From cb403619fbb330f1ae652c61a52207c34a280b48 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 09:42:11 +0100 Subject: Convert ndb-cache-check-time fomr milliseconds to seconds sql/ha_ndbcluster.cc: Use the ndb-cache-check-time value as a millisecond counter --- sql/ha_ndbcluster.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 12e2e3672cc..884830c51ed 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -5783,8 +5783,11 @@ extern "C" pthread_handler_decl(ndb_util_thread_func, continue; } + /* Round tim e from millisceonds to seconds */ + uint wait_secs= ((ndb_cache_check_time+999)/1000); + DBUG_PRINT("ndb_util_thread", ("wait_secs: %d", wait_secs)); /* Set new time to wake up */ - set_timespec(abstime, ndb_cache_check_time); + set_timespec(abstime, wait_secs); /* Lock mutex and fill list with pointers to all open tables */ NDB_SHARE *share; @@ -5793,7 +5796,6 @@ extern "C" pthread_handler_decl(ndb_util_thread_func, { share= (NDB_SHARE *)hash_element(&ndbcluster_open_tables, i); share->use_count++; /* Make sure the table can't be closed */ - DBUG_PRINT("ndb_util_thread", ("Found open table[%d]: %s, use_count: %d", i, share->table_name, share->use_count)); -- cgit v1.2.1 From f12722191de4b93b4bc4d001436061707e6ce9ef Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 10:07:37 +0100 Subject: Update text for option sql/mysqld.cc: Update of helptext for ndb-cache-check-time --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 180d9427c66..ab58f2e31b9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4647,7 +4647,7 @@ Disable with --skip-ndbcluster (will save memory).", (gptr*) &opt_ndb_optimized_node_selection, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, { "ndb-cache-check-time", OPT_NDB_CACHE_CHECK_TIME, - "A dedicated thread is created to update cached commit count value at the given interval.", + "A dedicated thread is created to, at the given millisecons interval, invalidate the query cache if another MySQL server in the cluster has changed the data in the database.", (gptr*) &opt_ndb_cache_check_time, (gptr*) &opt_ndb_cache_check_time, 0, GET_ULONG, REQUIRED_ARG, 0, 0, LONG_TIMEOUT, 0, 1, 0}, #endif -- cgit v1.2.1 From 0119ea08668ba936ba980a4e6a882ad48039564f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 11:24:59 +0100 Subject: libmysqld.dsp: Corrected path to my_decimal.cpp VC++Files/libmysqld/libmysqld.dsp: Corrected path to my_decimal.cpp --- VC++Files/libmysqld/libmysqld.dsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VC++Files/libmysqld/libmysqld.dsp b/VC++Files/libmysqld/libmysqld.dsp index bb31a8ada43..c5c40b07dfd 100644 --- a/VC++Files/libmysqld/libmysqld.dsp +++ b/VC++Files/libmysqld/libmysqld.dsp @@ -344,7 +344,7 @@ SOURCE=..\mysys\my_alloc.c # End Source File # Begin Source File -SOURCE=..\mysys\my_decimal.cpp +SOURCE=..\sql\my_decimal.cpp # End Source File # Begin Source File -- cgit v1.2.1 From 9d5d847835475f9195c0b9a3e83d2e9770f1b7b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Feb 2005 13:56:09 +0100 Subject: Fixed BUG#8638: Test 'sp' fails: Stored Procedure often sends warning 1329 The warning sent is by itself ok, the problem was rather why it wasn't sent on some other platforms... The real problem was that a total_warn_count which was inconsistent with warn_list was sent back with send_eof() during SP execution, which in turn cause a protocol error in mysqltest. mysql-test/r/sp.result: Updated results after fixing bug in how total_warn_count is handled. sql/protocol.cc: Fixed bug that caused protocol errors with mysqltest. Don't send total_warn_count with send_eof() during SP execution, as it's usually wrong anyway. (warn_list is cleared) sql/sql_parse.cc: Reset total_warn_count if the warn_list has been cleared. This gets rid of "empty" warnings after some CALLs. --- mysql-test/r/sp.result | 9 ++++----- sql/protocol.cc | 4 +++- sql/sql_parse.cc | 6 ++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index f3a42d75258..f2b99b7074a 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -656,7 +656,6 @@ delete from t1| drop table if exists t3| create table t3 ( s char(16), d int)| call into_test4()| -Warnings: select * from t3| s d into4 NULL @@ -1344,9 +1343,7 @@ end if; insert into t4 values (2, rc, t3); end| call bug1863(10)| -Warnings: call bug1863(10)| -Warnings: select * from t4| f1 rc t3 2 0 NULL @@ -1643,9 +1640,7 @@ begin end| call bug4579_1()| call bug4579_1()| -Warnings: call bug4579_1()| -Warnings: drop procedure bug4579_1| drop procedure bug4579_2| drop table t3| @@ -2118,12 +2113,16 @@ var call bug7743("OneWord")| var NULL +Warnings: +Warning 1329 No data to FETCH call bug7743("anotherword")| var 2 call bug7743("AnotherWord")| var NULL +Warnings: +Warning 1329 No data to FETCH drop procedure bug7743| drop table t4| delete from t3| diff --git a/sql/protocol.cc b/sql/protocol.cc index f31462ddad1..e14262fdbe0 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -359,7 +359,9 @@ send_eof(THD *thd, bool no_flush) if (thd->client_capabilities & CLIENT_PROTOCOL_41) { uchar buff[5]; - uint tmp= min(thd->total_warn_count, 65535); + /* Don't send warn count during SP execution, as the warn_list + is cleared between substatements, and mysqltest gets confused */ + uint tmp= (thd->spcont ? 0 : min(thd->total_warn_count, 65535)); buff[0]=254; int2store(buff+1, tmp); /* diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9a1b2eb0430..6e28f5bcefb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4185,6 +4185,12 @@ unsent_create_error: thd->row_count_func= 0; res= sp->execute_procedure(thd, &lex->value_list); + /* If warnings have been cleared, we have to clear total_warn_count + * too, otherwise the clients get confused. + */ + if (thd->warn_list.is_empty()) + thd->total_warn_count= 0; + thd->variables.select_limit= select_limit; #ifndef NO_EMBEDDED_ACCESS_CHECKS sp_restore_security_context(thd, sp, &save_ctx); -- cgit v1.2.1