Bug #71393 Import does not recognize project folder
Submitted: 15 Jan 2014 21:09 Modified: 19 Sep 2015 0:44
Reporter: Ryan Prather Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:6.0.8, 6.3.4 OS:Any
Assigned to: CPU Architecture:Any
Tags: import, project foler

[15 Jan 2014 21:09] Ryan Prather
Description:
After performing an export with just the "replace" and "no-create-info" options selected, an import will fail to recognize the project folder the data is exported to as a project folder and will not allow import.

Running the .sql files manually works just fine.

I'm running on Win 7, but this may impact other versions of Workbench.

How to repeat:
Perform an export of any tables with just the "replace" and "no-create-info" options selected.  Switch over to data import, select the project folder the data was exported to and you should receive a "There were no dump files in the selected folder" message.

Suggested fix:
Unknown.
[15 Jan 2014 22:07] Ryan Prather
I tried to import a self-contained file and it saw the project folder in the that same directory.  It had the error message next to each table "{table} does not contain schema/table information".

I selected the "no-create-info" option because I am creating the DB structure in a PHP script prior to importing the data.
[16 Jan 2014 18:11] Ryan Prather
Apparently the import functionality in Workbench REQUIRES "comments" and "create tables" flags for it to recognize the project folder.  If these are required, then there should by some type of notice if the user attempts to uncheck them.  I could find nothing in the documentation that said they were required.

Also, I changed the resulting create table statement to a "CREATE TABLE IF NOT EXISTS {table}" and the import shows the table name as "IF NOT EXISTS {table}".  This is pretty crazy behavior.
[20 Jan 2014 20:15] MySQL Verification Team
Thank you for the bug report. I couldn't repeat the issue: What I did:

1- Exported the table data with replace and no-create-info to a self-contained file.

2- Deleted all data from the table.

3- Import the data from self-contained file created in 1.

Please see the Manual regarding no-create-info:

http://dev.mysql.com/doc/refman/5.5/en/mysqldump-definition-data-dumps.html

"... the --no-create-info option tells mysqldump to suppress CREATE statements from the output, so that the dump file contains only table data. "

Thanks.
[21 Jan 2014 16:21] Ryan Prather
Thank you for the bug report. I couldn't repeat the issue: What I did:

1- Exported the table data with replace and no-create-info to a self-contained file.

2- Deleted all data from the table.

3- Import the data from self-contained file created in 1.

Please see the Manual regarding no-create-info:

http://dev.mysql.com/doc/refman/5.5/en/mysqldump-definition-data-dumps.html

"... the --no-create-info option tells mysqldump to suppress CREATE statements from the output, so that the dump file contains only table data. "

The problem is with the project folder option...not the self-contained file option.  My comment on 15 Jan 22:07 wasn't clear.  The self-contained file was able to be read and I didn't get any errors with it, but the error was that it seemed that Workbench was able to scan the subdirectory and see that it was a project directory.  It then scanned the files and reported back that they were not valid project files because they did not contain "table/schema information".

I was able to get the import to work successfully, but I had to leave "comments" checked and "no-create-info" unchecked.  Then I added in "IF NOT EXISTS" to each of the tables.

Try again using a project folder and see if you can duplicate the problem.
[10 Sep 2014 4:14] Omar Zina
Problem persists in version 6.1.7.

OS: Win 7 x64

Steps to reproduce:
1:export database with no-create-info checked to DUMP PROJECT FOLDER.
2:try importing it.
[29 Sep 2014 13:33] MySQL Verification Team
Please try version 6.2.3. Thanks.
[30 Oct 2014 1: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".
[1 Dec 2014 17:35] Henrique Tschannerl
Helo,

I'm using 6.2.4 and have the same problema.
[26 May 2015 9:48] Matteo Porru
Same with me, on Workbench 6.3.3.0 (64 bits).
Any workaround?
[26 May 2015 10:22] Miloslav Siroky
Same problem in 6.3.3
[13 Jun 2015 5:56] MySQL Verification Team
Thank you for the feedback.
Observed this with 6.3.4 on Win7.

Thanks,
Umesh
[19 Sep 2015 0:44] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.5 release, and here's the changelog entry:

After exporting a database with no-create-info checked, the import
operation would fail to import it.

Thank you for the bug report.
[26 Apr 2018 15:03] Royce Fessenden
I am having the same problem on MySQL workbench 6.3.10 build 1209264 CE 64 bit.  But from the comments and dates it looks like it was fixed on 6.3.5.  

I have googled and tried several things but can't get it to work.  The files were exported by  Server version 5.7.21 My server is 5.6.16.  The import message is "There were no dump files in the selected folder."  The import log shows the "%path%\filename.sql does not contain schema/table information."  I can manually load and run each script.  I added a USE 'mydatabase'; line to each script, that did not help.