Bug #20144 Access Violation on Back and Forward in Query history
Submitted: 30 May 2006 10:50 Modified: 6 Oct 2006 15:00
Reporter: Ron Gommers Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.20 OS:w2000
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: Source Editors

[30 May 2006 10:50] Ron Gommers
Description:
Retrieving a query by using the alt-left and alt-right key sequences produces an access violation (and thus all sorts of other issues).

I would expect to be able to start the browser, click on the "previous query" button to work, but although there are records in the query history, the buttons are disabled. Maybe this is intended. Anyway, this is how I found the access violation, when entering alt-left in the SQL Query Area, just after starting the program.

Also, when using the alt-left key to go to a previous query, it behaves in a strange way, when there is no previous or next query, it advances one character to the right or left (within the current query). I would expect it to do nothing, or at the utmost, tell me via a status line, that there are no more previous or next queries,
but NOT advance to the right or left.

Thanks guys.

How to repeat:
Simplest way to repeat:
Start the browser, and Enter Alt-Left in the SQL Query Area.

Or simply enter two queries, then use the Alt-left key to go to the previous query, keep on repeating this until there are no more queries left....

Suggested fix:
1. Fix the problem
2. Enable "Go Back in Query History" on program start, if a query history is available.
3. When going forward and back, do not display an empty query, if there are no queries anymore, simply stay on the current one. (there is always an empty one inthere, why ?)
4. When going forward and back, do precisely that. 
If there are no previous or next ones, do not change the cursor position, simply do nothing.
[30 May 2006 12:38] MySQL Verification Team
Thank you for the bug report.
[20 Sep 2006 21:24] thomas menzel
in 1.2.3beta much better

but accessviolation still occurs when advancing with alt+right past the last hist. item.

then no old nor new script tabs are working
[6 Oct 2006 15:00] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Crash is fixed. Other behaviour is by design.