Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed passwd locked #39228

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7d7c24f
Support Password Reuse Policy
keeplearning20221 Nov 12, 2022
5cb28df
modified: errno/errcode.go
keeplearning20221 Nov 12, 2022
724c6d8
drop user support
bob34007 Nov 14, 2022
fc719ca
modified: executor/simple.go
keeplearning20221 Nov 15, 2022
4ce6866
modified: infoschema_cluster_table_test.go
keeplearning20221 Nov 15, 2022
20ebf62
Support Password Reuse Policy
keeplearning20221 Nov 12, 2022
34140ab
modified: errno/errcode.go
keeplearning20221 Nov 12, 2022
5a7dd17
drop user support
bob34007 Nov 14, 2022
d169f11
modified: executor/simple.go
keeplearning20221 Nov 15, 2022
af730b5
modified: infoschema_cluster_table_test.go
keeplearning20221 Nov 15, 2022
a988ee6
modified: executor/simple.go
keeplearning20221 Nov 15, 2022
da04920
Merge branch 'enhance_passwd' of https://github.com/bob34007/tidb int…
keeplearning20221 Nov 15, 2022
69d01a4
modified: executor/infoschema_cluster_table_test.go
keeplearning20221 Nov 15, 2022
bf1d0cd
modified: executor/simple_test.go
keeplearning20221 Nov 15, 2022
d3961d6
modified: errors.toml
keeplearning20221 Nov 15, 2022
f15de2f
Merge branch 'master' into enhance_passwd
keeplearning20221 Nov 16, 2022
bcc4937
modified: simple.go
keeplearning20221 Nov 16, 2022
ba1a3b7
modified: ../sessionctx/variable/sysvar.go
keeplearning20221 Nov 16, 2022
d50099a
modified: simple.go
keeplearning20221 Nov 16, 2022
21747f5
login failed
lastincisor Nov 16, 2022
73f961e
login failed
lastincisor Nov 18, 2022
a9c3ac1
failedLogin match
lastincisor Nov 18, 2022
954683a
alter unlock
lastincisor Nov 18, 2022
eefb3db
alter unlock
lastincisor Nov 21, 2022
2160f7e
parser
lastincisor Nov 21, 2022
2acd1df
cache json parser
lastincisor Nov 21, 2022
bf15b09
login flow
lastincisor Nov 21, 2022
b33aa18
create alter user
lastincisor Nov 21, 2022
ee71172
create alter user
lastincisor Nov 21, 2022
273937d
clear count
lastincisor Nov 22, 2022
bd4d27f
clear count
lastincisor Nov 22, 2022
f1afb9f
PasswordLockTime value -1
lastincisor Nov 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions errno/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ const (
ErrDependentByGeneratedColumn = 3108
ErrGeneratedColumnRefAutoInc = 3109
ErrAccountHasBeenLocked = 3118
ErrAccountHasBeenAutoLocked = 3119
ErrWarnConflictingHint = 3126
ErrUnresolvedHintName = 3128
ErrInvalidJSONText = 3140
Expand Down Expand Up @@ -892,6 +893,7 @@ const (
ErrIllegalPrivilegeLevel = 3619
ErrCTEMaxRecursionDepth = 3636
ErrNotHintUpdatable = 3637
ErrExistsInHistoryPassword = 3638
ErrForeignKeyCannotDropParent = 3730
ErrForeignKeyCannotUseVirtualColumn = 3733
ErrForeignKeyNoColumnInParent = 3734
Expand Down
2 changes: 2 additions & 0 deletions errno/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrDependentByGeneratedColumn: mysql.Message("Column '%s' has a generated column dependency.", nil),
ErrGeneratedColumnRefAutoInc: mysql.Message("Generated column '%s' cannot refer to auto-increment column.", nil),
ErrAccountHasBeenLocked: mysql.Message("Access denied for user '%s'@'%s'. Account is locked.", nil),
ErrAccountHasBeenAutoLocked: mysql.Message("Access denied for user '%s'@'%s'. Account is blocked for %d day(s) (%d day(s) remaining) due to %d consecutive failed logins.", nil),
ErrWarnConflictingHint: mysql.Message("Hint %s is ignored as conflicting/duplicated.", nil),
ErrUnresolvedHintName: mysql.Message("Unresolved name '%s' for %s hint", nil),
ErrForeignKeyCascadeDepthExceeded: mysql.Message("Foreign key cascade delete/update exceeds max depth of %v.", nil),
Expand Down Expand Up @@ -887,6 +888,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrMaxExecTimeExceeded: mysql.Message("Query execution was interrupted, max_execution_time exceeded.", nil),
ErrLockAcquireFailAndNoWaitSet: mysql.Message("Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set.", nil),
ErrNotHintUpdatable: mysql.Message("Variable '%s' cannot be set using SET_VAR hint.", nil),
ErrExistsInHistoryPassword: mysql.Message("Cannot use these credentials for '%s@%s' because they contradict the password history policy.", nil),
ErrForeignKeyCannotDropParent: mysql.Message("Cannot drop table '%s' referenced by a foreign key constraint '%s' on table '%s'.", nil),
ErrForeignKeyCannotUseVirtualColumn: mysql.Message("Foreign key '%s' uses virtual column '%s' which is not supported.", nil),
ErrForeignKeyNoColumnInParent: mysql.Message("Failed to add the foreign key constraint. Missing column '%s' for constraint '%s' in the referenced table '%s'", nil),
Expand Down
5 changes: 5 additions & 0 deletions errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,11 @@ error = '''
Recursive query aborted after %d iterations. Try increasing @@cte_max_recursion_depth to a larger value
'''

["executor:3638"]
error = '''
Cannot use these credentials for '%s@%s' because they contradict the password history policy.
'''

["executor:3929"]
error = '''
Dynamic privilege '%s' is not registered with the server.
Expand Down
1 change: 1 addition & 0 deletions executor/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ var (
ErrWrongStringLength = dbterror.ClassDDL.NewStd(mysql.ErrWrongStringLength)
errUnsupportedFlashbackTmpTable = dbterror.ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message("Recover/flashback table is not supported on temporary tables", nil))
errTruncateWrongInsertValue = dbterror.ClassTable.NewStdErr(mysql.ErrTruncatedWrongValue, parser_mysql.Message("Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %d", nil))
ErrExistsInHistoryPassword = dbterror.ClassExecutor.NewStd(mysql.ErrExistsInHistoryPassword)
)
2 changes: 1 addition & 1 deletion executor/infoschema_cluster_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func TestTableStorageStats(t *testing.T) {
"test 2",
))
rows := tk.MustQuery("select TABLE_NAME from information_schema.TABLE_STORAGE_STATS where TABLE_SCHEMA = 'mysql';").Rows()
result := 40
result := 41
require.Len(t, rows, result)

// More tests about the privileges.
Expand Down
Loading