Skip to content

Can't run query like "DELIMITER /*!*/;" #351

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

Closed
ptloo opened this issue Jun 29, 2015 · 2 comments
Closed

Can't run query like "DELIMITER /*!*/;" #351

ptloo opened this issue Jun 29, 2015 · 2 comments

Comments

@ptloo
Copy link

ptloo commented Jun 29, 2015

I'm trying to use the driver to restore database from bin log. The sql file is created from "mysqlbinlog -r". In the sql file, it sets DELIMITER to /!/ at the beginning. Some how code like:
db.Query("DELIMITER /!/;")

fails with following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER /!/' at line 1

I tried other string/char for the delimiter, none works. Is there any limitation on this driver that it can't run delimiter query?

Please help. Thanks!

@xaprb
Copy link

xaprb commented Jul 9, 2015

The delimiter is not a feature of the SQL query language that the server understands. It is a feature of the mysql commandline client and can only be used there.

@ptloo
Copy link
Author

ptloo commented Jul 9, 2015

Thanks. I managed to work around this by skipping that line and replace the delimiters in the bin log.

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

No branches or pull requests

2 participants