In src/utilities/util_main.c within the switch statement, the current implementation sets both the config variables (e.g. readonly_config, salvage_config) and the corresponding boolean flags (e.g. readonly, salvage)
However, these config variables are redundant because the boolean flags alone are enough to determine the behaviour.
I.e. Instead of:
... case 'r': readonly_config = READONLY; readonly = true; break; case 'S': /* salvage */ salvage_config = SALVAGE; salvage = true; break; ...
Do:
... case 'r': readonly = true; break; case 'S': /* salvage */ salvage = true; break; ...
Ensure that any code replying on the configuration variables is updated to use the boolean flags instead. For example:
if (readonly_config != NULL)
len += strlen(readonly_config);
Should be refactored to:
if (readonly)
conn_config = READONLY;
- related to
-
WT-14392 wt utility overwrites passed config when given -m option
-
- Closed
-