Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Database Name is not safe scape #147

Closed
3 of 7 tasks
gravataLonga opened this issue Oct 6, 2017 · 3 comments
Closed
3 of 7 tasks

Database Name is not safe scape #147

gravataLonga opened this issue Oct 6, 2017 · 3 comments
Assignees

Comments

@gravataLonga
Copy link

gravataLonga commented Oct 6, 2017

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request

  • Bugfix/Errors
    The database name is not safe scape. Give the same error:
    ERROR 1064 (42000) at line 1: 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 '-client.actions' at line 1
    Because my database name is: development-client.

  • Questions

  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
    Yes
  • Did you check the logs?
    No
  • Did you check the Setup?
    Yes

Description

The database name is not safe scape. Give the same error:
ERROR 1064 (42000) at line 1: 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 '-client.actions' at line 1
Because my database name is: development-client.

I try all the thing,
"development-client": {
"type": "mysql",
"host": "db",
"port": "3306",
"username": "root",
"password": "control",
"database": "{development-client}"
}

[Description of the bug or feature]

Steps to Reproduce (For bugfixes)

  1. [First Step]
    Adding database configuration
  2. [Second Step]
    CTRL+e CTRL+d
    Select the database and then table.

Expected behavior: [What you expected to happen]
Get result from table.

Actual behavior: [What actually happened]
ERROR 1064 (42000) at line 1: 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 '-client.actions'

Versions

MacOS 10.12.6
Using SQLTools v0.9.5

@tkopets
Copy link
Collaborator

tkopets commented Oct 26, 2017

I will take a look if there is a simple fix for this.
Last time I checked MySQL did not have a server-side function to quote identifiers, and in SQLTools code itself, we don't include ANY RDBMS specific code intentionally.

@tkopets
Copy link
Collaborator

tkopets commented Oct 26, 2017

This fix will be available in next release.

@gravataLonga
Copy link
Author

Many thank for your work put on this. I can't thank you enoght! :) Keep the good Work!

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

No branches or pull requests

2 participants