Skip to content

Commit 99eb595

Browse files
author
Shaohua Wang
committed
Bug#20972309 ASSERT FAILURE WHILE INITIALIZING THE DATABASE
WITH INNODB_PAGE_SIZE=64K Analysis: We require block1 or block2 in doublewrite buffer should be in the same data file, but in the test, block2 crosses two data files. Solution: Enforce minimum size of first data file to be TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 3, so that the doublewrite buffer blocks are in the first data file. Reviewed-by: Jimmy Yang <[email protected]> RB: 8916
1 parent 72b7570 commit 99eb595

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

storage/innobase/fsp/fsp0sysspace.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Refactored 2013-7-26 by Kevin Lewis
3232
#include "os0file.h"
3333
#include "row0mysql.h"
3434
#include "srv0start.h"
35+
#include "trx0sys.h"
3536
#include "ut0new.h"
3637

3738
/** The server header file is included to access opt_initialize global variable.
@@ -821,6 +822,17 @@ SysTablespace::check_file_spec(
821822
}
822823
}
823824

825+
/* We assume doublewirte blocks in the first data file. */
826+
if (err == DB_SUCCESS && *create_new_db
827+
&& begin->m_size < TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 3) {
828+
ib::error() << "The " << name() << " data file "
829+
<< "'" << begin->name() << "' must be at least "
830+
<< TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 3 * UNIV_PAGE_SIZE
831+
/ (1024 * 1024) << " MB";
832+
833+
err = DB_ERROR;
834+
}
835+
824836
return(err);
825837
}
826838

0 commit comments

Comments
 (0)