Two specific statements in the above link …
“I would suggest turning MultiThreaded off on your MySQL Database object”
“when using ODBC databases, it is also a good idea to set MultiThreading to False”
Neither of these database sources have a “multithreaded” property. For the record, PostgreSQLDatabase does. It sounds to me like the poster in that NUG thread might be doing some very unsafe things with a database connection in his thread. If you end up with two threads using the same database connection, and the plugin isn’t thread-safe, only bad things can happen.
Here is what I would suggest. If your application uses threads, either:
(1) give each thread its own connection to your database server, or
(2) write a wrapper object with a CriticalSection protecting the database connection.
I have a few customers who have run into Web Edition hard app crashes with apps that use MySQL. The problem usually ends up being a trying to share a connection among multiple threads.
[quote=39496:@Brad Hutchings]Neither of these database sources have a “multithreaded” property. For the record, PostgreSQLDatabase does. It sounds to me like the poster in that NUG thread might be doing some very unsafe things with a database connection in his thread. If you end up with two threads using the same database connection, and the plugin isn’t thread-safe, only bad things can happen.
Here is what I would suggest. If your application uses threads, either:
(1) give each thread its own connection to your database server, or
(2) write a wrapper object with a CriticalSection protecting the database connection.
I have a few customers who have run into Web Edition hard app crashes with apps that use MySQL. The problem usually ends up being a trying to share a connection among multiple threads.[/quote]
Some database plugins, including MySQL, did have a MultiThreaded property that was an attempt to prevent database queries from blocking Xojo threads from running. This was extremely buggy and removed in 2013r3 in favor of a new mechanism that is transparent to users.