Forums » General Discussion

Thread: Format SQL in script editor doesn't work with "non SELECT" scripts

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 1 - Pages: 1 - Last Post: Feb 17, 2011 2:33 AM by: Guy_M Threads: [ Previous | Next ]
Guy_M

Posts: 26
Registered: 2/16/11
Format SQL in script editor doesn't work with "non SELECT" scripts
Posted: Feb 16, 2011 1:56 AM
 
  Click to reply to this thread Reply

Hi,

I don't know if it's a bug or if I miss something.

The "Format SQL" command works fine with SELECT script (like SELECT FROM WHERE) but doesn't work with other SQL script (like CREATE/ALTER VIEW ... AS SELECT ...).

It's very annoying when I have to alter a view with a huge SELECT statement.

I hope that help
Guy
PS: please apologize my poor English.



Guy_M

Posts: 26
Registered: 2/16/11
Re: Format SQL in script editor doesn't work with "non SELECT" scripts
Posted: Feb 16, 2011 3:33 AM   in response to: Guy_M
 
  Click to reply to this thread Reply

Hi,

Some detail to reproduce the bug :
Doesn't work in a CREATE VIEW scripts when "ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER" is present
Doesn't work in ALTER VIEW scripts even if I delete "ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER"

If you select a SELECT statement or a part of a SELECT statement (SELECT have to be the first word selected) and then "Format SQL" the selection is formated. Useful for short SELECT statement but more difficult for large one.

I Hope this will help
Guy
Message was edited by: Guy_M


Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums