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

Fix information_schema query with system schema in table_schema filter #7430

Merged
merged 6 commits into from
Feb 3, 2021

Conversation

harshit-gangal
Copy link
Member

Description

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Signed-off-by: Harshit Gangal <[email protected]>
…ault route if it is a system schema

Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
… from bv if tablet will replace it

Signed-off-by: Harshit Gangal <[email protected]>
@harshit-gangal harshit-gangal marked this pull request as ready for review February 2, 2021 11:07
@harshit-gangal harshit-gangal added this to the v10.0 milestone Feb 2, 2021
Copy link
Collaborator

@systay systay left a comment

Choose a reason for hiding this comment

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

Looks good. I'm just missing an end to end test that tests the query we set out to fix in the first place:

mysql> SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'performance_schema' AND table_name = 'foo';

@harshit-gangal
Copy link
Member Author

Looks good. I'm just missing an end to end test that tests the query we set out to fix in the first place:

mysql> SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'performance_schema' AND table_name = 'foo';

addressed.

@harshit-gangal harshit-gangal merged commit 68cda5e into vitessio:master Feb 3, 2021
@harshit-gangal harshit-gangal deleted the systemschema-fix branch February 3, 2021 07:09
systay pushed a commit to planetscale/vitess that referenced this pull request May 11, 2021
Backport of vitessio#7430
This is a combination of 6 commits.

* added system schema in where clause plan test
* added executor unit test
* added logic to check table_schema of where clause and redirect to default route if it is a system schema
* added e2e test
* set the bindvars for the normalized predicates and remove schema name from bv if tablet will replace it
* added e2e test having table_schema and table_name in where clause

Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
rafael pushed a commit to tinyspeck/vitess that referenced this pull request May 11, 2021
Backport of vitessio#7430
This is a combination of 6 commits.

* added system schema in where clause plan test
* added executor unit test
* added logic to check table_schema of where clause and redirect to default route if it is a system schema
* added e2e test
* set the bindvars for the normalized predicates and remove schema name from bv if tablet will replace it
* added e2e test having table_schema and table_name in where clause

Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>

Signed-off-by: Rafael Chacon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Querying information_schema does not work for combination of table_schema and table_name filter.
2 participants