mysqldump-php
mysqldump-php copied to clipboard
remove execution tokens option
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.
Exactly what statements can't be send to PHP execution method?
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.
Message ID: @.***>
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.
Those tokens are there to ensure Mysql/Mariadb compatibility between dumps and restores. Could you share the regex, so I can update the wiki?
$sql = trim(preg_replace("/\/\*(?:.|\n)*?\*\/\s*;/", '', $file));
@ifsnop This is how I am using it.