summaryrefslogtreecommitdiff
path: root/tests/mysql_client_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mysql_client_test.c')
-rw-r--r--tests/mysql_client_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 0a9fbd4abe6..0b3007dba06 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -9055,7 +9055,9 @@ static void test_ts()
int rc, field_count;
char name;
char query[MAX_TEST_QUERY_LENGTH];
-
+ const char *queries [3]= {"SELECT a, b, c FROM test_ts WHERE %c=?",
+ "SELECT a, b, c FROM test_ts WHERE %c=?",
+ "SELECT a, b, c FROM test_ts WHERE %c=CAST(? AS DATE)"};
myheader("test_ts");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_ts");
@@ -9127,7 +9129,7 @@ static void test_ts()
{
int row_count= 0;
- sprintf(query, "SELECT a, b, c FROM test_ts WHERE %c=?", name);
+ sprintf(query, queries[field_count], name);
if (!opt_silent)
fprintf(stdout, "\n %s", query);