Commit 81bd81fb authored by Marko Mäkelä's avatar Marko Mäkelä

Adjust InnoDB debug assertions for Oracle Bug#25551311 aka Bug#23517560

The MySQL 5.6.36 merge (commit 0af98182
in MariaDB Server 10.0.31, 10.1.24, 10.2.7) introduced a change from
Oracle:
Bug#25551311 BACKPORT BUG #23517560 REMOVE SPACE_ID RESTRICTION
FOR UNDO TABLESPACES

Some debug assertions in MariaDB 10.2 were still assuming that the
InnoDB undo tablespace IDs start from 1. With the above mentioned
change, the undo tablespace IDs must be contiguous and nonzero.
parent 36a97172
...@@ -436,7 +436,8 @@ xdes_get_descriptor_with_space_hdr( ...@@ -436,7 +436,8 @@ xdes_get_descriptor_with_space_hdr(
&& (init_space && (init_space
|| space->purpose == FIL_TYPE_TEMPORARY || space->purpose == FIL_TYPE_TEMPORARY
|| (srv_startup_is_before_trx_rollback_phase || (srv_startup_is_before_trx_rollback_phase
&& space->id <= srv_undo_tablespaces)))); && (space->id == TRX_SYS_SPACE
|| srv_is_undo_tablespace(space->id))))));
ut_ad(size == space->size_in_header); ut_ad(size == space->size_in_header);
if ((offset >= size) || (offset >= limit)) { if ((offset >= size) || (offset >= limit)) {
......
...@@ -203,9 +203,17 @@ struct trx_rseg_t { ...@@ -203,9 +203,17 @@ struct trx_rseg_t {
bool is_persistent() const bool is_persistent() const
{ {
ut_ad(space == SRV_TMP_SPACE_ID ut_ad(space == SRV_TMP_SPACE_ID
|| space <= TRX_SYS_MAX_UNDO_SPACES); || space == TRX_SYS_SPACE
|| (srv_undo_space_id_start > 0
&& space >= srv_undo_space_id_start
&& space <= srv_undo_space_id_start
+ TRX_SYS_MAX_UNDO_SPACES));
ut_ad(space == SRV_TMP_SPACE_ID ut_ad(space == SRV_TMP_SPACE_ID
|| space <= srv_undo_tablespaces_active || space == TRX_SYS_SPACE
|| (srv_undo_space_id_start > 0
&& space >= srv_undo_space_id_start
&& space <= srv_undo_space_id_start
+ srv_undo_tablespaces_active)
|| !srv_was_started); || !srv_was_started);
return(space != SRV_TMP_SPACE_ID); return(space != SRV_TMP_SPACE_ID);
} }
......
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