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

Update perror code and regenerate perror.go #127

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

dveeden
Copy link
Collaborator

@dveeden dveeden commented Jul 4, 2024

  • Better error messages
  • Updated error codes from MySQL 9.0.0
  • Using 'go generate' to create perror.go.

For CI:

  • This now actually runs the generation for perror.go in CI.
  • For this it also needs to checkout pingcap/tidb
  • It uses the Go version from go.mod instead of a hardcoded one

@dveeden dveeden requested review from bb7133 and mjonss July 4, 2024 11:59
mjonss
mjonss previously approved these changes Jul 4, 2024
Copy link
Collaborator

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

LGTM, with minor suggestion

generate_perror/main.go Outdated Show resolved Hide resolved
@@ -393,11 +396,11 @@ var MysqlErrNameToNum = map[string]int{
"OBSOLETE_ER_FLUSH_MASTER_BINLOG_CLOSED": 1186,
"ErrIndexRebuild": 1187,
"OBSOLETE_ER_INDEX_REBUILD": 1187,
"ER_MASTER": 1188,
"ER_SOURCE": 1188,
"ErrMaster": 1188,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we create an issue in TiDB repo to clean up all these (unused?) error codes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean in pingcap/tidb? I don't think they are used there. I only found one in tests/integrationtest/t/privilege/privileges.test: --error ER_TABLEACCESS_DENIED_ERROR, which should be fine.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the ErrMaster comes from pingcap/tidb, and I would assume most of the similar errors mentioning Master or Slave are not in use in TiDB, so they could be removed from pingcap/tidb I guess?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could update those. But maybe we should then also try to replace master/slave in other places as well like dm-master.

Co-authored-by: Mattias Jonsson <[email protected]>
Copy link
Collaborator

@mjonss mjonss 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
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@dveeden dveeden marked this pull request as draft July 29, 2024 06:31
@dveeden dveeden marked this pull request as ready for review July 29, 2024 06:31
@dveeden dveeden closed this Jul 29, 2024
@dveeden dveeden reopened this Jul 29, 2024
@dveeden
Copy link
Collaborator Author

dveeden commented Jul 29, 2024

Not sure what's needed to get "license/cla" to report ✔️

@dveeden
Copy link
Collaborator Author

dveeden commented Jul 29, 2024

Not sure what's needed to get "license/cla" to report ✔️

https://cla.pingcap.net/pingcap/mysql-tester?pullRequest=127 says:


Error

There is no CLA to sign for pingcap/mysql-tester

(could not find linked item for owner pingcap and repo mysql-tester)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants