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

Issue importing sys_10.sql #452

Closed
zeki893 opened this issue Sep 3, 2019 · 4 comments
Closed

Issue importing sys_10.sql #452

zeki893 opened this issue Sep 3, 2019 · 4 comments

Comments

@zeki893
Copy link

zeki893 commented Sep 3, 2019

ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2

There seems to be a lot of lines with -- comments at the end that are breaking the import.
What am I supposed to do with them?

SOURCE ./tables/sys_config_data_10.sql -- ported
SOURCE ./functions/format_path.sql -- not possible to port b/c P_S is too old
SOURCE ./functions/ps_is_account_enabled.sql -- not possible to port b/c P_S is too old
SOURCE ./views/p_s/ps_check_lost_instrumentation.sql -- not possible to port b/c P_S is too old
SOURCE ./views/p_s/processlist.sql -- See also further down!
SOURCE ./views/p_s/x_processlist.sql -- See also further down!
SOURCE ./views/p_s/sessions.sql -- See also further down!
SOURCE ./views/p_s/x_sessions.sql -- See also further down!
SOURCE ./views/p_s/user_summary.sql -- to port! Error which I do not understand
SOURCE ./views/p_s/x_user_summary.sql -- to port! Error which I do not understand
SOURCE ./views/p_s/host_summary.sql -- to port! Error which I do not understand
SOURCE ./views/p_s/x_host_summary.sql -- to port! Error which I do not understand
SOURCE ./views/p_s/metrics_56.sql -- not possible to port b/c P_S is too old
SOURCE ./procedures/ps_trace_thread.sql -- to port!
SOURCE ./procedures/ps_setup_reset_to_default.sql -- differrent, to port!

@ericx
Copy link

ericx commented Sep 20, 2019

I had the same problem.
mariadb version:
mysql Ver 15.1 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

I stripped all the end-of-line comments and it ran fine.

jmrenouard added a commit that referenced this issue Sep 25, 2019
Issue importing sys_10.sql #452
@jmrenouard
Copy link
Collaborator

Solution given into README.md

@hrvoj3e
Copy link

hrvoj3e commented Oct 13, 2019

Sorry for commenting on a closed issue.

Another solution is to add ending semicolon before comments on those lines.
E.g. using vim and global replace

:%s/.sql   -- /.sql;   -- /g

Or just add ending semicolons on all commands:

:%s/.sql/.sql;/g

Line

SOURCE ./tables/sys_config_data_10.sql   -- ported

becomes

SOURCE ./tables/sys_config_data_10.sql;   -- ported
                  ----- semicolon ----^ 

@TrapoSAMA
Copy link

hi! error in mariadb10.3 with comment -- ported and other

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

No branches or pull requests

5 participants