Skip to content

Commit

Permalink
add more error filter
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Feb 15, 2022
1 parent 334e0d3 commit 7f3dfbd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ddl/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ func dmlIgnoreError(err error) bool {
strings.Contains(errStr, "Bad Number") ||
strings.Contains(errStr, "invalid year") ||
strings.Contains(errStr, "value is out of range in") ||
strings.Contains(errStr, "Data Too Long") {
strings.Contains(errStr, "Data Too Long") ||
strings.Contains(errStr, "cannot convert datum from decimal to type year") {
return true
}
return false
Expand Down Expand Up @@ -175,16 +176,18 @@ func ddlIgnoreError(err error) bool {
strings.Contains(errStr, "Unsupported modifying collation of column") ||
strings.Contains(errStr, "Data truncated") ||
strings.Contains(errStr, "Bad Number") ||
strings.Contains(errStr, "cannot convert")||
strings.Contains(errStr, "Data Too Long")||
strings.Contains(errStr, "cannot convert") ||
strings.Contains(errStr, "Data Too Long") ||
// eg: For v"BLOB/TEXT column '319de167-6d2e-4778-966c-60b95103a02c' used in key specification without a key length"
strings.Contains(errStr, "used in key specification without a key length") {
strings.Contains(errStr, "used in key specification without a key length") ||
strings.Contains(errStr, "Too many keys specified; max 64 keys allowed") ||
strings.Contains(errStr, "BLOB/TEXT/JSON column can't have a default value") {
fmt.Println(errStr)
return true
}
if strings.Contains(errStr, "table doesn't exist") ||
strings.Contains(errStr, "doesn't have a default value") ||
strings.Contains(errStr,"with composite index covered or Primary Key covered now") ||
strings.Contains(errStr, "with composite index covered or Primary Key covered now") ||
strings.Contains(errStr, "is not exists") || strings.Contains(errStr, "column does not exist") ||
strings.Contains(errStr, "doesn't exist") || strings.Contains(errStr, "Unknown table") ||
strings.Contains(errStr, "admin show ddl jobs len != len(tasks)") ||
Expand Down

0 comments on commit 7f3dfbd

Please sign in to comment.