Unsupported Screen Size: The viewport size is too small for the theme to render properly.

not parsing comments properly?

forums forums SQLyog SQLyog: Bugs / Feature Requests not parsing comments properly?

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #8225
      nelson1993
      Member

      In version 3.61 when I execute a query (either with F5, Shift-F5, or Ctl-F5) that includes a comment, the parser does not seem to be able to separate the comment from the query. For example, executing the following block of text:

      # this is a comment

      ALTER TABLE `table1` CHANGE `parentId` `newId` INT(10) UNSIGNED DEFAULT “0” NOT NULL;

      shows up in the History tab as follows:

      [2:45:36 PM][ 0 ms] # this is a comment ALTER TABLE `table1` CHANGE `parentId` `newId` INT(10) UNSIGNED DEFAULT “0” NOT NULL

      and the sql command is not executed. I seem to have to put a ';' on a line between the comment and the beginning of the sql statement to get the command to execute.

      Am I just missing something obvious, or is this a bug?

      thanks,

      mn

    • #15172
      Shadow
      Member

      Interesting, SQLyog does not seem to regard line breaks as termination of comments. Should be corrected…

    • #15173
      number_one
      Participant

      I mentioned this way back with the release of SQLyog 3.5

      Comments with the pound sign will no longer work because it wraps everything onto one line before parsing it as of version 3.5. Before that, it parsed each line with carriage return separately. So now the only way to reliably use comments is by enclosing a comment with /* */ type indicators.

      Very, VERY annoying for someone who uses comments frequently and would like to comment out a very long query by simply putting a pound sign in front. I don't know why it hasn't been corrected, and IMHO there is no valid reason to say that this change is “by design”.

      PLEASE, PLEASE fix this so I can stop using version 3.11

    • #15174
      Ritesh
      Member

      This bug was fixed in SQLyog 3.62. I executed the following sql in SQLyog 3.62 & 3.63 –

      Code:
      #this is a comment
      alter table `ritesh`.`db` ,change `Db` `Db` int (64)   NOT NULL ,drop primary key, add primary key (`Host`, `Db`, `User` );

      The outputs are given in the attached images. I executed the above statement using F5 and Shift+F5.

      SQLyog strips off all the carriage return characters before adding them to the History window. It will send the query to MySQL as entered by the user.

    • #15175
      Ritesh
      Member

      The above bug was present in SQLyog 3.61 as reported by nelson1993

Viewing 4 reply threads
  • You must be logged in to reply to this topic.