Improve MySQL error detection
#36932

kirs wants to merge kirs:mysql2-filsort-abort into rails:master

We do not currently have an analysis of these two commits