We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 255d1ad commit 85c6311Copy full SHA for 85c6311
packets.go
@@ -574,7 +574,8 @@ func (mc *mysqlConn) handleErrorPacket(data []byte) error {
574
575
// 1792: ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION
576
// 1290: ER_OPTION_PREVENTS_STATEMENT (returned by Aurora during failover)
577
- if (errno == 1792 || errno == 1290) && mc.cfg.RejectReadOnly {
+ // 1836: ER_READ_ONLY_MODE
578
+ if (errno == 1792 || errno == 1290 || errno == 1836) && mc.cfg.RejectReadOnly {
579
// Oops; we are connected to a read-only connection, and won't be able
580
// to issue any write statements. Since RejectReadOnly is configured,
581
// we throw away this connection hoping this one would have write
0 commit comments