| Bug #100874 | ec 2013 : Lost connection to MySQL server during query | ||
|---|---|---|---|
| Submitted: | 17 Sep 2020 8:51 | Modified: | 23 Oct 2020 11:46 |
| Reporter: | s s | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | Connector / C++ | Severity: | S3 (Non-critical) |
| Version: | 1.1.7 | OS: | Debian (stretch) |
| Assigned to: | CPU Architecture: | Any | |
[22 Sep 2020 12:35]
MySQL Verification Team
Hi Mr. s, Thank you for your bug report. However, I do not see how we can help you. We do not have a version of Connector/C++ which has version 1.1.7. Our current version is 8.0.21. Hence, you are probably not using our software. I can only tell you that you have probably hit some timeout, but that can be found out only if you would print error number that you get.
[23 Oct 2020 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".

Description: Hi all, Recently I trying to using connector cpp 1.1.7 to access mysql server(both os is Debian stretch),but encounter "Lost connection to MySQL server during query" problem.It happens when i using transaction, my transaction code looks like : bool ExecTransaction(const std::vector<std::string>& sqls) { sql::Statement* statement = nullptr; sql::Connection* conn = nullptr; conn = GetConnection(); // for simple, delete code is not written here try { conn->setSchema(schema); statement = conn->createStatement(); conn->setAutoCommit(false); for (auto& sql : sqls) { statement->execute(sql); } conn->commit(); return true; } catch (sql::SQLException& e) { goto rollback; } catch (std::runtime_error& e) { goto rollback; } rollback: try { conn->rollback(); return false; } catch (sql::SQLException& e) { return false; } catch (std::runtime_error& e) { return false; } } Is there any problem here?Why this problem won't happen if i don't use transaction. How to repeat: hard to describe,in my situation it happened