summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-02-10 18:31:02 +0300
committerkonstantin@mysql.com <>2005-02-10 18:31:02 +0300
commit957beb97944409a1c14c33bed7654cb55626eff6 (patch)
tree89a3d10387b197f24d4d0c20ff8aef498baf500b
parent6054f8140c9797f7efe81b66e3cd2c553def60d1 (diff)
parent36c992b264eca68467659f4aeb475ad6c0a53704 (diff)
downloadmariadb-git-957beb97944409a1c14c33bed7654cb55626eff6.tar.gz
Merge mysql.com:/home/kostja/work/mysql-4.1-root
into mysql.com:/home/kostja/work/mysql-5.0-root
-rw-r--r--libmysql/libmysql.c10
-rw-r--r--tests/mysql_client_test.c1
2 files changed, 6 insertions, 5 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index d0dee7976db..6baec95e633 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -4875,17 +4875,17 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
if (mysql)
{
mysql->stmts= list_delete(mysql->stmts, &stmt->list);
+ /*
+ Clear NET error state: if the following commands come through
+ successfully, connection will still be usable for other commands.
+ */
+ net_clear_error(&mysql->net);
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
{
char buff[MYSQL_STMT_HEADER]; /* 4 bytes - stmt id */
if (mysql->unbuffered_fetch_owner == &stmt->unbuffered_fetch_cancelled)
mysql->unbuffered_fetch_owner= 0;
- /*
- Clear NET error state: if the following commands come through
- successfully, connection will still be usable for other commands.
- */
- net_clear_error(&mysql->net);
if (mysql->status != MYSQL_STATUS_READY)
{
/*
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 8f76b7757dc..0581679a845 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -12803,6 +12803,7 @@ static struct my_tests_st my_tests[]= {
{ "test_truncation", test_truncation },
{ "test_truncation_option", test_truncation_option },
{ "test_bug8330", test_bug8330 },
+ { "test_bug7990", test_bug7990 },
{ 0, 0 }
};