Bug #20980 Escape sequence characters fail
Submitted: 11 Jul 2006 23:08 Modified: 18 Sep 2006 22:38
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.20 OS:Windows (WinXP)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Source Editors

[11 Jul 2006 23:08] Jared S
Description:
Excape sequance character are failing with vague error information.

i.e. insert into table() values('john\'s' special pizza')

How to repeat:
-- 1. start Query Browser
-- 2. copy & paste the script below which is pure example of new and clean db

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.0.22-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
--
-- Create schema schema1
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ schema1;
USE schema1;
--
-- Table structure for table `schema1`.`table1`
--
DROP TABLE IF EXISTS `table1`;
CREATE TABLE `table1` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `description` varchar(45) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `schema1`.`table1`
--

/*!40000 ALTER TABLE `table1` DISABLE KEYS */;
INSERT INTO `table1` (`id`,`description`) VALUES 
 (1,'Jared\'s bug');
/*!40000 ALTER TABLE `table1` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

Suggested fix:
Correct the issues with Query Browser 1.1.20 to ensure that the escape sequence \' works without errors.
[14 Jul 2006 10:10] Tonci Grgin
Hi Jared and thanks for your problem report.
I was able to verify like described on similar environment. Weird thing is that if you separate your script in 3 parts, middle part being INSERT statement, and paste text to 3 separate script tabs, everything works!
Your second question is actually feature request and you can open it in separate  S4) report.
[17 Jul 2006 23:40] Jared S
Thank you for verifying - I often use split script for things like foriegn keys in innodb tables, but is hardly a reasonable work around for my table which has 13K rows and needs to be backup and restored on regular basis.

Problem is also verfiried in QA 1.2.1 (form the GUI bundle)
[12 Sep 2006 23:01] Jared S
When will this be fixed?
[13 Sep 2006 6:20] Mike Lischke
This bug has already been solved in the context of another bug. I just have not yet come around this bug to close. Your comment made me aware of this so I close the report now. Thanks again for your bug report.
[13 Sep 2006 22:34] Jared S
Please tell me which other bug is related to so I know which build to wait for to download.
[14 Sep 2006 7:26] Mike Lischke
It was bug #22214, but that won't help you much. When we say the fix is in the source repository then you will get it with the next release that is published after the bug was closed (rough estimate: in about 2 weeks). You can also get the latest source form our public repositories and build your own binary.
[18 Sep 2006 22:38] Jared S
That bug is completley different.  Can you check the link to the bug you gave me.  This issue has been crippling my database development productivity for almost a year now.