From 9583e0b376966ba9b3720d446e40c36a9ed2e83c Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Thu, 2 Jan 2020 13:08:08 +0800 Subject: [PATCH 1/3] add invalid auto increment offset error --- mysql/errcode.go | 1 + mysql/errname.go | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql/errcode.go b/mysql/errcode.go index 1344bdc88..946e31b54 100644 --- a/mysql/errcode.go +++ b/mysql/errcode.go @@ -1029,6 +1029,7 @@ const ( ErrInvalidType = 8057 ErrUnknownAllocatorType = 8058 ErrAutoRandReadFailed = 8059 + ErrInvalidIncrementAndOffset = 8060 // Error codes used by TiDB ddl package ErrUnsupportedDDLOperation = 8200 diff --git a/mysql/errname.go b/mysql/errname.go index 467202b97..b64817069 100644 --- a/mysql/errname.go +++ b/mysql/errname.go @@ -1037,6 +1037,7 @@ var MySQLErrName = map[uint16]string{ ErrCannotCancelDDLJob: "This job:%v is almost finished, can't be cancelled now", ErrUnknownAllocatorType: "Invalid allocator type", ErrAutoRandReadFailed: "Failed to read auto-random value from storage engine", + ErrInvalidIncrementAndOffset: "Invalid auto increment and offset", ErrSequenceUnsupportedTableOption: "Unsupported sequence table-option %s", ErrUnsupportedType: "Unsupported type %T", From 6506a1a9b360180534c61ffd41bd222d2f162851 Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Thu, 2 Jan 2020 14:16:00 +0800 Subject: [PATCH 2/3] . --- mysql/errname.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/errname.go b/mysql/errname.go index b64817069..a916b632b 100644 --- a/mysql/errname.go +++ b/mysql/errname.go @@ -1037,7 +1037,7 @@ var MySQLErrName = map[uint16]string{ ErrCannotCancelDDLJob: "This job:%v is almost finished, can't be cancelled now", ErrUnknownAllocatorType: "Invalid allocator type", ErrAutoRandReadFailed: "Failed to read auto-random value from storage engine", - ErrInvalidIncrementAndOffset: "Invalid auto increment and offset", + ErrInvalidIncrementAndOffset: "Invalid auto increment %d and offset %d, valid range is [1, 65535]", ErrSequenceUnsupportedTableOption: "Unsupported sequence table-option %s", ErrUnsupportedType: "Unsupported type %T", From 9fe30d7d9089d1b0583a6f9cb071dc308dd23907 Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Thu, 2 Jan 2020 14:17:58 +0800 Subject: [PATCH 3/3] address comment --- mysql/errname.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/errname.go b/mysql/errname.go index a916b632b..4fce1e98f 100644 --- a/mysql/errname.go +++ b/mysql/errname.go @@ -1037,7 +1037,7 @@ var MySQLErrName = map[uint16]string{ ErrCannotCancelDDLJob: "This job:%v is almost finished, can't be cancelled now", ErrUnknownAllocatorType: "Invalid allocator type", ErrAutoRandReadFailed: "Failed to read auto-random value from storage engine", - ErrInvalidIncrementAndOffset: "Invalid auto increment %d and offset %d, valid range is [1, 65535]", + ErrInvalidIncrementAndOffset: "Invalid auto_increment settings: auto_increment_increment: %d, auto_increment_offset: %d, both of them must be in range [1..65535]", ErrSequenceUnsupportedTableOption: "Unsupported sequence table-option %s", ErrUnsupportedType: "Unsupported type %T",