Fixed linter error

This commit is contained in:
Juan Fernandez 2023-07-07 08:08:57 -04:00
parent de9a1540d0
commit 38661ad7b0
No known key found for this signature in database

View file

@ -1041,20 +1041,6 @@ func generateMysqlConnectionString(conf config.MysqlConfig) string {
return dsn
}
// isForeignKeyError checks if the provided error is a MySQL child foreign key
// error (Error #1452)
func isChildForeignKeyError(err error) bool {
err = ctxerr.Cause(err)
mysqlErr, ok := err.(*mysql.MySQLError)
if !ok {
return false
}
// https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_no_referenced_row_2
const ER_NO_REFERENCED_ROW_2 = 1452
return mysqlErr.Number == ER_NO_REFERENCED_ROW_2
}
type patternReplacer func(string) string
// likePattern returns a pattern to match m with LIKE.