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

Bug Report: Mysqld.normalizedSchema() erroneously replaces table name with placeholder if same as DB name #13865

Open
shlomi-noach opened this issue Aug 28, 2023 · 0 comments
Assignees
Labels
Component: General Changes throughout the code base Type: Bug

Comments

@shlomi-noach
Copy link
Contributor

Overview of the Issue

Assume this simplified CREATE VIEW statement:

create view `mydb`.v as select * from `mydb`.`mydb`

In the above, the view is in mydb schema. However, it also reads from a table called mydb. The function normalizedSchema() turns this view statement into:

create view {{.DatabaseName}}.v as select * from {{.DatabaseName}}.{{.DatabaseName}}

Reproduction Steps

Binary Version

18, 17, 16?

Operating System and Environment details

-

Log Fragments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: General Changes throughout the code base Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant