Skip to content

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