Bug #46776 MySQL client confused by quotes, treats data as commands
Submitted: 18 Aug 2009 7:42 Modified: 11 Jun 2010 4:35
Reporter: River Tarnell Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.1.35 OS:Any (Solaris, Linux)
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any
Tags: regression

[18 Aug 2009 7:42] River Tarnell
Description:
This is a regression from 5.1.33 client, which worked fine.

# gzip -dc commonswiki.image.sql.gz | mysql
ERROR at line 4894595: Unknown command '\\'.

How to repeat:
Send the file "commonswiki.image.sql.gz", which i have uploaded to ftp.mysql.com:/pub/mysql/incoming/commonswiki.image.sql.gz, as input to the MySQL command-line client (version 5.1.35).

I tried to produce a smaller test case, but when I isolated 20 lines around the line producing the error, the data imported fine.

Suggested fix:
Unknown.
[18 Aug 2009 9:07] Sveta Smirnova
Thank you for the report.

This looks like max_allowed_packet is too small. Please increase it, try again and inform us if problem still exists.
[18 Aug 2009 9:10] River Tarnell
The value of max_allowed_packet is identical on the systems that work (5.1.33) and the ones that don't (5.1.35).  (Also, importing from a 5.1.33 client to the 5.1.35 server works fine, with the same configuration.)

I can't increase it at the moment since the servers are in use and cannot be restarted, but I will try to do so later this week.
[18 Aug 2009 9:38] Sveta Smirnova
Thank you for the feedback.

Please indicate which max_allowed_packet worked in version 5.1.33 Please try 5.1.37 client also.
[20 Aug 2009 9:53] Sveta Smirnova
No feedback needed.

Verified as described using max_allowed_packet=1G. Version 5.1.30 didn't work, then 5.1.33 worked, then next versions don't work again.

To repeat:

1. CREATE TABLE `image` (
  `img_name` varchar(255) binary NOT NULL default '',
  `img_size` int(8) unsigned NOT NULL default '0',
  `img_width` int(5) NOT NULL default '0',
  `img_height` int(5) NOT NULL default '0',
  `img_metadata` mediumblob NOT NULL,
  `img_bits` int(3) NOT NULL default '0',
  `img_media_type` enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') default NULL,
  `img_major_mime` enum('unknown','application','audio','image','text','video','message','model','multipart') NOT NULL default 'unknown',
  `img_minor_mime` varchar(32) NOT NULL default 'unknown',
  `img_description` tinyblob NOT NULL,
  `img_user` int(5) unsigned NOT NULL default '0',
  `img_user_text` varchar(255) binary NOT NULL default '',
  `img_timestamp` varchar(14) binary NOT NULL default '',
  `img_sha1` varchar(32) binary NOT NULL default '',
  PRIMARY KEY  (`img_name`),
  KEY `img_size` (`img_size`),
  KEY `img_timestamp` (`img_timestamp`),
  KEY `img_usertext_timestamp` (`img_user_text`,`img_timestamp`),
  KEY `img_sha1` (`img_sha1`)
) ;

2. Load dump provided.
[11 Jun 2010 4:35] Tatiana Azundris Nuernberg
Can't repeat in current 5.1