Skip to content

*: make 'grant all privileges' work right#400

Merged
jackysp merged 9 commits into
pingcap:masterfrom
tiancaiamao:privilege-check
Jul 30, 2019
Merged

*: make 'grant all privileges' work right#400
jackysp merged 9 commits into
pingcap:masterfrom
tiancaiamao:privilege-check

Conversation

@tiancaiamao
Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

See pingcap/tidb#11449

What is changed and how it works?

Add those privileges

	CreateTMPTablePriv: "Create_tmp_table_priv",
	LockTablesPriv:     "Lock_tables_priv",
	CreateRoutinePriv:  "Create_routine_priv",
	AlterRoutinePriv:   "Alter_routine_priv",
	EventPriv:          "Event_priv",

Make Priv2UserCol, AllGlobalPrivs consistent and many other changes.

Check List

Tests

  • Unit test

Side effects

  • Breaking backward compatibility

@tiancaiamao tiancaiamao added the type/bug-fix fix bug label Jul 25, 2019
Comment thread mysql/const_test.go

for _, v := range AllGlobalPrivs {
_, ok := Priv2UserCol[v]
c.Assert(ok, IsTrue)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c.Assert(Priv2UserCol, HasKey, v)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please address comment @tiancaiamao

@imtbkcat
Copy link
Copy Markdown

ping @tiancaiamao

Copy link
Copy Markdown
Contributor

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@imtbkcat imtbkcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackysp jackysp merged commit 5238015 into pingcap:master Jul 30, 2019
@tiancaiamao tiancaiamao deleted the privilege-check branch July 31, 2019 05:25
@imtbkcat
Copy link
Copy Markdown

@tiancaiamao please cherry-pick this pr to release-2.1 branch.

tiancaiamao added a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants