Skip to content

Commit

Permalink
Remove TRX_SYS_OLD_N_RSEGS
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Apr 26, 2017
1 parent 472b5f0 commit 23ea436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 0 additions & 4 deletions storage/innobase/include/trx0sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,6 @@ byte, therefore 128; each slot is currently 8 bytes in size. If you want
to raise the level to 256 then you will need to fix some assertions that
impose the 7 bit restriction. e.g., mach_write_to_3() */
#define TRX_SYS_N_RSEGS 128
/* Originally, InnoDB defined TRX_SYS_N_RSEGS as 256 but created only one
rollback segment. It initialized some arrays with this number of entries.
We must remember this limit in order to keep file compatibility. */
#define TRX_SYS_OLD_N_RSEGS 256

/** Maximum length of MySQL binlog file name, in bytes. */
#define TRX_SYS_MYSQL_LOG_NAME_LEN 512
Expand Down
10 changes: 4 additions & 6 deletions storage/innobase/trx/trx0sys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ trx_sysf_create(
page_t* page;
ulint page_no;
byte* ptr;
ulint len;

ut_ad(mtr);

Expand Down Expand Up @@ -481,13 +480,12 @@ trx_sysf_create(
mach_write_to_8(sys_header + TRX_SYS_TRX_ID_STORE, 1);

/* Reset the rollback segment slots. Old versions of InnoDB
define TRX_SYS_N_RSEGS as 256 (TRX_SYS_OLD_N_RSEGS) and expect
(before MySQL 5.5) define TRX_SYS_N_RSEGS as 256 and expect
that the whole array is initialized. */
ptr = TRX_SYS_RSEGS + sys_header;
len = ut_max(TRX_SYS_OLD_N_RSEGS, TRX_SYS_N_RSEGS)
* TRX_SYS_RSEG_SLOT_SIZE;
memset(ptr, 0xff, len);
ptr += len;
compile_time_assert(256 >= TRX_SYS_N_RSEGS);
memset(ptr, 0xff, 256 * TRX_SYS_RSEG_SLOT_SIZE);
ptr += 256 * TRX_SYS_RSEG_SLOT_SIZE;
ut_a(ptr <= page + (UNIV_PAGE_SIZE - FIL_PAGE_DATA_END));

/* Initialize all of the page. This part used to be uninitialized. */
Expand Down

0 comments on commit 23ea436

Please sign in to comment.