Invalid --max-load and --critical-load crash pt-online-schema-change

Bug #996915 reported by Will Gunty
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Daniel Nichter
2.0
Fix Released
Medium
Daniel Nichter
2.1
Fix Released
Medium
Daniel Nichter

Bug Description

If --max-load and/or --critical-load are not in the correct format, the tool "crashes" without a good error message:

wgunty@dba1001:~$ pt-online-schema-change --max-load 1000 - --host HOST --user=USER --password='PASS!' --alter "ALTER HERE" D=db,t=table --execute

Use of uninitialized value in multiplication (*) at /usr/bin/pt-online-schema-change line 3735.

Expected behavior should error and state that an invalid format has been entered.

Related branches

tags: added: crash option-parsing
Changed in percona-toolkit:
status: New → Triaged
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

See also bug 972026.

summary: - pt-online-schema-change Crash when --max-load and --critical-load are
- not valid
+ Invalid --max-load and --critical-load crash pt-online-schema-change
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Now with early error checking and nice error messages:

--max-load 100
Errors in command-line arguments:
  * Invalid --max-load: 100 is not a variable name

--max-load foo=bar
Errors in command-line arguments:
  * Invalid --max-load: The value for foo must be a number

--max-load foo=100
Error checking --max-load or --critial-load: Variable foo does not exist or its value is undefined. Check that the variables specified for --max-load and --critical-load are spelled correctly and exist in SHOW GLOBAL STATUS. Current values for these options are:
  --max-load foo=100
  --critial-load Threads_running=50

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Fixed in pt-table-checksum too (although it only has --max-load).

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-530

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.