-
Notifications
You must be signed in to change notification settings - Fork 439
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
mydumper can't recreate mysql.proc + mysql.events due to 5.7 sql_mode #142
Comments
Similar to #274 |
#370 will allow us to implement any export or import strategy. |
Hi @leandromorgado Can you check again configuring the variables #370 ? |
Closing without confirmation |
Hey @davidducos, sorry was on vacation and couldn't get to this before now. I compiled the new version and tried with the following options but I'm still running in to the same problem. Maybe the config file is not correctly specified?
|
Hi @leandromorgado, you can check if SQL_MODE is being set from the general log if you are just testing. |
@davidducos , I don't see it in the general log.
I'm not very confident in the config file I created (not sure it's correct syntax/format).
|
Sorry @leandromorgado, there was a bug... #398 fix it. |
No worries @davidducos . |
Hi, I am trying to use mydumper/myloader approach to move 100+ gigs of data from given environment to target environment, While doing so, I am running into the As I am moving a lot of data, I am using the |
@davidducos : thanks for opening up the issue again. really appreciate the help. To add to the previous concern, if I unload un-compressed SQL dump files. the bigger problem in scope is, if I am running |
@aashishmahajan, We are going to follow the --skip-definer option in: #378 @leandromorgado, I changed some things related to the config file option, actually, that option is not available anymore and we use --defaults-file. Can you test latest version and let me know if it is working properly. |
@leandromorgado,
In your --defaults-file |
What about? SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysql.proc' does The above error got resolved by the given command: |
When restoring to an empty datadir, mydumper/myloader can not recreate the following tables mysql.proc + mysql.events due to a stricter default 5.7 sql_mode. The root of the problem is demonstrated below:
The mysqldump program gets around this by relaxing the sql_mode at the start and reverting it to the original value at the end. The relevant part of the mysqldump file is:
However, the mydumper output files do not change the sql_mode and thus fail when restoring these tables (other tables possibly affected, I only found these):
If I add the SQL_MODE manually to the files, the restore works fine:
Perhaps the sql_mode can be relaxed in mydumper/myloader in a similar way, at least for mysql.* system tables? (not sure if it makes sense for user data)
The text was updated successfully, but these errors were encountered: