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

& In Field Name Becomes _ In The Result Grid

forums forums SQLyog SQLyog: Bugs / Feature Requests & In Field Name Becomes _ In The Result Grid

  • This topic is empty.
Viewing 6 reply threads
  • Author
    Posts
    • #9669
      Nick_Ring
      Member

      If a query has a '&' in the field name, Windows converts it an '_' in the grid.

      Execute:

      SELECT (@byt & (~@byt)) & 255;

      in the query tabe and the column name becomes “(@byt & (~@byt)) _255” :huh:

    • #21553
      peterlaursen
      Participant

      hehe … could you explain a little bit about what this query means ? 😮

      But SQLyog does exactly as you describe it. MySQL command line client does not.

      Now I experienced a little more:

      I create a `&&&` table with a `&&&` column (a CHAR type) and entered the value '&&&'.

      Next executed

      SELECT `&&&` from `&&&`;

      The column name is displayed as `&` and not `&&&`.

      MySQL command line does:

      mysql> SELECT `&&&` from `&&&`;

      +


      +

      | &&& |

      +


      +

      | &&& |

      +


      +

      1 row in set (0.00 sec)

      mysql>

      Now what the issue is here Ritesh must explain … 😀

    • #21554
      Nick_Ring
      Member

      The query is quite irrelevant – It just happened to be the query I was playing around with then found the (windows) bug. 😀

      select 1 as '&';

      will show an '_' as the column name, while

      select 1 as '&&';

      will show '&' as the column name.

      select 1 as '&&&';

      will show '&_' as the column name.

      The problem is how Windows handle the '&' character (happens a bit in programming). Either the grid component needs to tell Windows do not use '&' as a hot key character (like in menus) or the application writer needs to do search and replace – search for '&' and replace with '&&'.

    • #21555
      Ritesh
      Member

      Indeed, that is what happens. In Windows, drawing of character '&' changes it to menu identification. I have added this to our T-DO list. We will fix it in v5.2.

    • #21556
      peterlaursen
      Participant

      I don't know if this is a Windows thing or SQLyog thing. MySQL Query Browser does correct with your queries as well as mine.

    • #21557
      Nick_Ring
      Member

      I think it is a Window thing, as I have seen it a lot. The problem can usually (but not always) be traced down to either DrawText or DrawTextEx API calls, with the calling routine not passing in 'DT_NOPREFIX' in formatting options of these two API calls.

    • #21558
      Ritesh
      Member

      Added in the TO-DO list of v5.2.

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