Commit dfe13a1c authored by marko's avatar marko

branches/zip: Allow a build with UNIV_PAGE_SIZE set to 4096.

TRX_RSEG_N_SLOTS: Make the definition dependent of UNIV_PAGE_SIZE.

FSP_EXTENT_SIZE: Define as 1 megabyte, as assumed by the code elsewhere.

fseg_create_general(): Add a debug assertion against page overflow.
parent f19db3bb
...@@ -2172,6 +2172,8 @@ fseg_create_general( ...@@ -2172,6 +2172,8 @@ fseg_create_general(
ulint i; ulint i;
ut_ad(mtr); ut_ad(mtr);
ut_ad(byte_offset + FSEG_HEADER_SIZE
<= UNIV_PAGE_SIZE - FIL_PAGE_DATA_END);
latch = fil_space_get_latch(space, &zip_size); latch = fil_space_get_latch(space, &zip_size);
......
...@@ -24,8 +24,8 @@ fseg_alloc_free_page): */ ...@@ -24,8 +24,8 @@ fseg_alloc_free_page): */
#define FSP_DOWN ((byte)112) /* alphabetically downwards */ #define FSP_DOWN ((byte)112) /* alphabetically downwards */
#define FSP_NO_DIR ((byte)113) /* no order */ #define FSP_NO_DIR ((byte)113) /* no order */
/* File space extent size in pages */ /* File space extent size (one megabyte) in pages */
#define FSP_EXTENT_SIZE 64 #define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT))
/* On a page of any file segment, data may be put starting from this offset: */ /* On a page of any file segment, data may be put starting from this offset: */
#define FSEG_PAGE_DATA FIL_PAGE_DATA #define FSEG_PAGE_DATA FIL_PAGE_DATA
......
...@@ -116,7 +116,7 @@ trx_rseg_create( ...@@ -116,7 +116,7 @@ trx_rseg_create(
/* Number of undo log slots in a rollback segment file copy */ /* Number of undo log slots in a rollback segment file copy */
#define TRX_RSEG_N_SLOTS 1024 #define TRX_RSEG_N_SLOTS (UNIV_PAGE_SIZE / 16)
/* Maximum number of transactions supported by a single rollback segment */ /* Maximum number of transactions supported by a single rollback segment */
#define TRX_RSEG_MAX_N_TRXS (TRX_RSEG_N_SLOTS / 2) #define TRX_RSEG_MAX_N_TRXS (TRX_RSEG_N_SLOTS / 2)
......
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