Commit be85c2dc authored by Marko Mäkelä's avatar Marko Mäkelä

Mariabackup --prepare: Do not access transactions or data dictionary

innobase_start_or_create_for_mysql(): Only start the data dictionary
and transaction subsystems in normal server startup and during
mariabackup --export.
parent 33ecf834
......@@ -2246,17 +2246,32 @@ innobase_start_or_create_for_mysql()
recv_sys->dblwr.pages.clear();
if (err == DB_SUCCESS) {
/* Initialize the change buffer. */
err = dict_boot();
}
if (err != DB_SUCCESS) {
return(srv_init_abort(err));
}
/* This must precede recv_apply_hashed_log_recs(true). */
trx_sys_init_at_db_start();
switch (srv_operation) {
case SRV_OPERATION_NORMAL:
case SRV_OPERATION_RESTORE_EXPORT:
/* Initialize the change buffer. */
err = dict_boot();
if (err != DB_SUCCESS) {
return(srv_init_abort(err));
}
/* This must precede
recv_apply_hashed_log_recs(true). */
trx_sys_init_at_db_start();
break;
case SRV_OPERATION_RESTORE_DELTA:
case SRV_OPERATION_BACKUP:
ut_ad(!"wrong mariabackup mode");
/* fall through */
case SRV_OPERATION_RESTORE:
/* mariabackup --prepare only deals with
the redo log and the data files, not with
transactions or the data dictionary. */
break;
}
if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {
/* Apply the hashed log records to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment