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

MySQL Connection does not quote database name for the query that runs when "show table records" button is clicked. #196

Closed
daniel-dia opened this issue Apr 25, 2019 · 0 comments

Comments

2 participants
@daniel-dia
Copy link

commented Apr 25, 2019

Describe the bug
MySQL Connection does not quote database name when "show table records" button.
The automatic generated query must quote the database name with the ` character. but this does not happens, and, if the database name contains characters like dash or whitespace, the "show table records" does not works

To Reproduce
Steps to reproduce the behavior:

  1. Go to select a database which contains "-" character for example "my-sample-database"
  2. Open database
  3. Hover on a table
  4. Click on 🔍 (show table records) icon
  5. see error Execute query error ER_PARSE_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 '-casamento.config LIMIT 50' at line 1

Expected behavior
Should see the first 50 table entries

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Desktop:

  • OS: Windows,
  • SQLTools Version: v0.17.16

Additional context

ERROR: Error:  ER_PARSE_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 '-marketplace.config LIMIT 50' at line 1
ERROR: Error:  { [Error: Request connection/RunCommandRequest failed with message: ER_PARSE_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 '-marketplace.config LIMIT 50' at line 1
	at handleResponse (C:\Users\Daniel\.vscode\extensions\mtxr.sqltools-0.17.15\extension.js:534:48)
	at processMessageQueue (C:\Users\Daniel\.vscode\extensions\mtxr.sqltools-0.17.15\extension.js:361:17)
	at Immediate.module.exports.setImmediate (C:\Users\Daniel\.vscode\extensions\mtxr.sqltools-0.17.15\extension.js:345:13)
	at runCallback (timers.js:696:18)
	at tryOnImmediate (timers.js:667:5)
	at processImmediate (timers.js:649:5)
	at process.topLevelDomainCallback (domain.js:121:23)] code: -32603, data: undefined }

@daniel-dia daniel-dia added the bug label Apr 25, 2019

@project-bot project-bot bot added this to To do in Kanban Apr 25, 2019

@daniel-dia daniel-dia changed the title MySQL Connection does not quote database name when "show table records" button MySQL Connection does not quote database name for the querie that runs when "show table records" button is clicked. Apr 25, 2019

@daniel-dia daniel-dia changed the title MySQL Connection does not quote database name for the querie that runs when "show table records" button is clicked. MySQL Connection does not quote database name for the query that runs when "show table records" button is clicked. Apr 25, 2019

@mtxr mtxr self-assigned this Apr 27, 2019

@project-bot project-bot bot moved this from To do to In progress in Kanban Apr 27, 2019

@mtxr mtxr closed this in 3a4fe3c Apr 29, 2019

Kanban automation moved this from In progress to To be released Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.