diff options
author | unknown <msvensson@devsrv-b.mysql.com> | 2006-02-15 13:45:03 +0100 |
---|---|---|
committer | unknown <msvensson@devsrv-b.mysql.com> | 2006-02-15 13:45:03 +0100 |
commit | 69ede4d9d439e93a72b3468ad16d14da9eef52bf (patch) | |
tree | 6bcd658b60445fde0f370a9e51708343e86aac6b /tests | |
parent | 86c920ba776ddf5e9999e8293d5824be25bb43b6 (diff) | |
download | mariadb-git-69ede4d9d439e93a72b3468ad16d14da9eef52bf.tar.gz |
Bug#16143 mysql_stmt_sqlstate returns an empty string instead of '00000'
- Init sql_state in mysql_stmt_init
libmysql/libmysql.c:
Init sql_state to not_error_sql_state in mysql_init
tests/mysql_client_test.c:
Add test for mysql_stmt_sqlstate after mysql_stmt_init
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 666c60391da..241a994d07c 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -14729,6 +14729,21 @@ static void test_bug12744() client_connect(0); } +/* Bug #16143: mysql_stmt_sqlstate returns an empty string instead of '00000' */ + +static void test_bug16143() +{ + MYSQL_STMT *stmt; + myheader("test_bug16143"); + + stmt= mysql_stmt_init(mysql); + /* Check mysql_stmt_sqlstate return "no error" */ + DIE_UNLESS(strcmp(mysql_stmt_sqlstate(stmt), "00000") == 0); + + mysql_stmt_close(stmt); +} + + /* Bug #16144: mysql_stmt_attr_get type error */ static void test_bug16144() @@ -15073,6 +15088,7 @@ static struct my_tests_st my_tests[]= { { "test_bug15510", test_bug15510 }, { "test_opt_reconnect", test_opt_reconnect }, { "test_bug12744", test_bug12744 }, + { "test_bug16143", test_bug16143 }, { "test_bug16144", test_bug16144 }, { "test_bug15613", test_bug15613 }, { 0, 0 } |