diff options
author | konstantin@mysql.com <> | 2006-01-17 23:19:43 +0300 |
---|---|---|
committer | konstantin@mysql.com <> | 2006-01-17 23:19:43 +0300 |
commit | 19fd36e2540be2e807b71fd4350d6893889308e2 (patch) | |
tree | 7343d2cb12f04793c22754656de1bbae281ffbca /tests | |
parent | 70bb06685b15b38643440e35ae3db79e91c0ba9e (diff) | |
download | mariadb-git-19fd36e2540be2e807b71fd4350d6893889308e2.tar.gz |
A fix and a test case for Bug#16144 "mysql_stmt_attr_get type error":
use the right type in mysql_stmt_attr_get
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index f0566995262..797a0b1b8d7 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -11753,6 +11753,25 @@ static void test_bug12925() } +/* Bug #16144: mysql_stmt_attr_get type error */ + +static void test_bug16144() +{ + const my_bool flag_orig= (my_bool) 0xde; + my_bool flag= flag_orig; + MYSQL_STMT *stmt; + myheader("test_bug16144"); + + /* Check that attr_get returns correct data on little and big endian CPUs */ + stmt= mysql_stmt_init(mysql); + mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); + mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); + DIE_UNLESS(flag == flag_orig); + + mysql_stmt_close(stmt); +} + + /* Read and parse arguments and MySQL options from my.cnf */ @@ -11974,6 +11993,7 @@ static struct my_tests_st my_tests[]= { { "test_bug12001", test_bug12001 }, { "test_bug11718", test_bug11718 }, { "test_bug12925", test_bug12925 }, + { "test_bug16144", test_bug16144 }, { 0, 0 } }; |