summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-06-20 15:38:15 +0400
committerkonstantin@mysql.com <>2005-06-20 15:38:15 +0400
commitb875f7902d1b5960d7274351c7143d77656e1c78 (patch)
treecd81438f1bd0080853518fc0fcc9d40fdd953543 /tests
parent43f8b7b43b30783391acb4ed316022bbda284f5e (diff)
downloadmariadb-git-b875f7902d1b5960d7274351c7143d77656e1c78.tar.gz
Fix a formatting bug and add a test for it.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 8bea0a20a0f..8debf7614a3 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -12995,6 +12995,19 @@ static void test_bug9478()
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc == MYSQL_NO_DATA);
+ {
+ char buff[8];
+ /* Fill in the fethc packet */
+ int4store(buff, stmt->stmt_id);
+ buff[4]= 1; /* prefetch rows */
+ rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, buff,
+ sizeof(buff), 0,0,1) ||
+ (*mysql->methods->read_query_result)(mysql));
+ DIE_UNLESS(rc);
+ if (!opt_silent && i == 0)
+ printf("Got error (as expected): %s\n", mysql_error(mysql));
+ }
+
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
@@ -13039,7 +13052,7 @@ static void test_bug9478()
/* Fill in the execute packet */
int4store(buff, stmt->stmt_id);
buff[4]= 0; /* Flag */
- int4store(buff+5, 1); /* Return 1 row */
+ int4store(buff+5, 1); /* Reserved for array bind */
rc= ((*mysql->methods->advanced_command)(mysql, COM_STMT_EXECUTE, buff,
sizeof(buff), 0,0,1) ||
(*mysql->methods->read_query_result)(mysql));