From: ingo Date: December 8 2005 6:56am Subject: bk commit into 5.0 tree (ingo:1.1983) List-Archive: http://lists.mysql.com/commits/37 Message-Id: Below is the list of changes that have just been committed into a local 5.0 repository of mydev. When mydev does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1983 05/12/08 07:56:07 ingo@stripped +1 -0 Merge mysql.com:/home/mydev/mysql-5.0 into mysql.com:/home/mydev/mysql-5.0-bug10932 tests/mysql_client_test.c 1.167 05/12/08 07:55:54 ingo@stripped +0 -0 Auto merged # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: ingo # Host: chilla.local # Root: /home/mydev/mysql-5.0-bug10932/RESYNC --- 1.166/tests/mysql_client_test.c 2005-12-02 16:27:13 +01:00 +++ 1.167/tests/mysql_client_test.c 2005-12-08 07:55:54 +01:00 @@ -14590,6 +14590,40 @@ myquery(rc); } + +/* + Bug #15510: mysql_warning_count returns 0 after mysql_stmt_fetch which + should warn +*/ +static void test_bug15510() +{ + MYSQL_STMT *stmt; + MYSQL_RES *res; + int rc; + const char *query= "select 1 from dual where 1/0"; + + myheader("test_bug15510"); + + rc= mysql_query(mysql, "set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'"); + myquery(rc); + + stmt= mysql_stmt_init(mysql); + + rc= mysql_stmt_prepare(stmt, query, strlen(query)); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + rc= mysql_stmt_fetch(stmt); + DIE_UNLESS(mysql_warning_count(mysql)); + + /* Cleanup */ + mysql_stmt_close(stmt); + rc= mysql_query(mysql, "set @@sql_mode=''"); + myquery(rc); +} + /* Read and parse arguments and MySQL options from my.cnf */ @@ -14849,6 +14883,7 @@ { "test_bug13488", test_bug13488 }, { "test_bug13524", test_bug13524 }, { "test_bug14845", test_bug14845 }, + { "test_bug15510", test_bug15510}, { 0, 0 } };