Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidDSNUnescaped = errors.New("invalid DSN: did you forget to escape a param value?") ErrInvalidDSNAddr = errors.New("invalid DSN: network address not terminated (missing closing brace)") ErrInvalidDSNNoSlash = errors.New("invalid DSN: missing the slash separating the database name") ErrInvalidDSNUnsafeCollation = errors.New("invalid DSN: interpolateParams can not be used with unsafe collations") ErrInvalidConn = errors.New("invalid connection") ErrMalformedPkt = errors.New("malformed packet") ErrNoTLS = errors.New("TLS requested but server does not support TLS") ErrCleartextPassword = errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN") ErrNativePassword = errors.New("this user requires mysql native password authentication.") ErrOldPassword = errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords") ErrUnknownPlugin = errors.New("this authentication plugin is not supported") ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+") ErrPktSync = errors.New("commands out of sync. You can't run this command now") ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?") ErrPktTooLarge = errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server") ErrBusyBuffer = errors.New("busy buffer") // ErrBadConnNoWrite is used for connection errors where nothing was sent to the database yet. // If this happens first in a function starting a database interaction, it should be replaced by driver.ErrBadConn // to trigger a resend. // See https://github.com/go-sql-driver/mysql/pull/302 ErrBadConnNoWrite = errors.New("bad connection") ErrTransactionClosed = errors.New("transaction closed") ErrUnexpectedRead = errors.New("unexpected read from socket") )
View Source
var ( GlobalTransactionNotActive = errors.New("global session not active") GlobalTransactionFinished = errors.New("global session finished") CouldNotFoundGlobalTransaction = errors.New("could not found global transaction") CouldNotFoundBranchTransaction = errors.New("could not found branch transaction") BranchLockAcquireFailed = errors.New("branch lock acquire failed") )
View Source
var CannotEvalWithColumnName = errors.New("cannot eval function with column name")
Functions ¶
func IsEvalWithColumnErr ¶
Types ¶
type SQLError ¶
SQLError is the error structure returned from calling a db library function
func NewSQLError ¶
NewSQLError creates a new SQLError. If sqlState is left empty, it will default to "HY000" (general error). TODO: Should be aligned with vterrors, stack traces and wrapping
Click to show internal directories.
Click to hide internal directories.