summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoranozdrin/alik@quad.opbmk <>2008-03-18 13:51:17 +0300
committeranozdrin/alik@quad.opbmk <>2008-03-18 13:51:17 +0300
commitfa6ed3cf36c7bf98b5f0c5476bc1ced1a3b78b2c (patch)
treee96aaaaa6d8f3413c11e63aee2802003dfc5b2bc /tests
parenteac3a26efab4f3886ba68ed24cc1ddfc453dfa0e (diff)
parentb7f7c7dc35f954901335199c6bb31c749d5e236b (diff)
downloadmariadb-git-fa6ed3cf36c7bf98b5f0c5476bc1ced1a3b78b2c.tar.gz
Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1
into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 73f47825ae9..a50d9d74aaf 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);
@@ -16610,6 +16611,11 @@ static void test_bug27592()
DBUG_VOID_RETURN;
}
+
+/**
+ Bug#29948 autoreconnect + prepared statements + kill seems unstable
+*/
+
static void test_bug29948()
{
MYSQL *dbc=NULL;
@@ -16622,7 +16628,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);
@@ -16658,7 +16667,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);
@@ -16670,16 +16679,20 @@ 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);
}