Bug #49529 Export/Import to Self-contained file doesn't work
Submitted: 8 Dec 2009 11:54 Modified: 9 Feb 2010 10:41
Reporter: Nidhi Shrotriya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.10, 5.2.14 OS:Linux (ubuntu 9.04, 9.10)
Assigned to: Alfredo Kojima CPU Architecture:Any

[8 Dec 2009 11:54] Nidhi Shrotriya
Description:
Installed workbench 5.2.10 from
http://dev.mysql.com/downloads/select.php?id=8 on Ubuntu 9.04.

Launched mysql-workbench.

1) Home -> Manage Import/Export.

2) Export from Disk -> choose mysql, test schema  -> Export to Self contained file -> choose name as /home/nidhi/dumps/Dump20091208-1.sql

Start export 
05:12:59  IST Dumping mysql (columns_priv db event func general_log help_category help_keyword help_relation help_topic host ndb_binlog_index plugin proc procs_priv servers slow_log tables_priv time_zone time_zone_leap_second time_zone_name time_zone_transition time_zone_transition_type user )
Running: mysqldump --no-create-info=FALSE --order-by-primary=FALSE --force=FALSE --no-data=FALSE --tz-utc=TRUE --flush-privileges=FALSE --compress=FALSE --replace=FALSE --host --insert-ignore=FALSE --extended-insert=TRUE --user --quote-names=TRUE --hex-blob=FALSE --complete-insert=FALSE --password= --port --disable-keys=TRUE --delayed-insert=FALSE --delete-master-logs=FALSE --routines=FALSE --comments=TRUE --add-locks=TRUE --flush-logs=FALSE --dump-date=TRUE --allow-keywords=FALSE --create-options=TRUE --events=FALSE mysql columns_priv db event func general_log help_category help_keyword help_relation help_topic host ndb_binlog_index plugin proc procs_priv servers slow_log tables_priv time_zone time_zone_leap_second time_zone_name time_zone_transition time_zone_transition_type user 
mysqldump: unknown variable 'replace=FALSE'

05:13:00  IST Export has finished

Says export finished successfully. 

But it
- Changes the file name to /home/nidhi/dumps/Dump20091208-2.sql as the export finishes. Though no file /home/nidhi/dumps/Dump20091208-2.sql is created. /home/nidhi/dumps/Dump20091208-1.sql is created (which was chosen by the user) with contents as below

CREATE DATABASE IF NOT EXISTS `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE mysql;

3) Now Try to Import from Self-contained file /home/nidhi/dumps/Dump20091208-1.sql

Gives an error window ->
Unhandled Exception cannot concatenate 'str' and 'NoneType' objects.

How to repeat:
As mentioned in description.
[8 Dec 2009 14:15] Susanne Ebrecht
Many thanks for writing a bug report.

Unfortunately, I am not able to follow you. What exactly do you think is the bug here?
[9 Jan 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[14 Jan 2010 13:18] jean stev
import/export is still not working in version 5.1.11
[20 Jan 2010 15:51] Jason Dekok
As of version 5.2.11 on windows 2003 the import is still not working.  I have attempted multiple sql scripts all failed with this same reported error.  Loading and running the scripts in SQLyog works fine.
[3 Feb 2010 8:12] Nidhi Shrotriya
Verified with 5.2.14 on Ubuntu 9.10. 

Export to Self-contained file still doesn't work. 
In the logs says 'Operation failed with exitcode 2'
and 
No file is created under /home/nidhi/dumps

Progress Report: 
shows Export Completed
but
Statistics:
says Starting ??

Logs:
--------------
01:21:59  IST Dumping mysql (columns_priv db event func general_log help_category help_keyword help_relation help_topic host ndb_binlog_index plugin proc procs_priv servers slow_log tables_priv time_zone time_zone_leap_second time_zone_name time_zone_transition time_zone_transition_type user )
Running: mysqldump --defaults-extra-file=/tmp/tmpHL4EF1/extraparams --no-create-info=FALSE --order-by-primary=FALSE --force=FALSE --no-data=FALSE --tz-utc=TRUE --flush-privileges=FALSE --compress=FALSE --replace=FALSE --host=127.0.0.1 --insert-ignore=FALSE --extended-insert=TRUE --user=root --quote-names=TRUE --hex-blob=FALSE --complete-insert=FALSE --port=3310 --disable-keys=TRUE --delayed-insert=FALSE --delete-master-logs=FALSE --routines=FALSE --comments=TRUE --add-locks=TRUE --flush-logs=FALSE --dump-date=TRUE --allow-keywords=FALSE --create-options=TRUE --events=FALSE mysql columns_priv db event func general_log help_category help_keyword help_relation help_topic host ndb_binlog_index plugin proc procs_priv servers slow_log tables_priv time_zone time_zone_leap_second time_zone_name time_zone_transition time_zone_transition_type user 
Operation failed with exitcode 2

01:22:00  IST Export of /home/nidhi/dumps/Dump20100203.sql has finished

Steps:
------------------

Managa Export/Import -> Export to Disk -> choose 'mysql' and 'test' databases.
Choose Export to Self Contained file (leave by default chosen location as /home/nidhi/dumps/Dump20100203.sql
click Start Export.
[3 Feb 2010 8:22] Nidhi Shrotriya
Import to Self Contained file works fine in 5.2.14.
[3 Feb 2010 12:52] Alfredo Kojima
Export of mysql DB is now working if I uncheck the slow_log and general_log tables when dumping.
If they're checked I get this server error:
mysqldump: Got error: 1556: You can't use locks with log tables. when doing LOCK TABLES

Apparently dumping these tables are not supported (and it doesnt make much sense to backup them up either). Otherwise, dump to self-contained file seems to be working now.
[3 Feb 2010 15:16] Johannes Taxacher
this has been fixed and will be included in 5.2.16
[9 Feb 2010 10:41] Tony Bedford
An entry has been added to the 5.2.16 changelog:

If the Data Dump facility in Administrator was used to export to a self-contained file, then when that file was imported an unhandled exception was generated.