MDEV-9121: innodb_force_recovery = 6 cannot recover ANY DATA when
change buffer not empty Fix: Allow not empty change buffer when innodb_force_recovery >= 5 and output only a warning to error log. Note: Before using force recovery you should always take backup of your database.
This commit is contained in:
parent
47e0717806
commit
071ae303bd
@ -458,12 +458,22 @@ dict_boot(void)
|
|||||||
if (err == DB_SUCCESS) {
|
if (err == DB_SUCCESS) {
|
||||||
if (srv_read_only_mode && !ibuf_is_empty()) {
|
if (srv_read_only_mode && !ibuf_is_empty()) {
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
|
||||||
"Change buffer must be empty when --innodb-read-only "
|
ib_logf(IB_LOG_LEVEL_ERROR,
|
||||||
"is set!");
|
"Change buffer must be empty when --innodb-read-only "
|
||||||
|
"is set! "
|
||||||
|
"You can try to recover the database with innodb_force_recovery=5");
|
||||||
|
|
||||||
err = DB_ERROR;
|
err = DB_ERROR;
|
||||||
} else {
|
} else {
|
||||||
|
ib_logf(IB_LOG_LEVEL_WARN,
|
||||||
|
"Change buffer not empty when --innodb-read-only "
|
||||||
|
"is set! but srv_force_recovery = %d, ignoring.",
|
||||||
|
srv_force_recovery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err == DB_SUCCESS) {
|
||||||
/* Load definitions of other indexes on system tables */
|
/* Load definitions of other indexes on system tables */
|
||||||
|
|
||||||
dict_load_sys_table(dict_sys->sys_tables);
|
dict_load_sys_table(dict_sys->sys_tables);
|
||||||
|
@ -464,12 +464,22 @@ dict_boot(void)
|
|||||||
if (err == DB_SUCCESS) {
|
if (err == DB_SUCCESS) {
|
||||||
if (srv_read_only_mode && !ibuf_is_empty()) {
|
if (srv_read_only_mode && !ibuf_is_empty()) {
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
|
||||||
"Change buffer must be empty when --innodb-read-only "
|
ib_logf(IB_LOG_LEVEL_ERROR,
|
||||||
"is set!");
|
"Change buffer must be empty when --innodb-read-only "
|
||||||
|
"is set!"
|
||||||
|
"You can try to recover the database with innodb_force_recovery=5");
|
||||||
|
|
||||||
err = DB_ERROR;
|
err = DB_ERROR;
|
||||||
} else {
|
} else {
|
||||||
|
ib_logf(IB_LOG_LEVEL_WARN,
|
||||||
|
"Change buffer not empty when --innodb-read-only "
|
||||||
|
"is set! but srv_force_recovery = %d, ignoring.",
|
||||||
|
srv_force_recovery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err == DB_SUCCESS) {
|
||||||
/* Load definitions of other indexes on system tables */
|
/* Load definitions of other indexes on system tables */
|
||||||
|
|
||||||
dict_load_sys_table(dict_sys->sys_tables);
|
dict_load_sys_table(dict_sys->sys_tables);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user