You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Merge branch '3.1' into 3.2
This commit is contained in:
@@ -2005,7 +2005,8 @@ int mthd_stmt_read_execute_response(MYSQL_STMT *stmt)
|
|||||||
/* Only cursor read */
|
/* Only cursor read */
|
||||||
stmt->default_rset_handler = _mysql_stmt_use_result;
|
stmt->default_rset_handler = _mysql_stmt_use_result;
|
||||||
|
|
||||||
} else if (stmt->flags & CURSOR_TYPE_READ_ONLY)
|
} else if (stmt->flags & CURSOR_TYPE_READ_ONLY &&
|
||||||
|
!(stmt->upsert_status.server_status & SERVER_MORE_RESULTS_EXIST))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We have asked for CURSOR but got no cursor, because the condition
|
We have asked for CURSOR but got no cursor, because the condition
|
||||||
|
@@ -5384,8 +5384,35 @@ static int test_conc525(MYSQL *mysql)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int test_conc566(MYSQL *mysql)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
MYSQL_STMT *stmt = mysql_stmt_init(mysql);
|
||||||
|
unsigned long cursor = CURSOR_TYPE_READ_ONLY;
|
||||||
|
const char* query= "call sp()";
|
||||||
|
|
||||||
|
rc= mysql_query(mysql,"drop procedure if exists sp");
|
||||||
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
|
rc= mysql_query(mysql,"create procedure sp() select 1");
|
||||||
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
|
rc= mysql_stmt_prepare(stmt,query,-1);
|
||||||
|
check_stmt_rc(rc, stmt);
|
||||||
|
|
||||||
|
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor);
|
||||||
|
check_stmt_rc(rc, stmt);
|
||||||
|
|
||||||
|
rc= mysql_stmt_execute(stmt);
|
||||||
|
check_stmt_rc(rc, stmt);
|
||||||
|
|
||||||
|
mysql_stmt_close(stmt);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
struct my_tests_st my_tests[] = {
|
struct my_tests_st my_tests[] = {
|
||||||
{"test_conc525", test_conc525, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc525", test_conc525, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
|
{"test_conc566", test_conc566, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_conc512", test_conc512, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc512", test_conc512, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_conc504", test_conc504, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_conc504", test_conc504, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
{"test_returning", test_returning, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
{"test_returning", test_returning, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||||
|
Reference in New Issue
Block a user