Bug #26769 strange effect with font highligting
Submitted: 1 Mar 2007 20:34 Modified: 29 Jan 2009 12:31
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.10, 1.2.12 OS:Microsoft Windows (Windows XP)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: qc

[1 Mar 2007 20:34] Martin Friebe
Description:
This may be just the fonts on my windows box, so if it doesn't reproduce, sorry for it (but I have just the one windows box avail at current)

Enter the following sql into the query browser

select "x 'x'" UNION ALL select '"x,x",x,x';

A strange char or highlighting appears in front of the first single quote. 

As an effect the cursor is also incorrectly located. It is displayed one position in front of its real position. (painful if you need to insert or delete in the middle of the query)

How to repeat:
select "x 'x'" UNION ALL select '"x,x",x,x';

Suggested fix:
-
[1 Mar 2007 20:45] Valeriy Kravchuk
Thank you for a problem report. Please, upload a screenshot showing these. I can not repeat the behaviour described, hence the request.
[1 Mar 2007 21:00] Martin Friebe
will work out info on the font used on my system

Attachment: highlight.JPG (image/jpeg, text), 32.89 KiB.

[1 Mar 2007 21:01] Martin Friebe
in the image, the cursor is on the end of line (behind the semicolon)
[1 Mar 2007 21:04] Martin Friebe
MS Sans serif 8.3 and Bitstream Vera Sans Mono 7 / 8.3

Attachment: font.JPG (image/jpeg, text), 13.65 KiB.

[1 Mar 2007 21:05] Valeriy Kravchuk
Yes, information on what the font is it will be useful.
[1 Mar 2007 21:06] Martin Friebe
In the first image, the grey box, before the first single quote doesnt belong there.

The dots are fine, since spaces are made visible.
[1 Mar 2007 21:14] Martin Friebe
Try to enter the query by hand, maybe that will do.

In my case the error happens the instant I enter the first single quote.
- It must be after an opening double quote.
- there must be additional chars between the opening dbl-quote and the single quote, and one of those must be a space.
- the space can be the directly in front of the single quote, but for on my box it can be anywhere.

changing the fonts, did not help
[1 Mar 2007 21:15] Martin Friebe
and it does get worse, the more space I enter.
[2 Mar 2007 18:26] Valeriy Kravchuk
Please, try to repeat with a newer version, 1.2.10 (from GUI Tools 5.0-r10), and inform about the results.
[13 Mar 2007 13:32] Martin Friebe
It does still happen in 1.2.10.

I found that it does only happens if you switch on "Show tabs and line breaks in editor" (in Tools/Options/Editors)

Switch this on before you enter/edit the query.
[16 Mar 2007 14:34] Valeriy Kravchuk
Verified just as described, taking into account your last comment!
[26 Jul 2007 1:52] Dan Loa
This is still a problem in v 1.2.12 (as downloaded in mysql-gui-tools-5.0-r12-win32.msi). Been annoying me for ages - nice to find the work-around!
[29 Jan 2009 12:31] Mike Lischke
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/