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

Sql Formatter Bug In 11.5

forums forums SQLyog SQLyog: Bugs / Feature Requests Sql Formatter Bug In 11.5

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #13225
      jprateragg
      Participant

      I’m using 11.5 x64 on Windows 7 SP1. I have a query where I join the same table multiple times. Each alias for the table starts with a number (in this example 5). When I run the SQL Formatter command, it inserts a space after the number, breaking the alias naming scheme. I have included two screenshots. The aliases should be “5c1”, “5c2”, “5c3”, etc.

    • #34962
      peterlaursen
      Participant

      You can quote the alias’es. According to MySQL documententation alias’es may be quoted as either a string or an identifier. Please try to `backquote` the aliases for instance.

       

      But it is a verified bug with our formatter as this “SELECT ‘aa’ AS 1aa;” is a valid statement (I think from MySQL 5.1 at least).

    • #34963
      peterlaursen
      Participant

      The reason why I advise to quote as an `identifier` and not as a ‘string’ is because of this:

      http://bugs.mysql.com/bug.php?id=72774 (What I think is a bug in MySQL).

       

      If I am right that this is a server bug, I think the best advice is to avoid having alias’es starting with a number.

    • #34964
      peterlaursen
      Participant

      + I think that if you use the “AS” keyword before the alias it will work?

    • #34965
      peterlaursen
      Participant

      I have added this to our issuetracker here:

      https://code.google.com/p/sqlyog/issues/detail?id=2046

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