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

Migrations execute function should allow semicolons #123

Closed
stilliard opened this issue Apr 22, 2014 · 0 comments
Closed

Migrations execute function should allow semicolons #123

stilliard opened this issue Apr 22, 2014 · 0 comments

Comments

@stilliard
Copy link
Contributor

Currently the execute function splits the query string given by semi colons, see: https://github.com/ruckus/ruckusing-migrations/blob/master/lib/Ruckusing/Adapter/MySQL/Base.php#L325

But that doesn't take into consideration semicolons inside of quotes that should not be treated this way.
E.g.

insert into a(id,name) values(1,'test'); insert into b(id,name) values(1,'another test');

That should work this way, however:

insert into a(id,name) values(1,'test;test')

should not be split!
This should apply to semicolons inside single and double quotes.

stilliard added a commit to stilliard/ruckusing-migrations that referenced this issue Apr 24, 2014
… test that it splits properly when semicolons exist inside strings. ref pull ruckus#120 and issue ruckus#123 on github
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

No branches or pull requests

1 participant