github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/causetstore/petri/acyclic/causet/embedded/errors.go (about)

     1  // Copyright 2020 WHTCORPS INC, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  package embedded
    15  
    16  import (
    17  	"github.com/whtcorpsinc/BerolinaSQL/terror"
    18  	allegrosql "github.com/whtcorpsinc/milevadb/errno"
    19  )
    20  
    21  // error definitions.
    22  var (
    23  	ErrUnsupportedType                      = terror.ClassOptimizer.New(allegrosql.ErrUnsupportedType, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrUnsupportedType])
    24  	ErrAnalyzeMissIndex                     = terror.ClassOptimizer.New(allegrosql.ErrAnalyzeMissIndex, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrAnalyzeMissIndex])
    25  	ErrWrongParamCount                      = terror.ClassOptimizer.New(allegrosql.ErrWrongParamCount, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongParamCount])
    26  	ErrSchemaChanged                        = terror.ClassOptimizer.New(allegrosql.ErrSchemaChanged, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrSchemaChanged])
    27  	ErrBlocknameNotAllowedHere              = terror.ClassOptimizer.New(allegrosql.ErrBlocknameNotAllowedHere, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrBlocknameNotAllowedHere])
    28  	ErrNotSupportedYet                      = terror.ClassOptimizer.New(allegrosql.ErrNotSupportedYet, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNotSupportedYet])
    29  	ErrWrongUsage                           = terror.ClassOptimizer.New(allegrosql.ErrWrongUsage, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongUsage])
    30  	ErrUnknown                              = terror.ClassOptimizer.New(allegrosql.ErrUnknown, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrUnknown])
    31  	ErrUnknownBlock                         = terror.ClassOptimizer.New(allegrosql.ErrUnknownBlock, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrUnknownBlock])
    32  	ErrNoSuchBlock                          = terror.ClassOptimizer.New(allegrosql.ErrNoSuchBlock, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNoSuchBlock])
    33  	ErrWrongArguments                       = terror.ClassOptimizer.New(allegrosql.ErrWrongArguments, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongArguments])
    34  	ErrWrongNumberOfDeferredCausetsInSelect = terror.ClassOptimizer.New(allegrosql.ErrWrongNumberOfDeferredCausetsInSelect, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongNumberOfDeferredCausetsInSelect])
    35  	ErrBadGeneratedDeferredCauset           = terror.ClassOptimizer.New(allegrosql.ErrBadGeneratedDeferredCauset, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrBadGeneratedDeferredCauset])
    36  	ErrFieldNotInGroupBy                    = terror.ClassOptimizer.New(allegrosql.ErrFieldNotInGroupBy, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrFieldNotInGroupBy])
    37  	ErrBadBlock                             = terror.ClassOptimizer.New(allegrosql.ErrBadBlock, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrBadBlock])
    38  	ErrKeyDoesNotExist                      = terror.ClassOptimizer.New(allegrosql.ErrKeyDoesNotExist, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrKeyDoesNotExist])
    39  	ErrOperandDeferredCausets               = terror.ClassOptimizer.New(allegrosql.ErrOperandDeferredCausets, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrOperandDeferredCausets])
    40  	ErrInvalidGroupFuncUse                  = terror.ClassOptimizer.New(allegrosql.ErrInvalidGroupFuncUse, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrInvalidGroupFuncUse])
    41  	ErrIllegalReference                     = terror.ClassOptimizer.New(allegrosql.ErrIllegalReference, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrIllegalReference])
    42  	ErrNoDB                                 = terror.ClassOptimizer.New(allegrosql.ErrNoDB, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNoDB])
    43  	ErrUnknownExplainFormat                 = terror.ClassOptimizer.New(allegrosql.ErrUnknownExplainFormat, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrUnknownExplainFormat])
    44  	ErrWrongGroupField                      = terror.ClassOptimizer.New(allegrosql.ErrWrongGroupField, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongGroupField])
    45  	ErrDupFieldName                         = terror.ClassOptimizer.New(allegrosql.ErrDupFieldName, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrDupFieldName])
    46  	ErrNonUFIDelablockBlock                 = terror.ClassOptimizer.New(allegrosql.ErrNonUFIDelablockBlock, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNonUFIDelablockBlock])
    47  	ErrInternal                             = terror.ClassOptimizer.New(allegrosql.ErrInternal, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrInternal])
    48  	ErrNonUniqBlock                         = terror.ClassOptimizer.New(allegrosql.ErrNonuniqBlock, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNonuniqBlock])
    49  	ErrWindowInvalidWindowFuncUse           = terror.ClassOptimizer.New(allegrosql.ErrWindowInvalidWindowFuncUse, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowInvalidWindowFuncUse])
    50  	ErrWindowInvalidWindowFuncAliasUse      = terror.ClassOptimizer.New(allegrosql.ErrWindowInvalidWindowFuncAliasUse, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowInvalidWindowFuncAliasUse])
    51  	ErrWindowNoSuchWindow                   = terror.ClassOptimizer.New(allegrosql.ErrWindowNoSuchWindow, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowNoSuchWindow])
    52  	ErrWindowCircularityInWindowGraph       = terror.ClassOptimizer.New(allegrosql.ErrWindowCircularityInWindowGraph, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowCircularityInWindowGraph])
    53  	ErrWindowNoChildPartitioning            = terror.ClassOptimizer.New(allegrosql.ErrWindowNoChildPartitioning, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowNoChildPartitioning])
    54  	ErrWindowNoInherentFrame                = terror.ClassOptimizer.New(allegrosql.ErrWindowNoInherentFrame, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowNoInherentFrame])
    55  	ErrWindowNoRedefineOrderBy              = terror.ClassOptimizer.New(allegrosql.ErrWindowNoRedefineOrderBy, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowNoRedefineOrderBy])
    56  	ErrWindowDuplicateName                  = terror.ClassOptimizer.New(allegrosql.ErrWindowDuplicateName, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowDuplicateName])
    57  	ErrPartitionClauseOnNonpartitioned      = terror.ClassOptimizer.New(allegrosql.ErrPartitionClauseOnNonpartitioned, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrPartitionClauseOnNonpartitioned])
    58  	ErrWindowFrameStartIllegal              = terror.ClassOptimizer.New(allegrosql.ErrWindowFrameStartIllegal, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowFrameStartIllegal])
    59  	ErrWindowFrameEndIllegal                = terror.ClassOptimizer.New(allegrosql.ErrWindowFrameEndIllegal, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowFrameEndIllegal])
    60  	ErrWindowFrameIllegal                   = terror.ClassOptimizer.New(allegrosql.ErrWindowFrameIllegal, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowFrameIllegal])
    61  	ErrWindowRangeFrameOrderType            = terror.ClassOptimizer.New(allegrosql.ErrWindowRangeFrameOrderType, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowRangeFrameOrderType])
    62  	ErrWindowRangeFrameTemporalType         = terror.ClassOptimizer.New(allegrosql.ErrWindowRangeFrameTemporalType, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowRangeFrameTemporalType])
    63  	ErrWindowRangeFrameNumericType          = terror.ClassOptimizer.New(allegrosql.ErrWindowRangeFrameNumericType, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowRangeFrameNumericType])
    64  	ErrWindowRangeBoundNotConstant          = terror.ClassOptimizer.New(allegrosql.ErrWindowRangeBoundNotConstant, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowRangeBoundNotConstant])
    65  	ErrWindowRowsIntervalUse                = terror.ClassOptimizer.New(allegrosql.ErrWindowRowsIntervalUse, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowRowsIntervalUse])
    66  	ErrWindowFunctionIgnoresFrame           = terror.ClassOptimizer.New(allegrosql.ErrWindowFunctionIgnoresFrame, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWindowFunctionIgnoresFrame])
    67  	ErrUnsupportedOnGeneratedDeferredCauset = terror.ClassOptimizer.New(allegrosql.ErrUnsupportedOnGeneratedDeferredCauset, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrUnsupportedOnGeneratedDeferredCauset])
    68  	ErrPrivilegeCheckFail                   = terror.ClassOptimizer.New(allegrosql.ErrPrivilegeCheckFail, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrPrivilegeCheckFail])
    69  	ErrInvalidWildCard                      = terror.ClassOptimizer.New(allegrosql.ErrInvalidWildCard, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrInvalidWildCard])
    70  	ErrMixOfGroupFuncAndFields              = terror.ClassOptimizer.New(allegrosql.ErrMixOfGroupFuncAndFieldsIncompatible, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrMixOfGroupFuncAndFieldsIncompatible])
    71  	errTooBigPrecision                      = terror.ClassExpression.New(allegrosql.ErrTooBigPrecision, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrTooBigPrecision])
    72  	ErrDBaccessDenied                       = terror.ClassOptimizer.New(allegrosql.ErrDBaccessDenied, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrDBaccessDenied])
    73  	ErrBlockaccessDenied                    = terror.ClassOptimizer.New(allegrosql.ErrBlockaccessDenied, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrBlockaccessDenied])
    74  	ErrSpecificAccessDenied                 = terror.ClassOptimizer.New(allegrosql.ErrSpecificAccessDenied, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrSpecificAccessDenied])
    75  	ErrViewNoExplain                        = terror.ClassOptimizer.New(allegrosql.ErrViewNoExplain, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrViewNoExplain])
    76  	ErrWrongValueCountOnRow                 = terror.ClassOptimizer.New(allegrosql.ErrWrongValueCountOnRow, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrWrongValueCountOnRow])
    77  	ErrViewInvalid                          = terror.ClassOptimizer.New(allegrosql.ErrViewInvalid, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrViewInvalid])
    78  	ErrNoSuchThread                         = terror.ClassOptimizer.New(allegrosql.ErrNoSuchThread, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNoSuchThread])
    79  	ErrUnknownDeferredCauset                = terror.ClassOptimizer.New(allegrosql.ErrBadField, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrBadField])
    80  	ErrCartesianProductUnsupported          = terror.ClassOptimizer.New(allegrosql.ErrCartesianProductUnsupported, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrCartesianProductUnsupported])
    81  	ErrStmtNotFound                         = terror.ClassOptimizer.New(allegrosql.ErrPreparedStmtNotFound, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrPreparedStmtNotFound])
    82  	ErrAmbiguous                            = terror.ClassOptimizer.New(allegrosql.ErrNonUniq, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrNonUniq])
    83  	// Since we cannot know if user logged in with a password, use message of ErrAccessDeniedNoPassword instead
    84  	ErrAccessDenied = terror.ClassOptimizer.New(allegrosql.ErrAccessDenied, allegrosql.MyALLEGROSQLErrName[allegrosql.ErrAccessDeniedNoPassword])
    85  )