Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/mysql/sql_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func convertToMysqlError(err error) error {
return NewSQLError(mysqlCode.num, mysqlCode.state, err.Error())
}

var isGRPCOverflowRE = regexp.MustCompile(`.*grpc: received message larger than max \(\d+ vs. \d+\)`)
var isGRPCOverflowRE = regexp.MustCompile(`.*?grpc: (received|trying to send) message larger than max \(\d+ vs. \d+\)`)

func demuxResourceExhaustedErrors(msg string) int {
switch {
Expand Down
3 changes: 3 additions & 0 deletions go/mysql/sql_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func TestDumuxResourceExhaustedErrors(t *testing.T) {
{"grpc: received message larger than max (99282 vs. 1234): trailer", ERNetPacketTooLarge},
{"grpc: received message larger than max (1234 vs. 1234)", ERNetPacketTooLarge},
{"header: grpc: received message larger than max (1234 vs. 1234)", ERNetPacketTooLarge},
{"grpc: trying to send message larger than max (18015277 vs. 16777216)", ERNetPacketTooLarge},
{"grpc: trying to send message larger than max (18015277 vs. 16777216): trailer", ERNetPacketTooLarge},
{"header: grpc: trying to send message larger than max (18015277 vs. 16777216)", ERNetPacketTooLarge},
// This should be explicitly handled by returning ERNetPacketTooLarge from the execturo directly
// and therefore shouldn't need to be teased out of another error.
{"in-memory row count exceeded allowed limit of 13", ERTooManyUserConnections},
Expand Down