Fun With MySQL
Error in my_thread_global_end(): 1 threads didn’t exit
If you get an error like that you need to upgrade your installation of MySQL to the latest version. If you’re using PHP then you need to update to the latest version of PHP. With .Net and languages like C# you are probably using the 3.51 ODBC driver to connect to MySQL. You’ll need to update to version 5.1 of the driver.
I’ve found that there’s not a lot of information on the net concerning this issue with C#. This is probably because .Net developers are writing web-apps which will silently ignore the error or they are running apps which exit and close the window so they never see the message. The only time you can see the error when coding in .Net is if you run a console app from the command line and the program otherwise cleanly exits. If you break out of the program you won’t see it.
Who uses C# to write console apps?
Fortunatly the error is not really an error. It’s a counting bug. MySQL sees your app’s thread and includes it in the thread count. MySQL exits first when your app closes and it sees that 1 thread is still open that it can’t account for so it throws an error.
The threads that alledgedly didn’t exit belong to your app and your app did in fact close so there are no threads that didn’t actually exit.
It looks scary but the error doesn’t mean there is an error in your app. It means that the MySQL lib can’t count.
Leave a comment
You must be logged in to post a comment.