Skip to content

Commit

Permalink
Merge branch 'master' into partition_range_boundaries_lt_gt
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss authored May 20, 2021
2 parents 1945a9e + 542da5d commit d8146c9
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 76 deletions.
3 changes: 1 addition & 2 deletions ddl/db_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ func (s *testIntegrationSuite5) TestBackwardCompatibility(c *C) {

// Split the table.
tableStart := tablecodec.GenTableRecordPrefix(tbl.Meta().ID)
s.cluster.SplitKeys(tableStart, tableStart.PrefixNext(), 100)
s.cluster.SplitKeys(tableStart, tableStart.PrefixNext(), 10)

unique := false
indexName := model.NewCIStr("idx_b")
Expand Down Expand Up @@ -1275,7 +1275,6 @@ func (s *testIntegrationSuite5) TestBackwardCompatibility(c *C) {
historyJob, err := getHistoryDDLJob(s.store, job.ID)
c.Assert(err, IsNil)
if historyJob == nil {

continue
}
c.Assert(historyJob.Error, IsNil)
Expand Down
6 changes: 6 additions & 0 deletions errno/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,11 @@ const (
ErrGrantRole = 3523
ErrRoleNotGranted = 3530
ErrLockAcquireFailAndNoWaitSet = 3572
ErrCTERecursiveRequiresUnion = 3573
ErrCTERecursiveRequiresNonRecursiveFirst = 3574
ErrCTERecursiveForbidsAggregation = 3575
ErrCTERecursiveForbiddenJoinOrder = 3576
ErrInvalidRequiresSingleReference = 3577
ErrWindowNoSuchWindow = 3579
ErrWindowCircularityInWindowGraph = 3580
ErrWindowNoChildPartitioning = 3581
Expand All @@ -877,6 +882,7 @@ const (
ErrWindowExplainJSON = 3598
ErrWindowFunctionIgnoresFrame = 3599
ErrIllegalPrivilegeLevel = 3619
ErrCTEMaxRecursionDepth = 3636
ErrNotHintUpdatable = 3637
ErrDataTruncatedFunctionalIndex = 3751
ErrDataOutOfRangeFunctionalIndex = 3752
Expand Down
8 changes: 7 additions & 1 deletion errno/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrViewSelectClause: mysql.Message("View's SELECT contains a '%s' clause", nil),
ErrViewSelectVariable: mysql.Message("View's SELECT contains a variable or parameter", nil),
ErrViewSelectTmptable: mysql.Message("View's SELECT refers to a temporary table '%-.192s'", nil),
ErrViewWrongList: mysql.Message("View's SELECT and view's field list have different column counts", nil),
ErrViewWrongList: mysql.Message("In definition of view, derived table or common table expression, SELECT list and column names list have different column counts", nil),
ErrWarnViewMerge: mysql.Message("View merge algorithm can't be used here for now (assumed undefined algorithm)", nil),
ErrWarnViewWithoutKey: mysql.Message("View being updated does not have complete key of underlying table in it", nil),
ErrViewInvalid: mysql.Message("View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them", nil),
Expand Down Expand Up @@ -902,6 +902,12 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrUnsupportedConstraintCheck: mysql.Message("%s is not supported", nil),
ErrDynamicPrivilegeNotRegistered: mysql.Message("Dynamic privilege '%s' is not registered with the server.", nil),
ErrIllegalPrivilegeLevel: mysql.Message("Illegal privilege level specified for %s", nil),
ErrCTERecursiveRequiresUnion: mysql.Message("Recursive Common Table Expression '%s' should contain a UNION", nil),
ErrCTERecursiveRequiresNonRecursiveFirst: mysql.Message("Recursive Common Table Expression '%s' should have one or more non-recursive query blocks followed by one or more recursive ones", nil),
ErrCTERecursiveForbidsAggregation: mysql.Message("Recursive Common Table Expression '%s' can contain neither aggregation nor window functions in recursive query block", nil),
ErrCTERecursiveForbiddenJoinOrder: mysql.Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints", nil),
ErrInvalidRequiresSingleReference: mysql.Message("In recursive query block of Recursive Common Table Expression '%s', the recursive table must be referenced only once, and not in any subquery", nil),
ErrCTEMaxRecursionDepth: mysql.Message("Recursive query aborted after %d iterations. Try increasing @@cte_max_recursion_depth to a larger value", nil),
// MariaDB errors.
ErrOnlyOneDefaultPartionAllowed: mysql.Message("Only one DEFAULT partition allowed", nil),
ErrWrongPartitionTypeExpectedSystemTime: mysql.Message("Wrong partitioning type, expected type: `SYSTEM_TIME`", nil),
Expand Down
32 changes: 31 additions & 1 deletion errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ View's SELECT contains a '%s' clause

["ddl:1353"]
error = '''
View's SELECT and view's field list have different column counts
In definition of view, derived table or common table expression, SELECT list and column names list have different column counts
'''

["ddl:1481"]
Expand Down Expand Up @@ -561,6 +561,11 @@ error = '''
Illegal privilege level specified for %s
'''

["executor:3636"]
error = '''
Recursive query aborted after %d iterations. Try increasing @@cte_max_recursion_depth to a larger value
'''

["executor:3929"]
error = '''
Dynamic privilege '%s' is not registered with the server.
Expand Down Expand Up @@ -1016,6 +1021,31 @@ error = '''
Unresolved name '%s' for %s hint
'''

["planner:3573"]
error = '''
Recursive Common Table Expression '%s' should contain a UNION
'''

["planner:3574"]
error = '''
Recursive Common Table Expression '%s' should have one or more non-recursive query blocks followed by one or more recursive ones
'''

["planner:3575"]
error = '''
Recursive Common Table Expression '%s' can contain neither aggregation nor window functions in recursive query block
'''

["planner:3576"]
error = '''
In recursive query block of Recursive Common Table Expression '%s', the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints
'''

["planner:3577"]
error = '''
In recursive query block of Recursive Common Table Expression '%s', the recursive table must be referenced only once, and not in any subquery
'''

["planner:3579"]
error = '''
Window name '%s' is not defined.
Expand Down
9 changes: 5 additions & 4 deletions executor/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ var (
ErrIllegalPrivilegeLevel = dbterror.ClassExecutor.NewStd(mysql.ErrIllegalPrivilegeLevel)
ErrInvalidSplitRegionRanges = dbterror.ClassExecutor.NewStd(mysql.ErrInvalidSplitRegionRanges)

ErrBRIEBackupFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEBackupFailed)
ErrBRIERestoreFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIERestoreFailed)
ErrBRIEImportFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEImportFailed)
ErrBRIEExportFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEExportFailed)
ErrBRIEBackupFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEBackupFailed)
ErrBRIERestoreFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIERestoreFailed)
ErrBRIEImportFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEImportFailed)
ErrBRIEExportFailed = dbterror.ClassExecutor.NewStd(mysql.ErrBRIEExportFailed)
ErrCTEMaxRecursionDepth = dbterror.ClassExecutor.NewStd(mysql.ErrCTEMaxRecursionDepth)
)
Loading

0 comments on commit d8146c9

Please sign in to comment.