forums › forums › SQLyog › Using SQLyog › Copy Table Error
- This topic is empty.
-
AuthorPosts
-
-
January 4, 2006 at 1:51 pm #9427rtkMember
If I create a table in MYSQL and try and copy it to a different MYSQL4 database I get the following error
Error 1064: You have an error in your SQL syntax near 'comment “) Type=InnoDB at line 1
How do I get around that?
-
January 4, 2006 at 1:57 pm #20164RiteshMember
Which version of SQLyog are you using?
What is your source and target MySQL server versions?
-
January 4, 2006 at 8:40 pm #20165rtkMember
The source database is 5.0.17. The target database is 3.23.58-16. I am using SQLyou 5.01.
-
January 4, 2006 at 9:24 pm #20166peterlaursenParticipant
confirmed!
According to this MySQL doc http://dev.mysql.com/doc/refman/4.1/en/alter-table.html comments should be legal with 3.23, 4.0 and 4.1. However it does not work.
If you execute this SQL
Code:alter table `test`.`t1` change `id` `id` bigint (20) NOT NULL AUTO_INCREMENT COMMENT '1test1', change `t` `t` varchar (50) NULL COMMENT '2test2'you will get the same error. So probably it is a bug with the MySQL docs (they recently 'merged' 3.23 , 4.0 and 4.1 docs and probably forgot something!) Sqlyog CREATE TABLE and ALTER TABLE does not have GUI support for comments with MySQL 3.23 either and this is coded bfore the new docs were written.
So I does not look like 3.23 supports comments.
It is a pretty new thing that SQLyog let's you use 'copy table' across versions at all and it is not unproblematic – not with MySQL 5.1 either – because of changed TABLE syntax across versions.
You can export and import. The export file only includes the 'comment' keyword when there really IS a comment. Probably the 'copy table' should do the same. But the bug leads back to a bug in the MySQL docs I believe. The 'copy table' code is correct according to the official MySQL docs as of now!
Let Ritesh COMMENT on it tommorrow!
-
January 5, 2006 at 6:52 am #20167RiteshMember
It seems that COLUMN level comment is not supported in v3.23.x. While copying DDL from 5.x to 3.23.x, SQLyog copies the COMMENT information too and thus the process fails.
I have sent a code patch to our v5.02 development tree that will now check for TARGET MySQL version and will copy COMMENT info only if MySQL version > 4.1.
We will be releasing 5.02 BETA 2 by tomorrow evening that will have this bug fixed.
-
January 7, 2006 at 5:39 am #20168RiteshMember
I mailed you the link for SQLyog Enterprise 5.02 BETA 2 that fixes this issue.
Can you confirm the fix?
-
January 7, 2006 at 5:54 am #20169peterlaursenParticipant
I can confirm.
Just copied a table from 5.0.18 to 3.23.58.
-
-
AuthorPosts
- You must be logged in to reply to this topic.