Bug #94294 Workbench 8.0.14/8.0.15 cannot export from MySQL 5.7 database
Submitted: 12 Feb 2019 15:48 Modified: 29 Aug 2020 2:58
Reporter: John Coleman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:8.0.14, 8.0.15, 8.0.16 OS:MacOS
Assigned to: CPU Architecture:Any

[12 Feb 2019 15:48] John Coleman
Description:
Workbench 8.0.15 does not provide an option to disable column-statistics when exporting; any 5.7 database cannot be exported using a default install of Workbench 8.0.15. See also https://bugs.mysql.com/bug.php?id=91640, marked as closed/resolved in 8.0.13 but has regressed in 8.0.14 and 8.0.15.

How to repeat:
Export a mysql 5.x database using the default installation of Workbench 8.0.15. Results in error "Unknown table 'COLUMN_STATISTICS' in information_schema (1109)"

Suggested fix:
Reapply fix from 8.0.13 that added a setting to disable column-statistics.
[12 Feb 2019 17:03] MySQL Verification Team
Duplicate of https://bugs.mysql.com/bug.php?id=91640.
[12 Feb 2019 17:14] John Coleman
You have marked this as a duplicate but the previous bug was reintroduced after being closed. Am I missing something?
[12 Feb 2019 17:51] MySQL Verification Team
Re-opening.
[12 Feb 2019 19:07] MySQL Verification Team
5.7 database and table to be exported

Attachment: 94294_1.png (image/png, text), 62.24 KiB.

[12 Feb 2019 19:08] MySQL Verification Team
Database exported to 8.0.15

Attachment: 94294_2.png (image/png, text), 125.85 KiB.

[12 Feb 2019 19:11] MySQL Verification Team
Thank you for the bug report. I created a small database/table on 5.7.25 and then exported to 8.0.15 without problems. See screenshots.
[12 Feb 2019 19:12] John Coleman
The bug is in Workbench, not the command line version. I've updated the ticket to also note that this is on macOS.
[12 Feb 2019 19:14] John Coleman
Workbench displaying the error

Attachment: Screen Shot 2019-02-12 at 2.14.04 PM.png (image/png, text), 178.96 KiB.

[12 Feb 2019 19:24] MySQL Verification Team
The picture I attached here of command line is just to show you the tables, the 2nd picture shows the WorkBench summary of migration successful from 5.7.25 to 8.0.15. I tested on Wnidows will try on MAC OSX now.
[12 Feb 2019 19:29] John Coleman
This is not about the migration tool, it's about Data Export.
[12 Feb 2019 19:31] John Coleman
bug is with Data Export feature

Attachment: Screen Shot 2019-02-12 at 2.30.33 PM.png (image/png, text), 1001.71 KiB.

[12 Feb 2019 20:07] MySQL Verification Team
Thank you for the feedback. On MAC OSX I was able to repeat the data export issue reported with version 8.0.15 and I was to perform it successful with 8.0.13 using the advanced option which it isn't more available on 8.0.15.
[13 Feb 2019 15:48] Bill Karwin
Thanks for attention on this bug.

I noted in the previous fix in 8.0.13, the UI used an unexpected control. It required the user to enter "0" into a text field to disable the column-statistics feature. This is inconsistent with the other boolean-option UI controls on the same screen, which are implemented as checkboxes.

May I suggest that the column-statistics UI control should also be a checkbox? Choosing to enable or disable the column-statistics is essentially a boolean choice, like the other boolean choices on the same screen.

The checkbox should be unchecked by default, to match the behavior of mysqldump, which disables column-statistics by default, because histogram generation for large tables can take a long time.
[13 Feb 2019 16:40] Mike Lischke
Bill, thanks for the suggestion. Starting with 8.0.14 this setting is already a checkbox, but it is hidden for versions of mysqldump that don't use this setting.
[28 Feb 2019 22:31] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.16 release, and here's the changelog entry:

MySQL 5.7 tables exported to MySQL 8.0.14 or 8.0.15 produced the following
error: Unknown table 'COLUMN_STATISTICS' in information_schema.

Thank you for the bug report.
[4 May 2019 3:33] Brian Florence
Christine Cole - you can tell your developer that it is not fixed in 8.016.

This is silly - is a simple export routine not tested???
[15 May 2019 21:52] Casey Deveau
This is not fixed in 8.0.16 as mentioned.
The error still occurs, and there is no option in advanced export settings to disable column statistics.

Please re-open and please fix.

Actually testing the 'fix' generally helps as well.
[3 Jun 2019 15:49] Rafael Bracho
8.0.16 CONTINUES to have this problem.  As the original bug report states, ALL you have to do is put back the "fix" of 8.0.13.

The severity should be higher, people have MySQL 5.7 (as well as MariaDB).  This emphasis that statistics columns be the default is nonsense!  But, at least make it a choice, as it was in 8.0.13
[4 Jun 2019 18:42] Michal Karski
This should't be closed as it still affects 8.0.16 MacOS version. Please reopen, increase severity and finally fix this super annoying bug. Thanks!
[8 Jun 2019 1:05] Darren Blade
Alsoo affects version 8016 running on Windows 10
[17 Jun 2019 14:30] Robert Hegner
This should be re-opened for 8.0.16
[2 Sep 2019 9:53] Steve Childs
This is incredible that this has NOT be reopened. This is a critical issue for anyone who uses workbench to manage 5.7 or mariaDB systems.

It STILL has not been fixed in 8.0.17.
[6 Nov 2019 18:14] Uriel Bertoche
please re-open, still an issue in 8.0.18, option to disable column statistics is gone and there is no workaround it yet.
[8 Nov 2019 19:20] Michel Feinstein
This should be reopened, it's still present in 8.0.18
[8 Nov 2019 19:31] Rafael Bracho
Is ANYONE reading these comments?  The bug was introduced in v8.0, and EVENTUALLY (in 8.0.13) a silly workaround was released: instead of a checkbox to decline the statistics, one had to enter zero ('0') in the Advanced Options page.  That workaround was eliminated in 8.0.14 without a different fix. Many other features and fixes have been included but the ONLY version that works with MySQL 5.7 (or MariaDB) is 8.0.13.  We are now in 8.0.18 and still NO solution.  The situation is worse because this bug report was CLOSED.  The bug should be reopened AND the severity increased, else we will have to continue on 8.0.13 FOREVER.
[18 Nov 2019 13:59] Sigurd Alnæs
To me this seems ridiculous. So many true friends of MySQLWorkbench has to suffer for so long. It is a shame. Please fix this now.
[29 Nov 2019 14:30] Pierre Chemama
10 month later... 
Issue is still there, and obviously nobody is reading it or care enough to re-open it and fix it.

This is getting ridiculous at this point...
Is there even at least ONE developer on the MySQL project?
[29 Nov 2019 14:42] Steve Childs
I get the distinct impression that Oracle don't care about people unless you pay for the Commercial product.

Hence why we're all talking amongst ourselves and there's no developers to be seen.
[28 Dec 2019 1:35] Adrian Uribe
This feature is pretty important to me. I agree with the sentiment that the fix in 8.0.13 works and should probably be carried forward regardless of the checkbox vs no checkbox debate. It works and allows backwards compatibility with 5.7.
[9 Jan 2020 10:42] Bjorn Van de Weyngaert
The column statistics bug keeps on appearing in v8.0.18. Why did you remove the --column-statistics=0 option?
[9 Jan 2020 14:22] Rafael Bracho
I just posted in the Quality Assurance forum, asking how to escalate this issue. If the followers of this bug report want to, go there and add your two cents to see if the bug is reopened, and better yet, fixed.
[9 Jan 2020 14:33] Steve Childs
Here's a link to the thread Rafael started: https://forums.mysql.com/read.php?132,683519,683519#msg-683519
[19 Aug 2020 9:35] Morten M
Why was this closed?
It still has issue on version 8.0.20.
[20 Aug 2020 19:57] Kenneth Liccardo
Same story here, now using Workbench 8.0.21 on Win10 to access mariadb 10.3.23, still cannot perform admin data export without error (column statistics issue).  So, I did the following which seems to work:  locate wb_admin_export.py (C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\wb_admin_export.py on my system), locate line 
skip_column_statistics = True if get_mysqldump_version() > Version(8, 0, 2) and self.owner.ctrl_be.target_version < Version(8, 0, 0) else False

Add # after True (to comment-out the balance of the line), to effectively make it
skip_column_statistics = True

If you have Workbench open, close it then reopen it, and try to export and see if it works.
[29 Aug 2020 0:46] Venkatesh Duggirala
Document says "https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_column-statistics" it is disabled by default. 

But 

mysqldump.cc gives "1" as the default. This is the problem. 

client/mysqldump.cc ====
246c246
<      &column_statistics, &column_statistics, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
---
>      &column_statistics, &column_statistics, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
[29 Aug 2020 0:47] Venkatesh Duggirala
Document says "https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_column-statistics" it is disabled by default. 

But 

mysqldump.cc gives "1" as the default. This is the problem. 

client/mysqldump.cc ====
246c246
<      &column_statistics, &column_statistics, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
---
>      &column_statistics, &column_statistics, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
[29 Aug 2020 0:54] Venkatesh Duggirala
I see lot of comments above and a thread that is talking about "community" is not listening.

IMO => it is very difficult for the community to look at a bug that is already closed. Unless the original owner of the bug reopens it buy bumping the severity
or open another bug with the details. They will look at it in a week's time.
This is my observation.

I open a bug : (for mysqldump tool, but should work for workbench too)
 
https://bugs.mysql.com/bug.php?id=100686

Hopefully they will see and fix it.

Regards
Venkatesh.
[29 Aug 2020 2:55] John Coleman
Unfortunately this cannot be reopened (I tried) but thanks for your comment, Venkatesh. It prompted me to try.
[29 Aug 2020 2:58] John Coleman
Bumping severity to re-open; this has not actually been fixed.
[28 May 2021 14:51] Uriel Bertoche
Still an issue in 8.0.25.

This has been an issue since forever, it's been notified many times, although devs say it was fixed, it was not.

The option to disable statistics is not present in the advanced options tab in 8.0.25.
[28 May 2021 14:51] Uriel Bertoche
Still an issue in 8.0.25.

This has been an issue since forever, it's been notified many times, although devs say it was fixed, it was not.

The option to disable statistics is not present in the advanced options tab in 8.0.25.