diff options
author | Bernt M. Johnsen <bernt.johnsen@sun.com> | 2009-05-05 11:07:11 +0200 |
---|---|---|
committer | Bernt M. Johnsen <bernt.johnsen@sun.com> | 2009-05-05 11:07:11 +0200 |
commit | ef65e32d70913dd57c206b29a1a6935aa23de210 (patch) | |
tree | f187166f0d790a130ad943e67e5627bf0c986674 /tests | |
parent | f0791b8b6b02286a7a01b7659050f3bd900a3529 (diff) | |
download | mariadb-git-ef65e32d70913dd57c206b29a1a6935aa23de210.tar.gz |
Bug#23471 prepared for commit in 5.0 gca branch
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 9e026a27b6d..9dfacb7436d 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -3971,6 +3971,10 @@ static void test_fetch_date() myheader("test_fetch_date"); + /* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) /*/ + rc= mysql_query(mysql, "SET SQL_MODE=''"); + myquery(rc); + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_result"); myquery(rc); @@ -4685,6 +4689,9 @@ static void test_stmt_close() /* set AUTOCOMMIT to ON*/ mysql_autocommit(lmysql, TRUE); + rc= mysql_query(lmysql, "SET SQL_MODE = ''"); + myquery(rc); + rc= mysql_query(lmysql, "DROP TABLE IF EXISTS test_stmt_close"); myquery(rc); @@ -11855,6 +11862,9 @@ static void test_bug6058() myheader("test_bug6058"); + rc= mysql_query(mysql, "SET SQL_MODE=''"); + myquery(rc); + stmt_text= "SELECT CAST('0000-00-00' AS DATE)"; rc= mysql_real_query(mysql, stmt_text, (uint) strlen(stmt_text)); @@ -13026,6 +13036,9 @@ static void test_bug8378() if (!opt_silent) fprintf(stdout, " OK"); + rc= mysql_query(lmysql, "SET SQL_MODE=''"); + myquery(rc); + len= mysql_real_escape_string(lmysql, out, TEST_BUG8378_IN, 4); /* No escaping should have actually happened. */ @@ -16056,6 +16069,11 @@ static void test_bug31669() rc= mysql_query(mysql, query); myquery(rc); + strxmov(query, "GRANT ALL PRIVILEGES ON *.* TO '", user, "'@'localhost' IDENTIFIED BY " + "'", buff, "' WITH GRANT OPTION", NullS); + rc= mysql_query(mysql, query); + myquery(rc); + rc= mysql_query(mysql, "FLUSH PRIVILEGES"); myquery(rc); @@ -16093,7 +16111,7 @@ static void test_bug31669() strxmov(query, "DELETE FROM mysql.user WHERE User='", user, "'", NullS); rc= mysql_query(mysql, query); myquery(rc); - DIE_UNLESS(mysql_affected_rows(mysql) == 1); + DIE_UNLESS(mysql_affected_rows(mysql) == 2); #endif DBUG_VOID_RETURN; |