• Daniel Vrátil's avatar
    Send dummy queries to MySQL to keep the connection alive · a2ada719
    Daniel Vrátil authored
    MySQL server will drop connection when there's no query for longer
    period of time. The timeout does not seem to be configurable and
    QSqlDatabase is unable to detect that the connection has been dropped
    and isValid() and isOpen() will still return true.
    To work around this problem, we send a dummy SQL query to MySQL
    every hour. It has been confirmed by long-term testing that
    this is enough.