Bug #28564 Importing of dump of mysql database made by MySQL Administrator fails
Submitted: 21 May 2007 15:31 Modified: 25 Feb 2009 12:35
Reporter: Andrey Hristov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Mike Lischke CPU Architecture:Any

[21 May 2007 15:31] Andrey Hristov
Description:
Try to dump your mysql database with MySQL Administrator and then to import it. There will be an error while loading mysql.general_log (against 5.1 server). I suppose mysqldump + mysql will have similar problems.

How to repeat:
Try yourself.
[31 May 2007 14:42] MySQL Verification Team
Thank you for the bug report. The mysqldump client tool ignores that table:

c:\build\5.1>bin\mysqldump -uroot mysql > dump-mysql.sql

c:\build\5.1>grep general_log dump-mysql.sql

/* Don't copy internal log tables */
  if (my_hash_insert(&ignore_table,
                     (byte*) my_strdup("mysql.apply_status", MYF(MY_WME))) ||
      my_hash_insert(&ignore_table,
                     (byte*) my_strdup("mysql.schema", MYF(MY_WME))) ||
      my_hash_insert(&ignore_table,
                     (byte*) my_strdup("mysql.general_log", MYF(MY_WME))) ||
      my_hash_insert(&ignore_table,
                     (byte*) my_strdup("mysql.slow_log", MYF(MY_WME))))
    return(EX_EOM);

Below the file backup done with MA.

c:\build\5.1>grep general_log "dump_mysqlad 20070531 1133.sql"
-- Definition of table `general_log`
DROP TABLE IF EXISTS `general_log`;
CREATE TABLE `general_log` (
-- Dumping data for table `general_log`
/*!40000 ALTER TABLE `general_log` DISABLE KEYS */;
INSERT INTO `general_log` (`event_time`,`user_host`,`thread_id`,`server_id`,`command_type`,`argument`) VALUES
 ('2007-05-31 11:24:04','root[root] @ localhost [127.0.0.1]',1,0,'Query','select * from general_log'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_
 ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = \'UNDO LOG\' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IN (SELECT
INCT LOGFILE_GROUP_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = \'DATAFILE\' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE
 FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA=\'mysql\' AND TABLE_NAME IN (\'general_log\'))) GROUP BY LOGFILE_GROUP_NAME, FIL
E, ENGINE ORDER BY LOGFILE_GROUP_NAME'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','SELECT DISTINCT TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAM
TENT_SIZE, INITIAL_SIZE, ENGINE FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = \'DATAFILE\' AND TABLESPACE_NAME IN (SELECT DISTINCT TA
ACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA=\'mysql\' AND TABLE_NAME IN (\'general_log\')) ORDER BY TABLESPACE_NAME,
ILE_GROUP_NAME'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','LOCK TABLES `general_log` READ /*!32311 LOCAL */'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','show create table `general_log`'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','show fields from `general_log`'),
 ('2007-05-31 11:24:41','root[root] @ localhost [127.0.0.1]',2,0,'Query','SELECT /*!40001 SQL_NO_CACHE */ * FROM `general_log`'),
 ('2007-05-31 11:26:10','root[root] @ localhost [127.0.0.1]',3,0,'Query','DROP TABLE IF EXISTS `general_log`'),
 ('2007-05-31 11:33:14','root[root] @ localhost [127.0.0.1]',7,0,'Query','SHOW INDEX FROM `general_log`'),
 ('2007-05-31 11:33:14','root[root] @ localhost [127.0.0.1]',7,0,'Query','DESCRIBE `general_log`'),
 ('2007-05-31 11:33:28','root[root] @ localhost [127.0.0.1]',9,0,'Query','show table status from `mysql` like \"general_log\"'),
 ('2007-05-31 11:33:28','root[root] @ localhost [127.0.0.1]',9,0,'Query','SELECT count(*) FROM `mysql`.`general_log`'),
 ('2007-05-31 11:33:28','root[root] @ localhost [127.0.0.1]',9,0,'Query','SHOW CREATE TABLE `mysql`.`general_log`'),
 ('2007-05-31 11:33:28','root[root] @ localhost [127.0.0.1]',9,0,'Query','SELECT /*!40001 SQL_NO_CACHE */ * FROM `mysql`.`general_log`'
/*!40000 ALTER TABLE `general_log` ENABLE KEYS */;

c:\build\5.1>
[25 Feb 2009 12:35] Mike Lischke
This is by intention. MA only restores dumps created by MA itself. You can however override that behavior by enabling "Ignore Errors" on the General tab.