You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Giving multiple same arguments to mysqldump (via wp db export) only forwards the latest #289
To specify more than one table to ignore, use the directive multiple times, once for each table. Each table must be specified with both database and table names. See also --no-data.
I expect the arguments are parsed, and duplicate keys are just overridden by each other, which is not expected in this scenario.
changed the title [-]Multiple same arguments to mysqldump (via wp db export) only forwards the latest argument[/-][+]Giving multiple same arguments to mysqldump (via wp db export) only forwards the latest[/+]on Jul 7, 2025
The problem is that --ignore-table-data is only supported by newer MariaDB server.
Would it be an issue to add a command that is only supported by some servers? If not, I can submit a PR.
Given that there are multiple flags that are supposed to be passed in multiple times, would it not be better to addopt something like --ignore-table-data[]= and --ignore-table[]= (so generic []). In that case, split by a known delimiter (use , by default, hardcode anything that requires something else?).
Then we don't need an extra cli flag for each option.
Activity
[-]Multiple same arguments to mysqldump (via wp db export) only forwards the latest argument[/-][+]Giving multiple same arguments to mysqldump (via wp db export) only forwards the latest[/+]mrsdizzie commentedon Jul 23, 2025
Yes, this is a limitation of using an associative array for arguments. We already have the
--exclude_tablesoption for the same reason:db-command/src/DB_Command.php
Lines 701 to 710 in c821b92
So I suppose a similar
--exclude_tables_datawould be needed to support that using the current framework.astappiev commentedon Jul 25, 2025
The problem is that
--ignore-table-datais only supported by newer MariaDB server.Would it be an issue to add a command that is only supported by some servers? If not, I can submit a PR.
SleeplessByte commentedon Oct 12, 2026
Given that there are multiple flags that are supposed to be passed in multiple times, would it not be better to addopt something like
--ignore-table-data[]=and--ignore-table[]=(so generic[]). In that case, split by a known delimiter (use,by default, hardcode anything that requires something else?).Then we don't need an extra cli flag for each option.