Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.19, 3.3.3
-
None
Description
mysql_reset_connection returns error 2014 (commands out of sync) if there are multiple result sets.
static int test_reset2(MYSQL *my __attribute__((unused))) |
{
|
MYSQL *mysql= mysql_init(NULL);
|
int rc; |
|
if (!my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) |
{
|
diag("Connection failed. Error: %s", mysql_error(mysql)); |
mysql_close(mysql);
|
return FAIL; |
}
|
|
rc= mysql_query(mysql, "CREATE OR REPLACE PROCEDURE test_reset() " |
"BEGIN " |
" SELECT 1;" |
" SELECT 2;" |
"END"); |
check_mysql_rc(rc, mysql);
|
|
rc= mysql_query(mysql, "CALL test_reset()"); |
check_mysql_rc(rc, mysql);
|
|
rc= mysql_reset_connection(mysql);
|
check_mysql_rc(rc, mysql);
|
|
rc= mysql_ping(mysql);
|
check_mysql_rc(rc, mysql);
|
|
rc= mysql_query(mysql, "DROP PROCEDIRE test_reset"); |
check_mysql_rc(rc, mysql);
|
|
mysql_close(mysql);
|
return OK; |
}
|