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

Quote DB names #55

Open
prilka opened this issue May 12, 2016 · 0 comments
Open

Quote DB names #55

prilka opened this issue May 12, 2016 · 0 comments

Comments

@prilka
Copy link

prilka commented May 12, 2016

I tried to use stellar with a Mysql/MariaDB database which has a dash in it's name.

The result is this:

$:[~]:$ stellar snapshot
Snapshotting database foo-bar
Traceback (most recent call last):
  File "/usr/local/bin/stellar", line 9, in <module>
    load_entry_point('stellar==0.4.3', 'console_scripts', 'stellar')()
  File "/usr/local/lib/python2.7/dist-packages/stellar/command.py", line 279, in main
    stellar()
...
...
  File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
    raise errorclass(errno, errorvalue)
sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-bar' at line 1") [SQL: 'SHOW TABLES in foo-bar;']

For Mysql the correct query should look like this: SHOW TABLES in foo-bar``

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

1 participant