forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Bug: Using Tables + Databases With Reserved Words
- This topic is empty.
-
AuthorPosts
-
-
April 6, 2006 at 8:51 am #9598Gabriel BarazerMember
Hello,
I'm using SQLyog Pro 5.02 and found a bug in the table context menu -> duplicate table structure/data
If the table I want to copy has a column which is a reserved word (in my case, i have a column named “unique”), SQLyog don't add the ` (backquotes) to escape it and the query fails.
Similarly, the function to export a database as SQL statements (Tools->Export blablah, or database context menu) fails if the database name contains a – (hyphen), which is allowed in DB name, but must be escaped when using the db.table syntax (e.g. my-base.my_table => `my-base`.my_table or with all escaped => `my-base`.`my_table`)
The best way to avoid this kind of bug is escaping all the table , columns and database names.
Thanks in advance 😉
-
April 6, 2006 at 10:25 am #21171peterlaursenParticipant
??????
I tried with SQLyog Enterprise 5.02 and 5.1 beta 5. Results are the same.
1)
I can dublicate and export/import any table whether it is named SELECT or UNIQUE or whatever
2)
and all objlects (including databases and tables) are ALWAYS enclosed in backticks.
BTW: THIS IS NOT ESCAPING – escaping is something quite different!
A more detailed 'test case' please!
-
April 6, 2006 at 1:45 pm #21172RiteshMemberGabriel Barazer wrote on Apr 6 2006, 08:51 AM:Hello,
I'm using SQLyog Pro 5.02 and found a bug in the table context menu -> duplicate table structure/data
If the table I want to copy has a column which is a reserved word (in my case, i have a column named “unique”), SQLyog don't add the ` (backquotes) to escape it and the query fails.
Similarly, the function to export a database as SQL statements (Tools->Export blablah, or database context menu) fails if the database name contains a – (hyphen), which is allowed in DB name, but must be escaped when using the db.table syntax (e.g. my-base.my_table => `my-base`.my_table or with all escaped => `my-base`.`my_table`)
The best way to avoid this kind of bug is escaping all the table , columns and database names.
Thanks in advance 😉
The second point was a bug and has been fixed in BETA 6 (we are not releasing RC as we still feel lot of issues are unresolved).
The first problem, we are not able to reproduce. Can you give us more info e.g. MySQL version, tunnel or direct connection, SQLyog version?
-
-
AuthorPosts
- You must be logged in to reply to this topic.