Bug #11161 Query Edit Box does not recognize last characters in lines of large queries
Submitted: 8 Jun 2005 9:47 Modified: 23 Sep 2005 9:58
Reporter: Kai Sautter (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.10 OS:Windows (Windows XP SP2)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any

[8 Jun 2005 9:47] Kai Sautter
Description:
Having a long query, that spans 10 or more rows and is broader than the Query Edit Box, the last two characters at the end of a line (>= 10) that may or may not be beyond the regularly displayed area within the Query Edit Box (cursor at left most position).

Specific behaviour:
Keyboard: End Key sets cursor in front of charater at a position within the line (somewhere close the end); the same applies, if you move the cursor with the right arrow. Deleting the characters with "Delete" works fine.
Mouse: When positioning the mouse corsor at the end of the line and then clicking to move the cursor to the end of the line, puts the cursor in the position described above. Likewise selections that should start at the end of the line, start at that position. A selection where you position the cursor as above and then drag the mouse (while you hold down the mouse button) to the right, selects the text from the incorrect line end position to the real end of the line.

How to repeat:
This is the query i was editing/executing:
select * from TABLE1
left join
(SELECT FIELD1, FIELD2, FIELD3, FIELD4, FIELD5 FROM TABLE2) as re
  on (TABLE1.FIELD10 = re.FIELD3)
  where (re.FIELD4 = table1.FIELD11
      or re.FIELD4 = '#'
      or (re.FIELD4 < table1.FIELD11 and (re.FIELD5 >= table1.FIELD11
                                    or (right(re.FIELD5, 1) = '#'
                                         and left(re.FIELD5, length(re.FIELD5) - 1) = left(table1.FIELD11, length(re.FIELD5) - 1))))
			or (right(re.FIELD4, 1) =  '#' and left(re.FIELD4, length(re.FIELD4) - 1) = left(table1.FIELD11, length(re.FIELD4) - 1)))
	and not (re.FIELD2 is null)
[8 Jun 2005 17:39] Jorge del Conde
Thanks for your bug report.  I was able to reproduce it by pasting your query in the query box and moving the cursor to the end/right
[8 Jun 2005 17:39] Jorge del Conde
Attatching screenshot showing bug
[8 Jun 2005 17:40] Jorge del Conde
bug screenshot

Attachment: Image1.png (image/x-png, text), 54.51 KiB.

[23 Sep 2005 9:58] 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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html