[ODBC-16] On the long run on single connection the connector increases number of open prepared statements Created: 2014-10-22 Updated: 2015-02-07 Resolved: 2015-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | 1.0.0 |
| Fix Version/s: | 1.0.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
If you run something like for (i= 0; i < 100000; ++i) { OK_SIMPLE_STMT(Stmt, "DROP TABLE IF EXISTS t1"); OK_SIMPLE_STMT(Stmt, "CREATE TABLE t1 (a int)"); OK_SIMPLE_STMT(Stmt, "INSERT INTO t1 VALUES(1);INSERT INTO t1 VALUES(2)"); SQLRowCount(Stmt, &num_inserted); diag("inserted: %d(run #%d)", num_inserted, i); FAIL_IF(num_inserted != 1, "Expected 1 row inserted"); rc= SQLMoreResults(Stmt); num_inserted= 0; rc= SQLRowCount(Stmt, &num_inserted); FAIL_IF(num_inserted != 1, "Expected 1 row inserted"); rc= SQLMoreResults(Stmt); FAIL_IF(rc != SQL_NO_DATA, "expected no more results"); SQLFreeStmt(Stmt, SQL_CLOSE); } return OK; The patch to fix the problem is in the attached odbc16.diff file |
| Comments |
| Comment by Lawrin Novitsky [ 2014-10-22 ] |
|
The fix has been pushed as rev#41 |
| Comment by Lawrin Novitsky [ 2014-11-11 ] |
|
The testcase for the bug has been pushed as patch of rev#43, in revision #44 the important change for the original patch has been pushed |
| Comment by Lawrin Novitsky [ 2015-02-07 ] |
|
Took pause and did not close the issue - was not sure that the fix covers all possible scenarios. But seems like it does the job well. |