summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-05-04 20:02:55 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-05-04 20:02:55 +0400
commit4df5d6d69698910b8526095a590515227a89acc8 (patch)
tree886ee199304f4869f0f62695566e2c4d1158ff13 /tests
parent5c9f01a79b9e4774fb24a344172989a81a1762d8 (diff)
downloadmariadb-git-4df5d6d69698910b8526095a590515227a89acc8.tar.gz
After merge fix.
Now test_bug1664() uses new statement checking macros. tests/client_test.c: Now test_bug1664() uses new statement checking macros.
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index cd0d8a63f13..e7f30526c84 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -9454,9 +9454,9 @@ static void test_bug1664()
myquery(rc);
stmt= mysql_stmt_init(mysql);
- mystmt_init(stmt);
+ check_stmt(stmt);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
verify_param_count(stmt, 2);
@@ -9470,7 +9470,7 @@ static void test_bug1664()
bind[1].buffer_type= FIELD_TYPE_LONG;
rc= mysql_stmt_bind_param(stmt,bind);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
int_data= 1;
@@ -9480,11 +9480,10 @@ static void test_bug1664()
*/
data= "";
rc= mysql_stmt_send_long_data(stmt,0,data,strlen(data));
- mystmt(stmt,rc);
+ check_execute(stmt,rc);
rc= mysql_stmt_execute(stmt);
- fprintf(stdout," mysql_execute() returned %d\n",rc);
- mystmt(stmt,rc);
+ check_execute(stmt,rc);
verify_col_data("test_long_data","col1","1");
verify_col_data("test_long_data","col2","");
@@ -9495,11 +9494,10 @@ static void test_bug1664()
/* This should pass OK */
data= (char *)"Data";
rc= mysql_stmt_send_long_data(stmt, 0, data, strlen(data));
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
- fprintf(stdout," mysql_execute() returned %d\n",rc);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
verify_col_data("test_long_data", "col1", "1");
verify_col_data("test_long_data", "col2", "Data");
@@ -9517,8 +9515,7 @@ static void test_bug1664()
int_data= 2;
/* execute */
rc = mysql_stmt_execute(stmt);
- fprintf(stdout, " mysql_execute() returned %d\n", rc);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
verify_col_data("test_long_data", "col1", "2");
verify_col_data("test_long_data", "col2", str_data);
@@ -9534,11 +9531,10 @@ static void test_bug1664()
data= (char *)"SomeOtherData";
rc= mysql_stmt_send_long_data(stmt, 0, data, strlen(data));
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
- fprintf(stdout, " mysql_execute() returned %d\n", rc);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
verify_col_data("test_long_data", "col1", "2");
verify_col_data("test_long_data", "col2", "SomeOtherData");
@@ -9551,22 +9547,21 @@ static void test_bug1664()
/* Now let us test how mysql_stmt_reset works. */
stmt= mysql_stmt_init(mysql);
- mystmt_init(stmt);
+ check_stmt(stmt);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
rc= mysql_bind_param(stmt, bind);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
data= (char *)"SomeData";
rc= mysql_stmt_send_long_data(stmt, 0, data, strlen(data));
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
rc= mysql_stmt_reset(stmt);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
- fprintf(stdout," mysql_execute() returned %d\n",rc);
- mystmt(stmt, rc);
+ check_execute(stmt, rc);
verify_col_data("test_long_data", "col1", "2");
verify_col_data("test_long_data", "col2", str_data);