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

MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may...

MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may break innodb_open_files logic

If the function i_s_tablespaces_encryption_fill_table() was not able to
report all content to the SQL layer, it would fail to decrement
fil_system.freeze_space_list that it had incremented. This would
prevent the not-frequently-used logic from working, potentially causing
frequently used files to be closed and reopened whenever innodb_open_files
is exceeded.

This regression was caused by
commit 45ed9dd9 (part of MDEV-23855).
parent 10b2d572
......@@ -7049,6 +7049,7 @@ i_s_tablespaces_encryption_fill_table(
DBUG_RETURN(0);
}
int err = 0;
mutex_enter(&fil_system.mutex);
fil_system.freeze_space_list++;
......@@ -7058,19 +7059,19 @@ i_s_tablespaces_encryption_fill_table(
&& !space->is_stopping()) {
space->reacquire();
mutex_exit(&fil_system.mutex);
if (int err = i_s_dict_fill_tablespaces_encryption(
thd, space, tables->table)) {
space->release();
DBUG_RETURN(err);
}
err = i_s_dict_fill_tablespaces_encryption(
thd, space, tables->table);
mutex_enter(&fil_system.mutex);
space->release();
if (err) {
break;
}
}
}
fil_system.freeze_space_list--;
mutex_exit(&fil_system.mutex);
DBUG_RETURN(0);
DBUG_RETURN(err);
}
/*******************************************************************//**
Bind the dynamic table INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
......
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