diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-11-16 14:38:45 +0200 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2006-11-16 14:38:45 +0200 |
commit | 2e8649a79a5b62c5f2d1d85569cee701eba1ee2d (patch) | |
tree | fbfd8ce3fe966d9fea0eb430ffc945cd4d6c9212 /tests/mysql_client_test.c | |
parent | 666ca5c9ea0a20da908e5df3f316dace686c20b1 (diff) | |
parent | 74c6c6c957b5acd43cd8a33bcbb7c62cd8731ceb (diff) | |
download | mariadb-git-2e8649a79a5b62c5f2d1d85569cee701eba1ee2d.tar.gz |
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
BUILD/SETUP.sh:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/item_timefunc.cc:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/mysqld.cc.rej:
manual merge
Diffstat (limited to 'tests/mysql_client_test.c')
-rw-r--r-- | tests/mysql_client_test.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index a44ada5dd72..ce3f9370da2 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); @@ -15471,6 +15480,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 +15813,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 } }; |