summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-02-13 10:56:45 +0100
committerunknown <msvensson@neptunus.(none)>2006-02-13 10:56:45 +0100
commitef51aa603b8014f0f22beb8d904e046ad0183439 (patch)
treedf9423e9ea0a29f6defeeb6f015bbe7b40ad2abf /tests
parent550a988ac94e97c7cb1e26fb44791bdd828ec66b (diff)
parent101e618f7f46fb0012a4166aea7213730a0b4281 (diff)
downloadmariadb-git-ef51aa603b8014f0f22beb8d904e046ad0183439.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/bug14013/my50-bug14013
into neptunus.(none):/home/msvensson/mysql/mysql-5.0 client/mysqltest.c: Auto merged libmysql/libmysql.c: Auto merged tests/mysql_client_test.c: Auto merged
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index f32fd752d77..28abdd30483 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -1049,7 +1049,10 @@ void stmt_fetch_close(Stmt_fetch *fetch)
reading from the rest.
*/
-my_bool fetch_n(const char **query_list, unsigned query_count)
+enum fetch_type { USE_ROW_BY_ROW_FETCH= 0, USE_STORE_RESULT= 1 };
+
+my_bool fetch_n(const char **query_list, unsigned query_count,
+ enum fetch_type fetch_type)
{
unsigned open_statements= query_count;
int rc, error_count= 0;
@@ -1065,6 +1068,15 @@ my_bool fetch_n(const char **query_list, unsigned query_count)
query_list[fetch - fetch_array]);
}
+ if (fetch_type == USE_STORE_RESULT)
+ {
+ for (fetch= fetch_array; fetch < fetch_array + query_count; ++fetch)
+ {
+ rc= mysql_stmt_store_result(fetch->handle);
+ check_execute(fetch->handle, rc);
+ }
+ }
+
while (open_statements)
{
for (fetch= fetch_array; fetch < fetch_array + query_count; ++fetch)
@@ -11867,7 +11879,8 @@ static void test_basic_cursors()
fill_tables(basic_tables, sizeof(basic_tables)/sizeof(*basic_tables));
- fetch_n(queries, sizeof(queries)/sizeof(*queries));
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_ROW_BY_ROW_FETCH);
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_STORE_RESULT);
DBUG_VOID_RETURN;
}
@@ -11880,7 +11893,8 @@ static void test_cursors_with_union()
"SELECT t1.id FROM t1 WHERE t1.id < 5"
};
myheader("test_cursors_with_union");
- fetch_n(queries, sizeof(queries)/sizeof(*queries));
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_ROW_BY_ROW_FETCH);
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_STORE_RESULT);
}
/*