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

remove execution tokens option #263

Open
KevsRepos opened this issue Feb 16, 2023 · 4 comments
Open

remove execution tokens option #263

KevsRepos opened this issue Feb 16, 2023 · 4 comments
Labels

Comments

@KevsRepos
Copy link

What about a flag like add-execution-tokens which is true by default, but can be set to false if necessary.
This way, you would have a file with "raw" sql statements which can be parsed by php's sql execution methods.

@ifsnop
Copy link
Owner

ifsnop commented Feb 16, 2023 via email

@KevsRepos
Copy link
Author

These sql execution tokens which look like that: /* SOME STATEMENT */;

I was able to trim them iut with a regex, but a flag would be the nice and easy-to-use way.

@ifsnop
Copy link
Owner

ifsnop commented May 16, 2023

Those tokens are there to ensure Mysql/Mariadb compatibility between dumps and restores. Could you share the regex, so I can update the wiki?

@KevsRepos
Copy link
Author

$sql = trim(preg_replace("/\/\*(?:.|\n)*?\*\/\s*;/", '', $file));

@ifsnop This is how I am using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants