Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.11, 12.1(EOL)
-
None
-
Can result in unexpected behaviour
Description
Take rpl_semi_sync_master_wait_point for example.
It is a Sys_var_enum with CMD_LINE(REQUIRED_ARG) and defaults to AFTER_COMMIT.
This quick test:
--source include/not_embedded.inc
|
SELECT @@GLOBAL.rpl_semi_sync_master_wait_point; |
Results:
AFTER_COMMIT with an empty .opt file
argument parsing problem with --rpl-semi-sync-master-wait-point
AFTER_SYNC with --rpl-semi-sync-master-wait-point= (note the dangling = with no text)
- expected: invalid argument error
invalid argument error with --rpl-semi-sync-master-wait-point=asdf
AFTER_SYNC with --rpl-semi-sync-master-wait-point=0 as that is the 1st choice
Analysis: mysys/my_getopt.c § case GET_ENUM rejects extraneous text (e.g., =asdf) after the number (e.g., =0), but does not look for the existence of the number itself (=).