summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-10-01 12:56:25 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-10-01 12:56:25 +0300
commit40affabb74684dd0c1a544cc7a3a61066f60573e (patch)
tree0959af4265f279d4c92fbc5a3c4bc06483bd9ce6 /tests
parentcff944522e9d5dcc234b53e0cec3f61f554d3694 (diff)
parent5d04190db32dcba9e0a55c1c175072ac89a3c053 (diff)
downloadmariadb-git-40affabb74684dd0c1a544cc7a3a61066f60573e.tar.gz
merge 5.0-opt -> 5.1-opt
mysql-test/r/func_math.result: Auto merged mysql-test/t/func_math.test: Auto merged mysql-test/t/view_grant.test: Auto merged sql/item_func.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_view.cc: Auto merged
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 7f0289d93db..50e0511ae96 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -15999,7 +15999,7 @@ static void test_bug21635()
char *query_end;
MYSQL_RES *result;
MYSQL_FIELD *field;
- unsigned int field_count, i;
+ unsigned int field_count, i, j;
int rc;
DBUG_ENTER("test_bug21635");
@@ -16015,14 +16015,20 @@ static void test_bug21635()
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (i INT)");
myquery(rc);
- rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
- myquery(rc);
+ /*
+ We need this loop to ensure correct behavior with both constant and
+ non-constant tables.
+ */
+ for (j= 0; j < 2 ; j++)
+ {
+ rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
+ myquery(rc);
- rc= mysql_real_query(mysql, query, query_end - query);
- myquery(rc);
+ rc= mysql_real_query(mysql, query, query_end - query);
+ myquery(rc);
- result= mysql_use_result(mysql);
- DIE_UNLESS(result);
+ result= mysql_use_result(mysql);
+ DIE_UNLESS(result);
field_count= mysql_field_count(mysql);
for (i= 0; i < field_count; ++i)
@@ -16038,7 +16044,8 @@ static void test_bug21635()
puts("OK");
}
- mysql_free_result(result);
+ mysql_free_result(result);
+ }
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);