diff options
author | unknown <msvensson@shellback.(none)> | 2006-11-29 15:44:09 +0100 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-11-29 15:44:09 +0100 |
commit | 038c777c005c466a5840781d64818d5970da3cb2 (patch) | |
tree | 9a20c4415bb69ebb31576302a0e46beb9863997e /tests | |
parent | 8878c65f0eec860370f80416fc8031c373363bdd (diff) | |
parent | 76a41731a37a1a4ecd1f208464326efc103d409c (diff) | |
download | mariadb-git-038c777c005c466a5840781d64818d5970da3cb2.tar.gz |
Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysql_upgrade.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/yassl/src/ssl.cpp:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/system_mysql_db_fix30020.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_table.cc:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Remove fix as it conflicts with "import from yassl" and it's been
fixed there
sql/ha_ndbcluster.cc:
Merge fix of warnings
sql/sql_base.cc:
Merge
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 39 | ||||
-rw-r--r-- | tests/mysql_client_test.c.rej | 20 |
2 files changed, 56 insertions, 3 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index a44ada5dd72..56b665b098e 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -33,6 +33,7 @@ #include <errmsg.h> #include <my_getopt.h> #include <m_string.h> +#include <mysqld_error.h> #define VER "2.1" #define MAX_TEST_QUERY_LENGTH 300 /* MAX QUERY BUFFER LENGTH */ @@ -12017,13 +12018,21 @@ static void test_bug6081() rc= simple_command(mysql, COM_DROP_DB, current_db, (ulong)strlen(current_db), 0); - myquery(rc); + if (rc == 0 && mysql_errno(mysql) != ER_UNKNOWN_COM_ERROR) + { + myerror(NULL); /* purecov: inspected */ + die(__FILE__, __LINE__, "COM_DROP_DB failed"); /* purecov: inspected */ + } rc= simple_command(mysql, COM_DROP_DB, current_db, (ulong)strlen(current_db), 0); myquery_r(rc); rc= simple_command(mysql, COM_CREATE_DB, current_db, (ulong)strlen(current_db), 0); - myquery(rc); + if (rc == 0 && mysql_errno(mysql) != ER_UNKNOWN_COM_ERROR) + { + myerror(NULL); /* purecov: inspected */ + die(__FILE__, __LINE__, "COM_CREATE_DB failed"); /* purecov: inspected */ + } rc= simple_command(mysql, COM_CREATE_DB, current_db, (ulong)strlen(current_db), 0); myquery_r(rc); @@ -13686,7 +13695,8 @@ static void test_bug11172() hired.year, hired.month, hired.day); } DIE_UNLESS(rc == MYSQL_NO_DATA); - mysql_stmt_free_result(stmt) || mysql_stmt_reset(stmt); + if (!mysql_stmt_free_result(stmt)) + mysql_stmt_reset(stmt); } mysql_stmt_close(stmt); mysql_rollback(mysql); @@ -14828,6 +14838,8 @@ static void test_opt_reconnect() } +#ifndef EMBEDDED_LIBRARY + static void test_bug12744() { MYSQL_STMT *prep_stmt = NULL; @@ -14859,6 +14871,8 @@ static void test_bug12744() client_connect(0); } +#endif /* EMBEDDED_LIBRARY */ + /* Bug #16143: mysql_stmt_sqlstate returns an empty string instead of '00000' */ static void test_bug16143() @@ -15471,6 +15485,24 @@ static void test_bug21206() } /* + Ensure we execute the status code while testing +*/ + +static void test_status() +{ + const char *status; + DBUG_ENTER("test_status"); + myheader("test_status"); + + if (!(status= mysql_stat(mysql))) + { + myerror("mysql_stat failed"); /* purecov: inspected */ + die(__FILE__, __LINE__, "mysql_stat failed"); /* purecov: inspected */ + } + DBUG_VOID_RETURN; +} + +/* Bug#21726: Incorrect result with multiple invocations of LAST_INSERT_ID @@ -15786,6 +15818,7 @@ static struct my_tests_st my_tests[]= { { "test_bug19671", test_bug19671 }, { "test_bug21206", test_bug21206 }, { "test_bug21726", test_bug21726 }, + { "test_status", test_status}, { 0, 0 } }; diff --git a/tests/mysql_client_test.c.rej b/tests/mysql_client_test.c.rej new file mode 100644 index 00000000000..400ffee8a5e --- /dev/null +++ b/tests/mysql_client_test.c.rej @@ -0,0 +1,20 @@ +*************** +*** 15693,15700 **** + { "test_bug17667", test_bug17667 }, + { "test_bug15752", test_bug15752 }, + { "test_mysql_insert_id", test_mysql_insert_id }, +! { "test_bug19671", test_bug19671}, +! { "test_bug21206", test_bug21206}, + { 0, 0 } + }; + +--- 15776,15784 ---- + { "test_bug17667", test_bug17667 }, + { "test_bug15752", test_bug15752 }, + { "test_mysql_insert_id", test_mysql_insert_id }, +! { "test_bug19671", test_bug19671 }, +! { "test_bug21206", test_bug21206 }, +! { "test_bug21726", test_bug21726 }, + { 0, 0 } + }; + |