Skip to content

Commit

Permalink
MDEV-30158 InnoDB fails to start ther server 10.11 when innodb_undo_t…
Browse files Browse the repository at this point in the history
…ablespaces mismatch

- InnoDB should throw the warning when user specified undo tablespaces
doesn't match with the number of opened undo tablespaces and should
reflect the value in innodb_undo_tablespaces variable
  • Loading branch information
Thirunarayanan committed Dec 5, 2022
1 parent b81b194 commit 922f7ba
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions storage/innobase/srv/srv0start.cc
Original file line number Diff line number Diff line change
Expand Up @@ -570,19 +570,13 @@ static dberr_t srv_undo_tablespaces_reinitialize()
tolerate that discrepancy but not the inverse. Because there could
be unused undo tablespaces for future use. */

if (srv_undo_tablespaces > srv_undo_tablespaces_open)
if (srv_undo_tablespaces != srv_undo_tablespaces_open)
{
ib::error() << "Expected to open innodb_undo_tablespaces="
<< srv_undo_tablespaces
<< " but was able to find only "
<< srv_undo_tablespaces_open;

return DB_ERROR;
}
else if (srv_undo_tablespaces < srv_undo_tablespaces_open)
sql_print_warning("InnoDB: Cannot change innodb_undo_tablespaces=%u "
"because previous shutdown was not with "
"innodb_fast_shutdown=0", srv_undo_tablespaces);
srv_undo_tablespaces= srv_undo_tablespaces_open;
}
else if (srv_undo_tablespaces_open > 0)
sql_print_information("InnoDB: Opened " UINT32PF " undo tablespaces",
srv_undo_tablespaces_open);
Expand Down

0 comments on commit 922f7ba

Please sign in to comment.