[MDEV-16555] Tool mysqldump does not work, checks for histograms. Created: 2018-06-24  Updated: 2018-06-29  Resolved: 2018-06-29

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.3.7
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Remy Fox Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Windows



 Description   

1. Create a table schema 'test' and put something in it, e.g. a table called 'test' with one column.
2. The following command should dump this table schema: mysqldump -u root -ppassword -P 3310 test > "<path to dump location>"
3. Output:
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'test' AND TABLE_NAME = 'test';': Unknown table 'column_statistics' in information_schema (1109)

I did not experience this issue in MariaDB versions 10.1 or lower. It exists in neither MySQL 5.x versions nor in 8.x versions. However I came across this MySQL report, which might be related: https://bugs.mysql.com/bug.php?id=89825.

The workaround to this problem is to add the --column-statistics=0 parameter to the command but I figure that should be the default.



 Comments   
Comment by Elena Stepanova [ 2018-06-24 ]

You are apparently using mysqldump of MySQL 8.0, it's the only version that I could find which even has column-statistics option. Not surprisingly, it's not fully compatible with MariaDB 10.3, nothing we can do about that.

Please run mysqldump --version.

Comment by Remy Fox [ 2018-06-29 ]

Yes you are right, this is a mysql issue. Apparently it is the same bug as the one I linked to in the description. Dumping a mariaDB table schema triggers this error whereas dumping a mysql 8 table schema does not, hence the confusion.

Generated at Thu Feb 08 08:29:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.