mysql_stmt_store_result() does not work after an unsuccessfull call to mysql_stmt_bind_result()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
Undecided
|
Unassigned |
Bug Description
A mysql_stmt_
Example:
int test_store_
{
MYSQL *stmt;
int rc;
char *query= "SELECT 'foo' FROM DUAL";
stmt = mysql_stmt_
FAIL_IF(!stmt, "stmt_init failed");
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
/* here we store the result set without binding, bind variables
are required for fetch only */
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
mysql_
}
int test_store_
{
MYSQL *stmt;
MYSQL_BIND bind[1];
int rc;
char *query= "SELECT 'foo' FROM DUAL";
stmt = mysql_stmt_
FAIL_IF(!stmt, "stmt_init failed");
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
/* Geometry is not supported, mysql_bind_result should fail */
memset(bind, 0, sizeof(bind));
bind[
rc= mysql_stmt_
FAIL_IF(!rc, "Expected error (unsupported buffer type)");
/* We didn't bind as in test_store_
fails, since it checks for stmt->lasterrno */
rc= mysql_stmt_
FAIL_IF(rc, mysql_stmt_
mysql_
}
Changed in maria: | |
assignee: | nobody → Sergei (sergii) |
Changed in maria: | |
assignee: | Sergei (sergii) → nobody |