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

Semicolon In History Tab

forums forums SQLyog SQLyog: Bugs / Feature Requests Semicolon In History Tab

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9552
      peterlaursen
      Participant

      I think the HISTORY tab should conclude each statement with a “;” (semicolon)

      Gives less editing when people want to copy from there and 'reuse' it – for instance as code within a SP or a trigger.

      Anything that speaks against this?

    • #20949
      Ritesh
      Member

      Not a bad idea.

      But with ALTRE SP and all, we need to put the delimiter as $$ and not ;. Basically, we need to add the query in the history box with the delimiter.

    • #20950
      peterlaursen
      Participant

      nono, I think … <_< If someone wants to put a lot of ordinary SQL in a Create SP or Create Triger statement it runs somewhat like: DELIMITER $$; CREATE procedure … (….) BEGIN ordinary_SQL_1; — with semicolon! ordinary_SQL_2; ordinary_SQL_3; etc END$$ DELIMITER ;$$ Then they can copy structure from an existing database, do all the changes from GUI on that copy, record 'ordinary_SQL_n's' to HISTORY and copy from HISTORY into Create SP or Create Trigger statement. It simply takes the use of semicolon “;” “;” is always used between BEGIN .. END (and inside cursors too), other DELIMITERS is outside BEGIN .. END

      That could be first step in a SP builder GUI (where the copy structure could be transparent to user and where SQL is directly inserted to CREATE PROCEDURE bypassing HISTORY)

    • #20951
      peterlaursen
      Participant

      Same thing applies to EVENTS as they also allow for BEGIN .. END's

      Actually – even if you copy from HISTORY to SQL-PANE you'll need to add “;”s yourself. No need for that – it could be written to history and will do no harm. For permanent storage in 'favorites', use with SP's etc .. people would want not to have the TIME information. So it should be possible to turn it off.

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