Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-06-08 11:30:55 +03:00
44 changed files with 274 additions and 182 deletions

View File

@ -19,8 +19,10 @@ void double_cursor(TestConnections& test, MYSQL* conn)
const char* query = "SELECT id FROM test.t1";
int rc = mysql_stmt_prepare(stmt1, query, strlen(query));
test.assert(rc == 0, "First prepare should work: %s %s", mysql_stmt_error(stmt1), mysql_error(conn));
int type = CURSOR_TYPE_READ_ONLY;
mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, &type);
unsigned long type = CURSOR_TYPE_READ_ONLY;
test.assert(mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, &type) == 0,
"Set of first attribute should work: %s %s",
mysql_stmt_error(stmt1), mysql_error(conn));
MYSQL_BIND bind[1] {};
uint32_t id;
@ -36,7 +38,9 @@ void double_cursor(TestConnections& test, MYSQL* conn)
MYSQL_STMT* stmt2 = mysql_stmt_init(conn);
rc = mysql_stmt_prepare(stmt2, query, strlen(query));
test.assert(rc == 0, "Second prepare should work: %s %s", mysql_stmt_error(stmt2), mysql_error(conn));
mysql_stmt_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, &type);
test.assert(mysql_stmt_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, &type) == 0,
"Set of second attribute should work: %s %s",
mysql_stmt_error(stmt2), mysql_error(conn));
mysql_stmt_bind_result(stmt2, bind);
test.assert(mysql_stmt_execute(stmt2) == 0, "Execute of second statement should work: %s %s",