diff options
author | unknown <serg@mysql.com> | 2006-05-24 14:37:18 +0200 |
---|---|---|
committer | unknown <serg@mysql.com> | 2006-05-24 14:37:18 +0200 |
commit | 723eed2401533b5ef2f0ba5cea5c79c2a958b944 (patch) | |
tree | 97a5037a420d7ee0a901d89aed222ad6327661ae /tests | |
parent | 4cf24a5160129c6f8d292417e81539f2faf6b2c8 (diff) | |
parent | 6355f74e4d35d457771fe45f8f5331a3174226a4 (diff) | |
download | mariadb-git-723eed2401533b5ef2f0ba5cea5c79c2a958b944.tar.gz |
Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into mysql.com:/data0/mysqldev/my/mysql-5.1-release
extra/comp_err.c:
Auto merged
mysql-test/r/ctype_sjis.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
configure.in:
merged
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index d927b27ab37..e3159cfa5e5 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -12794,25 +12794,26 @@ from t2);"); static void test_bug8378() { #if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY) - MYSQL *lmysql; + MYSQL *old_mysql=mysql; char out[9]; /* strlen(TEST_BUG8378)*2+1 */ - int len; + char buf[256]; + int len, rc; myheader("test_bug8378"); if (!opt_silent) fprintf(stdout, "\n Establishing a test connection ..."); - if (!(lmysql= mysql_init(NULL))) + if (!(mysql= mysql_init(NULL))) { myerror("mysql_init() failed"); exit(1); } - if (mysql_options(lmysql, MYSQL_SET_CHARSET_NAME, "gbk")) + if (mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "gbk")) { myerror("mysql_options() failed"); exit(1); } - if (!(mysql_real_connect(lmysql, opt_host, opt_user, + if (!(mysql_real_connect(mysql, opt_host, opt_user, opt_password, current_db, opt_port, opt_unix_socket, 0))) { @@ -12822,12 +12823,18 @@ static void test_bug8378() if (!opt_silent) fprintf(stdout, " OK"); - len= mysql_real_escape_string(lmysql, out, TEST_BUG8378_IN, 4); + len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); /* No escaping should have actually happened. */ DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0); - mysql_close(lmysql); + sprintf(buf, "SELECT '%s'", out); + rc=mysql_real_query(mysql, buf, strlen(buf)); + myquery(rc); + + mysql_close(mysql); + + mysql=old_mysql; #endif } |