We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf7f34f commit 6d49eb5Copy full SHA for 6d49eb5
packets.go
@@ -563,7 +563,8 @@ func (mc *mysqlConn) handleErrorPacket(data []byte) error {
563
errno := binary.LittleEndian.Uint16(data[1:3])
564
565
// 1792: ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION
566
- if errno == 1792 && mc.cfg.RejectReadOnly {
+ // 1290: ER_OPTION_PREVENTS_STATEMENT (returned by Aurora during failover)
567
+ if (errno == 1792 || errno == 1290) && mc.cfg.RejectReadOnly {
568
// Oops; we are connected to a read-only connection, and won't be able
569
// to issue any write statements. Since RejectReadOnly is configured,
570
// we throw away this connection hoping this one would have write
0 commit comments