Skip to content

executor: improve SHOW commands compatibility#8417

Merged
zz-jason merged 6 commits intopingcap:masterfrom
morgo:show-table-status
Nov 26, 2018
Merged

executor: improve SHOW commands compatibility#8417
zz-jason merged 6 commits intopingcap:masterfrom
morgo:show-table-status

Conversation

@morgo
Copy link
Contributor

@morgo morgo commented Nov 22, 2018

What problem does this PR solve?

Improves MySQL compatibility of SHOW commands, plus an enhancement to derive info from infoschema to reduce duplication.

What is changed and how it works?

Lots of small compatibility bugs:

  • Map SHOW ENGINES and SHOW TABLE STATUS to infoschema (saves duplication)
  • Fix return type of SHOW TABLE STATUS column
  • Add privilege checks before checking if DB exists as in MySQL.
  • Use correct MySQL error codes for errors, privilege checks
  • Added partition info to infoschema.

Check List

Tests

  • Unit test
  • Manual test

Code changes

  • Minimal

Side effects

  • Breaking backward compatibility

The added privilege checks may break incorrect apps.

Related changes

  • Need to update the tidb-ansible repository
  • Need to be included in the release note

This change is Reviewable

@morgo
Copy link
Contributor Author

morgo commented Nov 22, 2018

/run-all-tests

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 26, 2018
Fixed nag from goword (comment removed, not required)
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 26, 2018
@zz-jason zz-jason merged commit 7ab61d8 into pingcap:master Nov 26, 2018
@morgo morgo deleted the show-table-status branch November 26, 2018 13:01
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. status/LGT2 Indicates that a PR has LGTM 2. type/compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants