diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-04-13 01:56:22 +0300 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2007-04-13 01:56:22 +0300 |
commit | aa0d524989a53137a62cc037ed509bbff06ddb06 (patch) | |
tree | 2eec82067ee6e913dcb025424b04b00c7e81c1cf /sql-common | |
parent | dcdf52fbb7d8e3e7f400a3f50650291bb8c04e43 (diff) | |
download | mariadb-git-aa0d524989a53137a62cc037ed509bbff06ddb06.tar.gz |
Added more descriptive error message of why statement was automaticly dropped
Print information if net_clear() skipped bytes (As this otherwise hides critical timeing bugs)
Added DBUG_ASSERT if we get packets out of order
mysql_change_user() could on error send multiple packets, which caused mysql_client_test to randomly fail
include/errmsg.h:
Added more descriptive error message of why statement was automaticly dropped
libmysql/client_settings.h:
Added more descriptive error message of why statement was automaticly dropped
libmysql/errmsg.c:
Added more descriptive error message of why statement was automaticly dropped
libmysql/libmysql.c:
Added more descriptive error message of why statement was automaticly dropped
sql-common/client.c:
Added more descriptive error message of why statement was automaticly dropped
sql/net_serv.cc:
Print information if net_clear() skipped bytes (As this otherwise hides critical timeing bugs)
Added DBUG_ASSERT if we get packets out of order
sql/sql_class.cc:
We need to set killed to NOT_KILLED after cleanup() if we want to continue using THD
(If not, the connection will be closed after the current stmt)
sql/sql_parse.cc:
mysql_change_user() could on error send multiple packets, which caused mysql_client_test to randomly fail
tests/mysql_client_test.c:
More DBUG information
Better usage of --silent
Always print 'OK' the same way.
Disable test_bug17667 if run outside of mysql-test-run
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 89d69b4bd1f..d6fd98a1ed2 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2596,24 +2596,32 @@ static void mysql_close_free(MYSQL *mysql) SYNOPSYS mysql_detach_stmt_list() stmt_list pointer to mysql->stmts + func_name name of calling function NOTE There is similar code in mysql_reconnect(), so changes here should also be reflected there. */ -void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused))) +void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), + const char *func_name) { #ifdef MYSQL_CLIENT /* Reset connection handle in all prepared statements. */ LIST *element= *stmt_list; + char buff[MYSQL_ERRMSG_SIZE]; + DBUG_ENTER("mysql_detach_stmt_list"); + + my_snprintf(buff, sizeof(buff)-1, ER(CR_STMT_CLOSED), func_name); for (; element; element= element->next) { MYSQL_STMT *stmt= (MYSQL_STMT *) element->data; + set_stmt_errmsg(stmt, buff, CR_STMT_CLOSED, unknown_sqlstate); stmt->mysql= 0; /* No need to call list_delete for statement here */ } *stmt_list= 0; + DBUG_VOID_RETURN; #endif /* MYSQL_CLIENT */ } @@ -2634,7 +2642,7 @@ void STDCALL mysql_close(MYSQL *mysql) } mysql_close_free_options(mysql); mysql_close_free(mysql); - mysql_detach_stmt_list(&mysql->stmts); + mysql_detach_stmt_list(&mysql->stmts, "mysql_close"); #ifndef TO_BE_DELETED /* free/close slave list */ if (mysql->rpl_pivot) |