For example I pass this string to the
When I run several thousand of this command via
mysql_query() then the command is NOT submitted to the MySQL server!
I checked the MySQL log file and I couldn't believe it but the command wasn't there and therefore the
mysql_query() does never return because it doesn't receive any answer from the server.
MySql is writing the command into the log file BEFORE it gets executed. I tried it with
I know, it does mean that much but it was working for 3 years without any issue on SLES 11.3/XenServer 6.5. Note: This is an MCVE where it doesn't work as well!
Since I moved it to SLES 12.3 and XenServer 7.4 the problems started.
The C++ code is very simple - I have checked it for 3 weeks before I wrote this question. The point is that this issue starts after ~10k queries. The VM has still ~3 GB RAM free.
Note regarding an MCVE:
I created an MCVE which works for more than 500k executions of the MySQL command.
When I insert this MCVE code into my project and comment my existing
main() in order to execute the main function from the MCVE then after few thousand [or even only hundred] of executions suddenly the MySQL command is again not submitted to the MySQL server.
To be more specific: Only static objects of my project are initialized before the embedded MCVE runs.
This must be something very strange regarding these static initializations because no other line of code is running.
Any idea what is going on? Especially the fact that the command is apparently [why should I doubt the MySQL Server log file] not submitted from the C API client to the MySQL server is really disturbing me.
- SLES 12.3 running on XenServer 7.4 as VM
- Compiled with
-std=c++17and almost every warning option.
- Using the default SLES 12.3 glibc 2.22 with all SLES updates installed.
- Connecting to MySQL Community Server 5.7.21
- C API client 5.7.21