-
Notifications
You must be signed in to change notification settings - Fork 3
mxqdump: Dump all jobs from group by default without filtering #74
Comments
|
To me it reads like, that only if |
As discussed: Maybe we shouldn't change the current behavior and surprise users who got used to it, but provide a way to list all jobs ( e.g. |
In Lines 744 to 773 in 66aeeb6
suggesting, that |
So is the issue fixed now? Does the usage show how to dump all jobs of a group and does it work? I don't understand the last comment. Is that part of the "dump all jobs from group" Problem or a new issue? Are there other "hidden" options which need to be documented in the usage string? Is just the code ugly?
Agreed. |
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 take a different code path. So, only document `-a`/`--all`. 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
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
Currently,
mxqdump -j -g ID
will only list running jobs, which is not very clear from the usage information. The default should be changed, that if no--status/-s
switch is passed, that all jobs are shown.The text was updated successfully, but these errors were encountered: