From e26aef9f64d01b6e4face9422274a1058d73a061 Mon Sep 17 00:00:00 2001 From: "Reggie@xgeek." <> Date: Thu, 10 Aug 2006 17:39:01 -0500 Subject: [PATCH] Some small cleanups that will help get mysql_client_test passing on Windows --- tests/mysql_client_test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 2463840bd0c..a1208521e8d 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -3976,6 +3976,7 @@ static void test_fetch_date() c7 timestamp(6))"); myquery(rc); + rc= mysql_query(mysql, "SET SQL_MODE=''"); rc= mysql_query(mysql, "INSERT INTO test_bind_result VALUES('2002-01-02', \ '12:49:00', \ '2002-01-02 17:46:59', \ @@ -8350,6 +8351,7 @@ static void test_bug19671() int rc; myheader("test_bug19671"); + mysql_query(mysql, "set sql_mode=''"); rc= mysql_query(mysql, "drop table if exists t1"); myquery(rc); @@ -8920,7 +8922,7 @@ static void test_bug1500() rc= mysql_query(mysql, "DROP TABLE test_bg1500"); myquery(rc); - rc= mysql_query(mysql, "CREATE TABLE test_bg1500 (s VARCHAR(25), FULLTEXT(s))"); + rc= mysql_query(mysql, "CREATE TABLE test_bg1500 (s VARCHAR(25), FULLTEXT(s)) engine=MyISAM"); myquery(rc); rc= mysql_query(mysql, @@ -12020,6 +12022,7 @@ static void test_bug6096() rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text)); myquery(rc); + mysql_query(mysql, "set sql_mode=''"); stmt_text= "create table t1 (c_tinyint tinyint, c_smallint smallint, " " c_mediumint mediumint, c_int int, " " c_bigint bigint, c_float float, " @@ -12904,7 +12907,9 @@ static void test_bug8378() /* No escaping should have actually happened. */ DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0); - sprintf(buf, "SELECT '%s'", out); + strcpy(buf, "SELECT '"); + memcpy(buf+8, out, len); + buf[8+len] = '\''; rc=mysql_real_query(mysql, buf, strlen(buf)); myquery(rc);