Bug #19415 wrong proccessing of escaped sting backslash-koma (\')
Submitted: 28 Apr 2006 0:16 Modified: 28 Apr 2006 14:31
Reporter: rene wissmann Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:QueryBrowser 1.1.20 OS:Windows (W2k Server (act.updates))
Assigned to: CPU Architecture:Any

[28 Apr 2006 0:16] rene wissmann
Description:
creating scripts with more than 1 line can be impossible, if strings with "\'" are used.

the single line is executed correct, but the end of the line is not recognized and the script runs into an error at a (unexpected?!) ";".

Every new Line has a blue point in front of it (in the Scripteditor in MySQL Query Browser), the affected lines dont have.

I am still thinking about possible other reasons why this happens. I have SQL-Scriptfiles in Ansi and UTF8 format, created by mysqldump from my previous installation.

-- MySQL dump 9.11
--
-- Host: localhost    Database: mixmax
-- ------------------------------------------------------
-- Server version	4.0.21-nt

How to repeat:
enter the following 2 Lines in the querybrowser (Resulttab or Scripttab)

select 'test\'s', 'test';
select 'test2', 'test';

Each single line works. trying to use 2 Lines in one script will end up in an error when there is a \' in a line before the last line.

following works:
select 'test\'s', 'test';
select 'test2', 'test';

affected are any commands (as inserting, updating etc), the text is correct colored (the stings are orange, the komma between is black)

Suggested fix:
correct escaped strings should not affect anything outside the string. Very short scripts can be rewritten with concat and char(39) but i am unable to rewrite a dumped 13Meg table on this way.
[28 Apr 2006 14:31] Valeriy Kravchuk
Looks like a duplicate of bug #17435.