diff options
author | unknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2005-07-21 01:29:57 -0400 |
---|---|---|
committer | unknown <pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2005-07-21 01:29:57 -0400 |
commit | 0b732c47973622384b97caccb9703b9bd5a4a93e (patch) | |
tree | f28d036bdc60c31c38b1d066b2d9e02fa4e980e6 /tests | |
parent | 1ef3c69685de83a28ce44588f70df808c16df1ce (diff) | |
parent | 31ebc6ef71afaf4605ab5d00ddaf8d548683212d (diff) | |
download | mariadb-git-0b732c47973622384b97caccb9703b9bd5a4a93e.tar.gz |
Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
include/my_sys.h:
Auto merged
include/thr_lock.h:
Auto merged
sql/handler.cc:
Auto merged
sql-common/client.c:
Auto merged
client/mysqldump.c:
Manual merge
include/mysql.h:
Manual merge
libmysql/libmysql.c:
Manual merge
myisam/rt_split.c:
Manual merge
mysys/thr_lock.c:
Manual merge
sql/lock.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/sql_base.cc:
Manual merge
sql/sql_table.cc:
Manual merge
tests/mysql_client_test.c:
Manual merge
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 78948548716..53708a7a741 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -13888,6 +13888,50 @@ static void test_bug10760() mysql_autocommit(mysql, TRUE); /* restore default */ } +static void test_bug12001() +{ + MYSQL *mysql_local; + MYSQL_RES *result; + const char *query= "DROP TABLE IF EXISTS test_table;" + "CREATE TABLE test_table(id INT);" + "INSERT INTO test_table VALUES(10);" + "UPDATE test_table SET id=20 WHERE id=10;" + "SELECT * FROM test_table;" + "INSERT INTO non_existent_table VALUES(11);"; + int rc, res; + + myheader("test_bug12001"); + + if (!(mysql_local= mysql_init(NULL))) + { + fprintf(stdout, "\n mysql_init() failed"); + exit(1); + } + + /* Create connection that supports multi statements */ + if (!mysql_real_connect(mysql_local, opt_host, opt_user, + opt_password, current_db, opt_port, + opt_unix_socket, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS)) { + fprintf(stdout, "\n mysql_real_connect() failed"); + exit(1); + } + + rc= mysql_query(mysql_local, query); + myquery(rc); + + do { + if (mysql_field_count(mysql_local) && (result= mysql_use_result(mysql_local))) { + mysql_free_result(result); + } + } while (!(res= mysql_next_result(mysql_local))); + + rc= mysql_query(mysql_local, "DROP TABLE IF EXISTS test_table"); + myquery(rc); + + mysql_close(mysql_local); + DIE_UNLESS(res==1); +} + /* Read and parse arguments and MySQL options from my.cnf */ @@ -14133,6 +14177,7 @@ static struct my_tests_st my_tests[]= { { "test_bug11183", test_bug11183 }, { "test_bug11037", test_bug11037 }, { "test_bug10760", test_bug10760 }, + { "test_bug12001", test_bug12001 }, { 0, 0 } }; |