Skip to content

Replace the database name in result fields only if needed#7714

Merged
harshit-gangal merged 2 commits intovitessio:masterfrom
planetscale:replace-dbname
Mar 22, 2021
Merged

Replace the database name in result fields only if needed#7714
harshit-gangal merged 2 commits intovitessio:masterfrom
planetscale:replace-dbname

Conversation

@harshit-gangal
Copy link
Member

Description

We replace the database name with keyspace name for all the cases expect show queries.
The current change is to replace only if keyspace name is different than database name and also only for select queries when the fields database name is set to underlying database name.

Checklist

  • 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

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@systay
Copy link
Collaborator

systay commented Mar 19, 2021

any tests that show the new behaviour?

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Copy link
Contributor

@shlomi-noach shlomi-noach 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. Just curious about the purpose - is this about performance/optimization or about a logical fix, or anything else?

@harshit-gangal
Copy link
Member Author

The earlier changes was about logical fix regarding database name in fields metadata. But, it was not doing the correct thing. So changed to fix it.

@harshit-gangal harshit-gangal merged commit 9c391d8 into vitessio:master Mar 22, 2021
@harshit-gangal harshit-gangal deleted the replace-dbname branch March 22, 2021 08:16
@askdba askdba added this to the v10.0 milestone Mar 23, 2021
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.

4 participants