Commit 9d399c9f authored by Jan Lindström's avatar Jan Lindström

MDEV-6075: Allow > 16K pages on InnoDB

This patch allows up to 64K pages for tables with DYNAMIC, COMPACT 
and REDUNDANT row types. Tables with COMPRESSED row type allows 
still only <= 16K page size. Note that single row size must be
still <= 16K and max key length is not affected.
parent 0eb84da1
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 32768`)
{
--skip Test requires InnoDB with 32k Page size.
}
\ No newline at end of file
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 65536`)
{
--skip Test requires InnoDB with 64k Page size.
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--default_storage_engine=InnoDB --innodb-buffer-pool-size=24M
This diff is collapsed.
--default_storage_engine=InnoDB --innodb-buffer-pool-size=24M
This diff is collapsed.
--default_storage_engine=InnoDB --innodb-buffer-pool-size=24M
This diff is collapsed.
--default_storage_engine=InnoDB --innodb-buffer-pool-size=24M
This diff is collapsed.
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# columns are stored off-page. # columns are stored off-page.
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_innodb_16k.inc
# DEBUG_SYNC must be compiled in. # DEBUG_SYNC must be compiled in.
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
####################################################################### #######################################################################
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
......
# Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND # Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`) if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`)
{ {
......
...@@ -829,13 +829,17 @@ fil_node_open_file( ...@@ -829,13 +829,17 @@ fil_node_open_file(
ut_error; ut_error;
} }
if (size_bytes >= 1024 * 1024) { if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
/* Truncate the size to whole megabytes. */ /* Truncate the size to whole extent size. */
size_bytes = ut_2pow_round(size_bytes, 1024 * 1024); size_bytes = ut_2pow_round(size_bytes,
FSP_EXTENT_SIZE *
UNIV_PAGE_SIZE);
} }
if (!fsp_flags_is_compressed(flags)) { if (!fsp_flags_is_compressed(flags)) {
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE); node->size = (ulint)
(size_bytes
/ fsp_flags_get_page_size(flags));
} else { } else {
node->size = (ulint) node->size = (ulint)
(size_bytes (size_bytes
...@@ -1987,6 +1991,9 @@ fil_check_first_page( ...@@ -1987,6 +1991,9 @@ fil_check_first_page(
flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page);
if (UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) { if (UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) {
fprintf(stderr, "InnoDB: Error: Current page size %lu != page size on page %lu\n",
UNIV_PAGE_SIZE, fsp_flags_get_page_size(flags));
return("innodb-page-size mismatch"); return("innodb-page-size mismatch");
} }
......
...@@ -2922,6 +2922,22 @@ innobase_init( ...@@ -2922,6 +2922,22 @@ innobase_init(
} }
} }
if (UNIV_PAGE_SIZE != UNIV_PAGE_SIZE_DEF) {
fprintf(stderr,
"InnoDB: Warning: innodb_page_size has been "
"changed from default value %d to %ldd. (###EXPERIMENTAL### "
"operation)\n", UNIV_PAGE_SIZE_DEF, UNIV_PAGE_SIZE);
/* There is hang on buffer pool when trying to get a new
page if buffer pool size is too small for large page sizes */
if (innobase_buffer_pool_size < (24 * 1024 * 1024)) {
fprintf(stderr, "InnoDB: Error: innobase_page_size %lu requires "
"innodb_buffer_pool_size > 24M current %lld",
UNIV_PAGE_SIZE, innobase_buffer_pool_size);
goto error;
}
}
os_innodb_umask = (ulint) my_umask; os_innodb_umask = (ulint) my_umask;
/* First calculate the default path for innodb_data_home_dir etc., /* First calculate the default path for innodb_data_home_dir etc.,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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