Menu

#1631 USE clause fails on names with hyphens

2.6.1-pl3
wont-fix
5
2013-06-11
2005-03-16
No

(Not sure if the chosen category is correct. Where can
I find a description of them?)

Entering a USE clause in the SQL tab fails for file
names containing hyphens fails.

Try:

USE pay-payments

Result:

SQL-query:

USE pay - payments

MySQL said: Documentation
#1064 - 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 '-payments' at line 1

Apparently extra spaces are inserted in the query.

Discussion

  • Michal Čihař

    Michal Čihař - 2005-03-16

    Logged In: YES
    user_id=192186

    It's probably in SQL parser....

     
  • Michal Čihař

    Michal Čihař - 2005-03-16
    • labels: 509096 --> MySQL Parser
     
  • Leonard den Ottolander

    Logged In: YES
    user_id=727315

    My thought. Only did the "MySQL" in the category name "MySQL
    parser" confuse me somewhat. Had the category been called
    "SQL parser" I would have definitely chosen that category ;-) .

     
  • Marc Delisle

    Marc Delisle - 2005-05-08
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2005-05-08

    Logged In: YES
    user_id=210714

    I was suspecting the parser too. But after debugging this, I
    am convinced that it's not a phpMyAdmin problem.
    If you have a look at the error message, it says
    near '-payments'
    and there is no extra hyphen sent here to MySQL by phpMyAdmin.
    I checked in the function PMA_DBI_try_query() and we are
    _not_ sending extra hyphens.
    The MySQL API currently cannot interpret this. If you add
    backquotes around the db name, it can. For further
    confusion, in mysql command-line, this commands works.
    I will add FAQ 3.13 about this.

     
  • Marc Delisle

    Marc Delisle - 2005-05-08
    • status: open --> closed-wont-fix
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-wont-fix --> wont-fix
     
MongoDB Logo MongoDB