-
-
Notifications
You must be signed in to change notification settings - Fork 400
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 DEFINER statements from db dumps #130
Comments
Only Magento EE 1.13 uses triggers. It's for the new Indexing which will not be included in CE 1.8. |
I will check your recommendation in a EE 1.13. |
Confirmed. I added a first version with Solution found at: http://stackoverflow.com/questions/9446783/remove-definer-clause-from-mysql-dumps @fbrnc Nearly the same as your version. Committed in |
Feature was deployed with latest release. |
Just putting this here, I received the following error:
I had to run the following before triggering the
A very useful feature, thanks |
hmm, sed is getting picky, nice. @convenient: Can you create a new ticket for this? Just reference to here so that it's clear when it was introduced. |
@tkn98 Now that I look at it with fresh eyes it's clearly OSX being weird. Original definition of
|
@convenient: well, depends. if sed internally changes from default C locale for string operations to the one in the environment variable, then this is the issue. It's possible to have C strings but they are not valid UTF-8, e.g. other 8 bit ISO encodings in a dump file. I think your suggestion to export LANG=C is reasonable for the intended operation. |
Fair enough i'll open up another issue shortly. 👍 |
Magento EE 1.13 (and 1.8) are using mysql triggers. When creating database dumps MySQLwill include a "DEFINER" statement with the current username and hosts. Importing this on another server won't work.
I'm not sure if there is a cleaner way to do this, but removing the DEFINER statement works fine for me.
cat dump.sql | sed -e 's//[^_]DEFINER=[^_]///'
If this is the way to go the db:dump command could take care of doing this.
The text was updated successfully, but these errors were encountered: