summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <davi@buzz.(none)>2008-03-17 16:39:09 -0300
committerunknown <davi@buzz.(none)>2008-03-17 16:39:09 -0300
commit809522598a9a8946a5e1fa4a981717c38466a379 (patch)
treef6c164b0b465fd5e3b8268fd3a79e89bd43d03e0 /tests
parentce34828e075347de7d783d3b61ce579856ca72ad (diff)
downloadmariadb-git-809522598a9a8946a5e1fa4a981717c38466a379.tar.gz
Post-merge fixes for Bug 35103
libmysql/libmysql.c: Manual merge sql/sql_class.cc: Don't send anything back to the client if disabled. sql/sql_prepare.cc: Don't send any packet back for statement close. tests/mysql_client_test.c: Manual merge
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 482ae37d15b..085b14a65e9 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -12016,6 +12016,7 @@ static void test_bug5194()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
+ mysql_stmt_reset(stmt);
}
mysql_stmt_close(stmt);
@@ -16600,7 +16601,10 @@ static void test_bug27592()
DBUG_VOID_RETURN;
}
-#if 0
+
+/**
+ Bug#29948 autoreconnect + prepared statements + kill seems unstable
+*/
static void test_bug29948()
{
@@ -16614,7 +16618,10 @@ static void test_bug29948()
const char *query;
int buf;
unsigned long length, cursor_type;
-
+
+ DBUG_ENTER("test_bug29948");
+ myheader("test_bug29948");
+
dbc = mysql_init(NULL);
DIE_UNLESS(dbc);
@@ -16650,7 +16657,7 @@ static void test_bug29948()
res= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void *)&cursor_type);
myquery(res);
- query= "SELECT * from t1 where a=?";
+ query= "SELECT * FROM t1 WHERE a=?";
res= mysql_stmt_prepare(stmt, query, strlen(query));
myquery(res);
@@ -16662,20 +16669,23 @@ static void test_bug29948()
res= mysql_stmt_bind_result(stmt,&bind);
check_execute(stmt, res);
-
- sprintf(kill_buf, "kill %ld", dbc->thread_id);
- mysql_query(dbc, kill_buf);
+
+ my_snprintf(kill_buf, sizeof(kill_buf), "KILL %ld", dbc->thread_id);
+ res= mysql_query(dbc, kill_buf);
+ myquery(res);
res= mysql_stmt_store_result(stmt);
DIE_UNLESS(res);
mysql_stmt_free_result(stmt);
mysql_stmt_close(stmt);
- mysql_query(dbc, "DROP TABLE t1");
+
+ res= mysql_query(dbc, "DROP TABLE t1");
+ myquery(res);
+
mysql_close(dbc);
}
-#endif
/*
Bug#29687 mysql_stmt_store_result memory leak in libmysqld
@@ -17715,7 +17725,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug28505", test_bug28505 },
{ "test_bug28934", test_bug28934 },
{ "test_bug27592", test_bug27592 },
- /* { "test_bug29948", test_bug29948 }, */
+ { "test_bug29948", test_bug29948 },
{ "test_bug29687", test_bug29687 },
{ "test_bug29692", test_bug29692 },
{ "test_bug29306", test_bug29306 },