MySQL Server returns connection TRUE but falsely


My app connects to a MySQL server, and executes the MySQL.Connect instruction every few seconds within a timer. The wait_timeout variable of the server is set to 5 minutes. If I put my Mac on sleep and wait a few hours, then reactivate the Mac, the instruction MySQL.Connect runs and returns TRUE, but in the processlist of the server, the user does not appear. So the app thinks it is connected but it is not. MySQL.Error returns false, i.e. there is no error.

However, if I reactivate the Mac after, for instance, 15 minutes, everything works fine.

Has anybody else encountered this problem. I use Xojo 2015r1.


How you connect to the mysql server? could you provide a code snippet?