Commit 372f2d34 authored by calvin's avatar calvin

branches/zip: fix Mantis issue #138 InnoDB fails if

innodb_buffer_pool_size >= 4096M on x64 Windows

All three srv_buf_pool related variables are defined as ulong, which is
32-bit on 64-bit Windows. They are changed to 64-bit ulint. Also
system_info.dwPageSize appears to be 32-bit only. Casting to 64-bit
is required.

Approved by:	Marko (on IM)
parent 4c97a044
......@@ -93,9 +93,9 @@ extern ulong srv_flush_log_at_trx_commit;
/* The sort order table of the MySQL latin1_swedish_ci character set
collation */
extern const byte* srv_latin1_ordering;
extern ulong srv_buf_pool_size; /* requested size in bytes */
extern ulong srv_buf_pool_old_size; /* previously requested size */
extern ulong srv_buf_pool_curr_size; /* current size in bytes */
extern ulint srv_buf_pool_size; /* requested size in bytes */
extern ulint srv_buf_pool_old_size; /* previously requested size */
extern ulint srv_buf_pool_curr_size; /* current size in bytes */
extern ulint srv_mem_pool_size;
extern ulint srv_lock_table_size;
......
......@@ -129,8 +129,10 @@ skip:
/* Align block size to system page size */
ut_ad(ut_is_2pow(system_info.dwPageSize));
/* system_info.dwPageSize is only 32-bit. Casting to ulint is required
on 64-bit Windows. */
size = *n = ut_2pow_round(*n + (system_info.dwPageSize - 1),
system_info.dwPageSize);
(ulint) system_info.dwPageSize);
ptr = VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE,
PAGE_READWRITE);
if (!ptr) {
......
......@@ -137,11 +137,11 @@ collation */
UNIV_INTERN const byte* srv_latin1_ordering;
/* requested size in kilobytes */
UNIV_INTERN ulong srv_buf_pool_size = ULINT_MAX;
UNIV_INTERN ulint srv_buf_pool_size = ULINT_MAX;
/* previously requested size */
UNIV_INTERN ulong srv_buf_pool_old_size;
UNIV_INTERN ulint srv_buf_pool_old_size;
/* current size in kilobytes */
UNIV_INTERN ulong srv_buf_pool_curr_size = 0;
UNIV_INTERN ulint srv_buf_pool_curr_size = 0;
/* size in bytes */
UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX;
UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX;
......
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