Bug #64044 | Could not handle multiple INSERTs with C++ connector | ||
---|---|---|---|
Submitted: | 16 Jan 2012 18:57 | Modified: | 3 Jun 2022 16:17 |
Reporter: | Gilberto Queiroz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / C++ | Severity: | S3 (Non-critical) |
Version: | 1.1.0 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[16 Jan 2012 18:57]
Gilberto Queiroz
[19 Jan 2012 18:26]
Sveta Smirnova
Thank you for the report. Please provide full test case demonstrating the problem.
[25 Jan 2012 0:50]
Gilberto Queiroz
Hi Sveta Smirnova, thanks for your reply. I have attached a simple test case. Best regards, Gilberto
[30 Jan 2012 18:14]
Sveta Smirnova
Thank you for the feedback. Verified as described.
[23 Apr 2013 21:04]
Lawrenty Novitsky
That bug could be fixed(at least partly) in 1.1.2
[3 Jun 2022 16:17]
Luis Silva
Posted by developer: According to the JDBC docs, getMoreResults returns true if the returned result is a result set, otherwise, false. In your scenario, you are inserting data, so the getMoreResults() will always return false. To check properly if you gather all OK messages, you should check the getUpdateCount() (keep in mind that its status is clean (~0uul) after calling it. So proper way to not get the full results is: stmt->execute(insert1); // ok while (stmt->getMoreResults() || stmt->getUpdateCount() != ~0ull) { std::cout << "Still has results" << std::endl; } // Can now insert more data stmt->execute(insert2); // ok