Menu

#1506 mysql database name in sql-query not encoded

v3.2
closed
JBossCMP (436)
5
2004-12-29
2003-09-09
No

When using Database Names like abc-def using this database (
or table or field name) in the sql statement without ` arround it,
causes a mysql query error.

The simplest solution would be to put ` arroung every
databasename,tablename and fieldname.

example:
using the database name w10222-test
i got a show table w10222-test as 'blabla' send to the mysql
server.

Martin Klebermass@limtec.de

Discussion

  • Heiko W.Rupp

    Heiko W.Rupp - 2003-09-26

    Logged In: YES
    user_id=217112

    I am currently not sure if database names with dashes in
    them are correct sql even if mysql allows them.

    So I am not sure, if this should be supported or not.

     
  • Klebermass Martin

    Logged In: YES
    user_id=129118

    Well i am sure that it is allowed in mysql.
    well first it works and second, a few days ago i submitted another bug
    concerning dashes in the name to mysql , and at the moment they are
    fixing it ( or at least one of the developer sayed that that problem will
    be fixed).

     
  • Heiko W.Rupp

    Heiko W.Rupp - 2003-09-26
    • assigned_to: nobody --> pilhuhn
     
  • Heiko W.Rupp

    Heiko W.Rupp - 2003-09-26

    Logged In: YES
    user_id=217112

    I'll have a look at it.

     
  • Klebermass Martin

    Logged In: YES
    user_id=129118

    for more Information about Legal Names for tables,DBs etc have a
    look at
    http://www.mysql.com/doc/en/Legal_names.html

     
  • Scott M Stark

    Scott M Stark - 2004-12-29

    Logged In: YES
    user_id=175228

    All issues have been moved to http://jira.jboss.com. Existing
    issues have been moved. New issues will be closed with this
    canned reponse.

     
  • Scott M Stark

    Scott M Stark - 2004-12-29
    • status: open --> closed
     

Log in to post a comment.