WIUNIX ACADEMY
MySQL online DDL: reproduce and diagnose metadata-lock waits
Page 3 of 3. Review the earlier steps and prerequisites before continuing.
YOUR SYSTEM. YOUR STEPS.
Where are you working?
Choose your OS and version. The prerequisites, commands and troubleshooting follow your environment.
USE YOUR OWN VALUES
Configure this tutorial
Set the example values for your environment; related explanations and copy panels update together. Never enter passwords, private keys or tokens. Values stay in this tab and are not sent to the server or share links. Check actual DNS, certificates and network policy before running commands.
Different IP addresses, domains or ports? Open the settings below, change the values and select “Apply to tutorial”, then copy the updated commands.
Set values for my environment3 editable values
Turn the lock evidence into a migration plan
For a real change review exact server/engine version, table operation support, long transactions, metadata wait budget, table/temporary-space requirements, redo and online-alter-log pressure, replication lag and the application’s response to a queued DDL. INPLACE can rebuild data and consume substantial resources; INSTANT is operation/version dependent, not a blanket substitute. A bounded wait limits waiting, not the execution duration after a lock is acquired.
LET’S BUILD
Reverse only the fixture index and close sessions
With A ended and no fixture transaction open, remove only the synthetic secondary index using explicit online clauses. Record the final definition and exit all three sessions. The fresh schema/table remain for owner-reviewed exact cleanup; no broad DROP or connection killing is provided. Preserve timestamps, connection IDs, lock states, error and final definition as evidence.
Staging mysql session B
ALTER TABLE mdl_probe DROP INDEX idx_category,ALGORITHM=INPLACE,LOCK=NONE;
SHOW CREATE TABLE mdl_probe;
quitOnly the fixture index is reversed; no unrelated schema or connection is touched.
GO TO THE SOURCE
Official references
Each environment states how it was reviewed. A documentation review does not claim a hands-on test of every version.
- MySQL8.4: online DDL concurrency
- MySQL8.4: metadata locks
- MySQL8.4: online DDL operations
- MySQL8.4: schema lock waits view
- MySQL8.4: online DDL failures
- MySQL: supported platforms
- Compatibility and installation path: MySQL / APT
- Compatibility and installation path: MySQL / Yum
- Red Hat: diagnosing SELinux access denials
- Red Hat: firewalld inspection and management
KEEP LEARNING