[ODBC-117] Connector shouldn't deploy MariaDB bulk functionality for statements other than INSERT and UPDATE Created: 2017-09-29 Updated: 2017-10-06 Resolved: 2017-09-30 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | 3.0.1 |
| Fix Version/s: | 3.0.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
10.2 server |
||
| Description |
|
Server supports prepared statements bulk operations for INSERT and UPDATE, and not for DELETE, in particular. That might change with new releases, but currently that will result in error, if application tries to DELETE with parameters array. Code to repeat the problem ; ; , id_ind[]= {4, 4, 4}; OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS t_bulk_delete"); CHECK_STMT_RC(Stmt, SQLFreeStmt(Stmt, SQL_CLOSE)); CHECK_STMT_RC(Stmt, SQLSetStmtAttr(Stmt, SQL_ATTR_PARAMSET_SIZE, OK_SIMPLE_STMT(Stmt, "INSERT INTO t_bulk_delete VALUES(?, ?)"); CHECK_STMT_RC(Stmt, SQLSetStmtAttr(Stmt, SQL_ATTR_PARAMSET_SIZE, OK_SIMPLE_STMT(Stmt, "SELECT id, val FROM t_bulk_insert"); CHECK_STMT_RC(Stmt, SQLFetch(Stmt)); EXPECT_STMT(Stmt, SQLFetch(Stmt), SQL_NO_DATA); CHECK_STMT_RC(Stmt, SQLFreeStmt(Stmt, SQL_CLOSE)); CHECK_STMT_RC(Stmt, SQLSetStmtAttr(Stmt, SQL_ATTR_ROW_ARRAY_SIZE, OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS t_bulk_delete"); return OK; |
| Comments |
| Comment by Lawrin Novitsky [ 2017-09-30 ] |
|
The fix has been pushed as part of d6ce17918492e8fdb1d6203dae1c1b787403402d commit. Testcase had been pushed separately(previous commit) |