summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-05-06 22:44:00 +0400
committerunknown <konstantin@mysql.com>2004-05-06 22:44:00 +0400
commit151495baf78b0a5e282a0e77fdba1a7a2a8a3085 (patch)
treea1f946d43b77b1226ea45f879d1f2b6be1b85c62 /tests
parentffdf46a58ac73ce0862f1cf632e4254170ed6116 (diff)
downloadmariadb-git-151495baf78b0a5e282a0e77fdba1a7a2a8a3085.tar.gz
mysql_stmt_reset now expects ok/error packet from server.
libmysql/libmysql.c: Make advanced_command check client reply sql/sql_prepare.cc: mysql_stmt_reset now sends ok/error reply to the client. tests/client_test.c: Memory leak fixed.
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index facb3de70f0..d382377fe49 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -163,8 +163,11 @@ MYSQL_STMT *STDCALL
mysql_simple_prepare(MYSQL *mysql, const char *query)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
- if (mysql_stmt_prepare(stmt, query, strlen(query)))
+ if (stmt && mysql_stmt_prepare(stmt, query, strlen(query)))
+ {
+ mysql_stmt_close(stmt);
return 0;
+ }
return stmt;
}