Bug #71799 The command line is too long.
Submitted: 22 Feb 2014 3:08 Modified: 21 Aug 2014 0:10
Reporter: Mohit Jain Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:6.0.9.11421 Build 1170, 6.1.1-beta OS:Any
Assigned to: CPU Architecture:Any
Tags: Backup, Data Export, export to self-contained file

[22 Feb 2014 3:08] Mohit Jain
Description:
I am having around 450 table and 50 views in my database.
On exporting data, using Data export, Export to Self-Contained File.
Click on button Select Tables. It will ignore all the views and select on tables.

When we click on Start Export button it gives error:

08:31:13 Dumping spmis1213qot (embosemaster_ex, fpsorting_com, bookesttemplatemaster, bookreqpaper, companydesqtydate, item_rawmaterial_invoice_master, item_newoschmaster, bookenvratedetail, lammetpetratedetails, bookleafpage, fplamination, bookcordratedetail, item_jembossing, item_sttemp, fpmetlamination, item_qtctemp_master, formissue_master, item_qcparam, companydelqtydate, item_frmaster, .......
(removed table names)

The command line is too long.

Operation failed with exitcode 1

08:31:14 Export of C:\Users\Mohit Jain\Documents\dumps\Dump20140222.sql has finished with 1 errors

How to repeat:
Select a database having more than 450 tables and 20 views.

Data Export:
On Object selection Tab:

Select database objects for export:

Select database name,
It will select all tables in selected database.

Now click on button Select Tables

In Options frame:
Select radio button: Export to self-contained file.

Now, click on button Start Export.

The above said error will be shown.
[22 Feb 2014 3:11] Mohit Jain
Screen shot of error

Attachment: ExportDataBug.jpg (image/pjpeg, text), 204.91 KiB.

[24 Feb 2014 11:47] MySQL Verification Team
Hello Mohit,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[24 Feb 2014 11:51] MySQL Verification Team
// How to repeat
// May be tables count can be reduced to trigger

create database if not exists Bug1799;
use Bug1799;

DELIMITER //
DROP PROCEDURE IF EXISTS ct//

CREATE PROCEDURE ct()
BEGIN

 DECLARE v1 INT DEFAULT 1000;
  WHILE v1 > 0 DO

SET @s = CONCAT('DROP TABLE IF EXISTS ', 'ttttttttttttttttttttttttt',v1);
PREPARE stm FROM @s;
EXECUTE stm;

SET @s = CONCAT('CREATE TABLE ','ttttttttttttttttttttttttt',v1,' (id int not null)');
PREPARE stm FROM @s;
EXECUTE stm;

    SET v1 = v1 - 1;
  END WHILE;

END //

DELIMITER ;
call ct;

// Now, open up WB and try to export tables(select all, and uncheck few so to trigger this issue)

// Drop the dummy schema
drop database Bug1799;
[16 Jun 2014 5:17] MySQL Verification Team
Bug #70476 marked as duplicate of this
[21 Aug 2014 0:10] Philip Olson
Fixed as of the MySQL Workbench 6.2.1 release, and here's the changelog entry:

On Windows, the command line character limit affected the data export
function for self-contained files, as a full list of tables was passed to
the "mysqldump" utility but the character limit meant some tables were not
exported.

Thank you for the bug report.