summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-06-20 15:38:15 +0400
committerunknown <konstantin@mysql.com>2005-06-20 15:38:15 +0400
commitc8c0140eec93f7acbf7daa14cf3ab0680879ec92 (patch)
treecd81438f1bd0080853518fc0fcc9d40fdd953543 /tests
parent28d404420ce3fa0d539fad60ee6c541ad9ac99ac (diff)
downloadmariadb-git-c8c0140eec93f7acbf7daa14cf3ab0680879ec92.tar.gz
Fix a formatting bug and add a test for it.
sql/share/errmsg.txt: Fix a formatting bug. sql/sql_prepare.cc: Fix a formatting bug. tests/mysql_client_test.c: Test the server side error message.
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));