I've faced a strange behaviour of LocalFailover. It looks like if it works for TMyQuery.Execute but doesn't work for TMyConnection.ExecSQL? The reconnect is done but the query isn't sent.
In TMyConncection I have:
LocalFailover=true
RetryMode := rmReconnectExecute (in OnConnectionLost)
When calling TMyQuery.Execute (when connection was lost) I get:
Code: Select all
Exception class EMySqlException with message 'Lost connection to MySQL server during query
Socket error on write. WSAGetLastError return 10054($2746)'
Exception class EMySqlException with message 'Lost connection to MySQL server during query
Socket error on write. WSAGetLastError return 10054($2746)'
Exception class EFailOver with message ''When calling TMyConnection.ExecSQL (when connection was lost) I get:
Code: Select all
Exception class EMySqlException with message 'Lost connection to MySQL server during query
Socket error on write. WSAGetLastError return 10054($2746)'
Exception class EMySqlException with message 'Lost connection to MySQL server during query
Socket error on write. WSAGetLastError return 10054($2746)'
Exception class EMyError with message 'Lost connection to MySQL server during query
Socket error on write. WSAGetLastError return 10054($2746)'Regards,
Crafty