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

Generate correct view definition if a table shares its name with the database #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamors
Copy link

@adamors adamors commented Apr 3, 2018

Fix for #3

The regex looks for either a space, an open brace or a comma before the database name, avoiding matching substrings where the database name appears twice.

@adamors adamors changed the title Generate correct definition if a table shares its name with the database Generate correct view definition if a table shares its name with the database Apr 3, 2018
@cainlevy
Copy link
Contributor

cainlevy commented Apr 4, 2018

It sounds like you did a fair bit of research on this to identify a mysql bug, etc., so I'd like to document the variations in code with a few test cases. My best idea is extracting the sanitization (normalization?) logic here into a utility method that can be tested without installing each example version of MySQL. Thoughts?

@cainlevy
Copy link
Contributor

cainlevy commented May 3, 2018

@adamors Would it be helpful if I extracted the utility method? I'm not positive what the test cases should be, though.

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.

2 participants