[CONJ-93] Connection fails when there is a '-' in the jdbc url Created: 2014-04-16 Updated: 2014-09-17 Resolved: 2014-05-22 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.7 |
| Fix Version/s: | 1.1.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Régis Caspar | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
not applicable |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
After an upgrade 1.1.5 > 1.1.7, I can no longer connect to a database with a '-' in it's name. This may be a regression from Stacktrace: Caused by: java.sql.SQLSyntaxErrorException: 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 '-something' at line 1 |
| Comments |
| Comment by Vladislav Vaintroub [ 2014-04-17 ] |
|
It is not related to The fix for |
| Comment by Vladislav Vaintroub [ 2014-04-17 ] |
|
I attach a patch for this issue. It removes original fix for This patch also ensures that database name is identifier-quoted if createDB parameter is given in the connection URL, for "create database if not exists"/"use" statements. Also add/improve relevant test cases. |
| Comment by Régis Caspar [ 2014-04-17 ] |
|
@Vladislav, thanks for the patch. (fixed "relates to" link) |
| Comment by Georg Richter [ 2014-05-22 ] |
|
fixed in rev. 508. |