Bug #25584 | multiple statements sharing a line mess up highlighting/greying of active query | ||
---|---|---|---|
Submitted: | 12 Jan 2007 13:08 | Modified: | 17 Jan 2007 9:08 |
Reporter: | Yahoo Serious (Silver Quality Contributor) | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Query Browser | Severity: | S3 (Non-critical) |
Version: | 1.2.8 | OS: | Windows (Windows 2000 SP4, XP SP2) |
Assigned to: | Mike Lischke | CPU Architecture: | Any |
[12 Jan 2007 13:08]
Yahoo Serious
[12 Jan 2007 13:26]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described on Windows XP SP2.
[17 Jan 2007 8:13]
Mike Lischke
What you see there is the result of an extension in the query area for which it wasn't made. The query area in its pure incarnation is designed to work like an address (e.g. similar to a web browser, that means only one query must be entered). While this design decision might be questionable it is what QB started with. Allowing multiple commands in this area complicates matters to a point where we cannot simply fix a little annoying thing to make it work. If you really need multiple commands, particularly, if they don't return a result set then please use the scripting area (Ctrl+Shift+T to open a script tab). There you can have any combination of commands and there is no concept of an "active command" as in the query area (which is what makes this so complicated). Note: you can execute commands step-by-step and also select one and execute only that. Use the query area to develop complicated queries. This is what it is for.
[17 Jan 2007 9:08]
Yahoo Serious
Actually, my trouble here started because of the incorrect undo (Bug #21069) which mangled my queries. Not because I wanted to do something fancy (or just mess around). I usually use the query area to develop (sometimes complicated) queries with a result set. I often execute queries/commands step-by-step (select one and execute only that one), to check queries, commands, and database+table-design. (And I like it this way!) However, I think this is not only a greying problem, but also a query selection problem. How would a user intuitively(!) know, which query gets executed (selected), when they have multiple queries on a line. Right now they do not have an indication that only the first one gets executed (see Bug #25583). I am not saying you should execute either one, not at all! I am just saying that not greying suggests execution, sometimes where it should not. So if you want to keep it simple, I would suggest disable any query which has something else than a comment on the line ending it. So you would also disable the first query, which will probably make the greying a lot easier (since it can be line-based).
[17 Jan 2007 15:06]
Mike Lischke
I perfectly understand you. The easiest solution is still not to have more than one query on a single line. A query can span several lines of course. Wait for the next release (which is planned yet this week) and see if it works out better for you. There is a warning if more than one query is found on a line and only the first one is executed (the first one which ends on the current line). The marking process (line highlighting) still cannot be fixed, though, as it is a purely line-based indicator which requires a n:1 relationship (n lines for 1 query, with n >= 1) to work properly. Anyway, I appreciate your patience and your bug reports. Don't let this problem keep you from reporting other odd things.
[30 Jan 2007 9:59]
Sveta Smirnova
There is similar Bug #25747