You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
--------------------------------------------------------------------
- "DROP SCHEMA/DATABASE" could leave behind a database directory
if a crash occurred just before directory deletion step.
- "CREATE SCHEMA/DATABASE" could fail due to a pre-existing
directory if a crash happened after directory creation.
Solution:
--------------------------------------------------------------------
- Introduce a new type of log entry "DELETE_SCHEMA_DIRECTORY_LOG"
in the DDL_Log (an existing WAL mechanism in InnoDB) to perform
directory deletion step.
- DROP SCHEMA:
--------------
- Updates Data Dictionary and logs "DELETE_SCHEMA_DIRECTORY_LOG" in
the same transaction. The actual directory deletion is done as
part of post-ddl hook, after the transaction is committed.
- In case of a crash:
1. Before commit: The recovery rollbacks the incomplete
transaction.
2. After commit: The recovery replays the committed log and
deletes the schema directory.
- Complies with the behavior defined in WL#7524 i.e. If files with
"known" extensions are present in the schema directory, the
"DROP DATABASE" query will succeed (with a warning) but will
not delete the directory.
- Switches to traditional/non-atomic way when executed as part of
an upgrade.
- CREATE SCHEMA:
----------------
- Logs and commits "DELETE_SCHEMA_DIRECTORY_LOG" in n innodb
transaction which is committed separately, independently of the
main transaction. Within the main transaction, creates the file
system directory, updates the Data Dictionary and deletes
the previously added DDL_Log entry.
- If a crash occurs after the schema directory is created, recovery
rolls back the incomplete transaction and deletes the directory.
- Switches to traditional/non-atomic way when executed as part of
an upgrade.
Results:
--------------------------------------------------------------------
- Improves atomicity, consistency and robustness of CREATE/DROP
SCHEMA operations.
- Simplifies handling of leftovers during crashes.
Change-Id: If981dc7438640f9975bf3d1f70148ac2f833e221
ERROR HY000: Can't get stat of './@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003f@003fa' (OS error)
0 commit comments