Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.1(EOL), 11.2, 10.10(EOL), 11.0(EOL), 11.3(EOL)
Description
The following invocation will hang, because a recovered incomplete transaction exists but was not rolled back due to the fault injection innodb_log_abort_1:
./mtr --mysqld=--innodb-fast-shutdown=0 innodb.log_file_size
|
The following patch fixes the hang on 10.5:
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
|
index 9b8ce4b2fa8..ca2e4ec1a86 100644
|
--- a/storage/innobase/srv/srv0start.cc
|
+++ b/storage/innobase/srv/srv0start.cc
|
@@ -1995,7 +1995,7 @@ void innodb_preshutdown()
|
better prevent any further changes from being buffered. */
|
innodb_change_buffering= 0;
|
|
- if (trx_sys.is_initialised())
|
+ if (srv_was_started)
|
while (trx_sys.any_active_transactions())
|
os_thread_sleep(1000);
|
} |
The flag srv_was_started implies trx_sys.is_initialised(), because innodb_init() would only assign that flag after a successful srv_start(), which includes initializing the transaction subsystem.
MariaDB Server 10.4 is not affected by this.