[MDEV-29448] mysqldump missing option to match MySQL existing options Created: 2022-09-02  Updated: 2022-09-13

Status: Open
Project: MariaDB Server
Component/s: Scripts & Clients
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Guillaume Salicis Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Compatibility

Issue Links:
PartOf
is part of MDEV-28906 MySQL 8.0 desired compatibility Open

 Description   

Hello,

To keep mariaDb tools compatible with MySQL tools both should share the same interface (options in CLI in this case).

Step to reproduce
/ # apk add mysql-client

then run something like
mysqldump --no-create-info --skip-triggers --skip-lock-tables -udbuser -pdbpassword -h mysql-dev.localtest.me --column-statistics=0 dev_mywonderfulldatabase

Expected: dump is ran
Actual: error: `mysqldump: unknown variable 'column-statistics=0'`

Full example output:
```
$> docker run -it alpine:latest sh
/ # apk add mysql-client
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/7) Installing mariadb-common (10.6.9-r0)
(2/7) Installing libgcc (11.2.1_git20220219-r2)
(3/7) Installing ncurses-terminfo-base (6.3_p20220521-r0)
(4/7) Installing ncurses-libs (6.3_p20220521-r0)
(5/7) Installing libstdc++ (11.2.1_git20220219-r2)
(6/7) Installing mariadb-client (10.6.9-r0)
(7/7) Installing mysql-client (10.6.9-r0)
Executing busybox-1.35.0-r13.trigger
OK: 39 MiB in 21 packages
/ # mysqldump --version
mysqldump Ver 10.19 Distrib 10.6.9-MariaDB, for Linux (x86_64)
/ # mysqldump --no-create-info --skip-triggers --skip-lock-tables -udbuser -pdbpassword -h mysql-dev.localtest.me --column-statistics=0 dev_mywonderfulldatabase
mysqldump: unknown variable 'column-statistics=0'
```



 Comments   
Comment by Sergei Golubchik [ 2022-09-06 ]

note that you write portable scripts by using --loose prefix for all options that aren't supported by one of the tools. Like
--loose-column-statistics=0.

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