Skip to content

mxqdump: List switch -a/--all for jobs-options in usage #109

Merged
merged 1 commit into from Sep 1, 2021

Conversation

pmenzel
Copy link
Contributor

@pmenzel pmenzel commented Sep 1, 2021

No description provided.

@donald
Copy link
Contributor

donald commented Sep 1, 2021

I tend to prefer the -a option under group-id to be shown as an alias together with the other --status= job status aliases. This would highlight the availability of --status=all and the fact, that it means the same as -a . I don't insist, put please consider (which you told me, you already did) again. The internals of the implementation (it is not a filter and implemented differently with a shorter SQL syntax) should not be a big argument, because that isn't visible to the user.

With `mxqdump`, currently, reading the usage, it’s not clear how to dump
all jobs in a group without any filtering on the status, which defaults
to *running*. The code actually check if `arg_all` is set, meaning the
switch `-a`/`--all` is passed. So, document that in the usage.

Instead of `-a`/`--all` also `--status=all` or `--status=any` would be
possible, but also takes a different code path. As that is invisible to
the user, mention it as an alias.

Passing `--debug` shows the code paths taken:

    $ mxqdump --debug --jobs -g 472581 -a
    mxqdump mxqdump.c:737:main(): MySQL: Connection to database established.
    mxqdump mxqdump.c:747:main(): DEBUG: DO: print all jobs in group_id=472581
    […]
    $ mxqdump --debug --jobs -g 472581 --status=all # or any
    mxqdump mxqdump.c:737:main(): MySQL: Connection to database established.
    mxqdump mxqdump.c:754:main(): DEBUG: DO: print jobs in group_id=472581 with status='invalid(18446744073709551614)'
    […]

Fixes: #74
@pmenzel pmenzel force-pushed the list-all-switch-in-mxqdump-job-options branch from 24260b3 to b1a1282 Compare September 1, 2021 14:26
@pmenzel
Copy link
Contributor Author

pmenzel commented Sep 1, 2021

Done.

@donald donald merged commit 16a3711 into master Sep 1, 2021
@donald donald deleted the list-all-switch-in-mxqdump-job-options branch October 28, 2022 14:21
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants