Fixed Mysqli\ReplicationAdapter::makeConnection does not behave like Mysqli\Adapter::makeConnection

Xon

Well-known member
Affected version
2.1.8
On a connection failure, ReplicationAdapter::makeConnection emits a a php warning/ErrorException" instead of a \XF\DB\Exception.

The ReplicationAdapter also does not support the charset option like the normal adapter does.

Some nice to haves;
  • IMO, it would make sense that getTypeConnection should retry on the 'write' connection instead of the 'read' connection if the connection fails.
  • It would be nice if the mysqli connection timeout was surfaced for both adapters.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.9).

Change log:
Ensure the MySQL replication adapter throws the correct exception on failure and supports the charset option.
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom