diff options
author | unknown <konstantin@mysql.com> | 2004-10-26 22:42:16 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-10-26 22:42:16 +0400 |
commit | 91862626f1887136a9e0f55ca6413537ca88e792 (patch) | |
tree | fdf1e7e37e2fbdb793c8aca39ab5832c7ab2725a /tests | |
parent | f907ab97c25bccee8537910aa1dca7fee1abfe54 (diff) | |
download | mariadb-git-91862626f1887136a9e0f55ca6413537ca88e792.tar.gz |
Playing with test_bug5399() to make it work on HPUX 64 bit: no
reason for the failure was found, so the guess is that it is a
compiler bug.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client_test.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/tests/client_test.c b/tests/client_test.c index 31244395132..562f6e307d3 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -10285,10 +10285,11 @@ static void test_bug5399() statement id hash in the server uses binary collation. */ #define NUM_OF_USED_STMT 97 - MYSQL_STMT *stmt[NUM_OF_USED_STMT]; + MYSQL_STMT *stmt_list[NUM_OF_USED_STMT]; + MYSQL_STMT **stmt; MYSQL_BIND bind[1]; - char buff[500]; - int rc, i; + char buff[600]; + int rc; int32 no; myheader("test_bug5399"); @@ -10297,29 +10298,29 @@ static void test_bug5399() bind[0].buffer_type= MYSQL_TYPE_LONG; bind[0].buffer= &no; - for (i= 0; i < NUM_OF_USED_STMT; ++i) + for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt) { - stmt[i]= mysql_stmt_init(mysql); - sprintf(buff, "select %d", i); - rc= mysql_stmt_prepare(stmt[i], buff, strlen(buff)); - check_execute(stmt[i], rc); - mysql_stmt_bind_result(stmt[i], bind); + sprintf(buff, "select %d", stmt - stmt_list); + *stmt= mysql_stmt_init(mysql); + rc= mysql_stmt_prepare(*stmt, buff, strlen(buff)); + check_execute(*stmt, rc); + mysql_stmt_bind_result(*stmt, bind); } printf("%d statements prepared.\n", NUM_OF_USED_STMT); - for (i= 0; i < NUM_OF_USED_STMT; ++i) + for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt) { - rc= mysql_stmt_execute(stmt[i]); - check_execute(stmt[i], rc); - rc= mysql_stmt_store_result(stmt[i]); - check_execute(stmt[i], rc); - rc= mysql_stmt_fetch(stmt[i]); + rc= mysql_stmt_execute(*stmt); + check_execute(*stmt, rc); + rc= mysql_stmt_store_result(*stmt); + check_execute(*stmt, rc); + rc= mysql_stmt_fetch(*stmt); DIE_UNLESS(rc == 0); - DIE_UNLESS((int32) i == no); + DIE_UNLESS((int32) (stmt - stmt_list) == no); } - for (i= 0; i < NUM_OF_USED_STMT; ++i) - mysql_stmt_close(stmt[i]); + for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt) + mysql_stmt_close(*stmt); #undef NUM_OF_USED_STMT } |