Bug #6965 incorrect comma in backup file
Submitted: 2 Dec 2004 20:58 Modified: 2 Dec 2004 21:15
Reporter: Roman Widmer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Administrator Severity:S1 (Critical)
Version:1.0.15 OS:Microsoft Windows (MS XP Pro)
Assigned to: CPU Architecture:Any

[2 Dec 2004 20:58] Roman Widmer
Description:
When running a backup using MySQL Administrator (Backup file format SQL file, complete  INSERTs), a superfluous comma is inserted at the end of an INSERT INTO statement (look for  (5,'Hi'),;  in example below):

SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
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 DATABASE /*!32312 IF NOT EXISTS*/ `test`;
USE `test`;
CREATE TABLE `mytable` (
  `Col_1` int(10) unsigned NOT NULL auto_increment,
  `Col_2` varchar(45) NOT NULL default '',
  PRIMARY KEY  (`Col_1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `mytable` (`Col_1`,`Col_2`) VALUES 
 (1,'Hello'),
 (2,'Good Bye'),
 (3,'So long'),
 (4,'Bye Bye'),
 (5,'Hi'),;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

When running a backup from this file, a syntax error occours. When the superfluous comma is deleted, the backup runs correctly

How to repeat:
simply run a backup in MySQL Adminstrator
[2 Dec 2004 21:15] MySQL Verification Team
Duplicate for #6929