forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › SQLyog creates batch scripts with double-quotes
- This topic is empty.
-
AuthorPosts
-
-
November 10, 2004 at 2:07 pm #8649patrickqMember
The scripts resulting from DB->Export Database as Script creates syntax with double quotes such as:
CREATE TABLE “mytable” (“time” datetime);
This does not fly well with a subsequent Tools->Execute Batch Script, which complains and a syntax error. When I edit the script and remove the double quotes, all is well.
Note that single quotes instead of double quotes still fail.
CREATE TABLE 'mytable' ('time' datetime);
still fails.
The above fail both under SQLyog itself when executing the script, as well as when submitted under mysql.
However, the update statements generated by SQLyog, which do include single quotes, do work, for some reason:
INSERT INTO `mytable` (`time`) VALUES ('0001-01-01 00:00:00');
works.
-
November 10, 2004 at 2:42 pm #16529RiteshMember
Which version of MySQL are you using?
Can you cut-n-paste the result returned by “show create table `db`.`table`”?
-
November 11, 2004 at 7:47 am #16530ShadowMember
Apparently MySql interprets “time” as a keyword, thus the CREATE TABLE fails.
-
November 12, 2004 at 2:02 pm #16531patrickqMember
Actually, now that I am re-checking it seems that:
1. SQLyog doesn't use double quotes (“), it uses ` (correctly)
2. In my attempts at finding the problem, I mistakenly used ' instead of `
In fact, I got confused and this is actually a MySQL Administrator bug! The bug is valid, MySQL Administrator does use ” and the script doesn't work, but that's not a SQLyog bug, sorry …
I was trying to combine using MySQL Administrator for scheduled backups (until SQLyog implements scheduled backups), while using SQLyog for everything else (such as one-time backups or restores). Looks like for now I will have to edit the MySQLAdministrator scripts, or else use one-time backups done via SQLyog.
-
November 12, 2004 at 6:09 pm #16532peterlaursenParticipant
Maybe the MySQLadministrator script will work in ANSI-mode ?
With MySQL up to 4.0 the ansi-mode is specified in the server section of the my.ini/my.cnf (and will thus apply to all connections)
With MySQL 4.1 and above each connection could specify individually that ansi-mode should be used for that connection.
-
-
AuthorPosts
- You must be logged in to reply to this topic.