Skip to content

add more error filter #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions ddl/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ func dmlIgnoreError(err error) bool {
strings.Contains(errStr, "value is out of range in") ||
strings.Contains(errStr, "Data Too Long") ||
strings.Contains(errStr, "doesn't have a default value") ||
strings.Contains(errStr, "specified twice") {
strings.Contains(errStr, "specified twice") ||
strings.Contains(errStr, "cannot convert datum from decimal to type year") {
return true
}
return false
Expand Down Expand Up @@ -180,7 +181,9 @@ func ddlIgnoreError(err error) bool {
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
}
Expand Down