You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql/errors.go
+3-11Lines changed: 3 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,6 @@ import (
22
22
"gopkg.in/src-d/go-errors.v1"
23
23
)
24
24
25
-
// MySQL84 contains error definitions that match MySQL 8.4 behavior and formatting
26
-
varMySQL84=struct {
27
-
// ErrForeignKeyChildViolation is the MySQL 8.4 compatible error format for foreign key child violations
28
-
ErrForeignKeyChildViolation*errors.Kind
29
-
}{
30
-
ErrForeignKeyChildViolation: errors.NewKind("cannot add or update a child row: a foreign key constraint fails (`%s`.`%s`, CONSTRAINT `%s` FOREIGN KEY (`%s`) REFERENCES `%s` (`%s`))"),
31
-
}
32
-
33
25
var (
34
26
// ErrSyntaxError is returned when a syntax error in vitess is encountered.
35
27
ErrSyntaxError=errors.NewKind("%s")
@@ -427,7 +419,8 @@ var (
427
419
ErrInsertIntoNonNullableProvidedNull=errors.NewKind("column name '%v' is non-nullable but attempted to set a value of null")
428
420
429
421
// ErrForeignKeyChildViolation is called when a rows is added but there is no parent row, and a foreign key constraint fails. Add the parent row first.
430
-
ErrForeignKeyChildViolation=errors.NewKind("cannot add or update a child row - Foreign key violation on fk: `%s`, table: `%s`, referenced table: `%s`, key: `%s`")
422
+
ErrForeignKeyChildViolation=errors.NewKind("cannot add or update a child row - Foreign key violation on fk: `%s`, table: `%s`, referenced table: `%s`, key: `%s`")
423
+
ErrForeignKeyChildViolationMySQL845=errors.NewKind("cannot add or update a child row: a foreign key constraint fails (`%s`.`%s`, CONSTRAINT `%s` FOREIGN KEY (`%s`) REFERENCES `%s` (`%s`))")
431
424
432
425
// ErrForeignKeyParentViolation is called when a parent row that is deleted has children, and a foreign key constraint fails. Delete the children first.
433
426
ErrForeignKeyParentViolation=errors.NewKind("cannot delete or update a parent row - Foreign key violation on fk: `%s`, table: `%s`, referenced table: `%s`, key: `%s`")
0 commit comments