1Z0-908 · Question #47
You are using mysqlcheck for server maintenance. Which two statements are true? (Choose two.)
The correct answer is D. The mysqlcheck command can be renamed mysqlrepair so that it repairs tables by default. E. The mysqlcheck --analyze --all-databases command performs a series of checks to spot eventual. D is correct because mysqlcheck is a multi-call binary that changes its default operation based on what it's named: renaming it to mysqlrepair defaults to --repair, mysqlanalyze to --analyze, and mysqloptimize to --optimize - this is documented MySQL behavior. E is correct…
Question
You are using mysqlcheck for server maintenance. Which two statements are true? (Choose two.)
Options
- AThe mysqlcheck --check --all-databases command takes table write locks while performing a
- BThe mysqlcheck --optimize --all-databases command reclaims free space from table files.
- CThe mysqlcheck --repair --all-databases command can repair an InnoDB corrupted table.
- DThe mysqlcheck command can be renamed mysqlrepair so that it repairs tables by default.
- EThe mysqlcheck --analyze --all-databases command performs a series of checks to spot eventual
How the community answered
(30 responses)- A3% (1)
- B17% (5)
- C10% (3)
- D70% (21)
Explanation
D is correct because mysqlcheck is a multi-call binary that changes its default operation based on what it's named: renaming it to mysqlrepair defaults to --repair, mysqlanalyze to --analyze, and mysqloptimize to --optimize - this is documented MySQL behavior. E is correct because mysqlcheck --analyze calls ANALYZE TABLE, which reads key distributions and stores statistics that the query optimizer uses, effectively performing analysis to identify eventual distribution inconsistencies.
A is wrong because --check acquires a read lock, not a write lock - write locks would block concurrent reads and would be far too disruptive for a check operation. B is wrong because mysqlcheck --optimize runs OPTIMIZE TABLE, which for InnoDB (the default engine) is remapped to ALTER TABLE ... FORCE and rebuilds the table in-place but does not reliably return free space to the OS from the .ibd file; true free-space reclamation applies to MyISAM, not InnoDB. C is wrong because REPAIR TABLE (called by --repair) is unsupported for InnoDB tables entirely - InnoDB uses crash recovery and backup restoration for corruption, not REPAIR TABLE.
Memory tip: Think "rename = reroute default" for D, and remember that InnoDB is immune to both --repair (C) and simple space reclamation (B) - InnoDB handles those concerns internally through its own crash recovery and tablespace management.
Topics
Community Discussion
No community discussion yet for this question.