Commit 77e0d81d authored by vasil's avatar vasil

Convert innobase_buffer_pool_size and innobase_log_file_size types from

longlong to long long because MYSQL_SYSVAR_LONGLONG marco expects long long
type.

Also change
((ulint)innobase_buffer_pool_size) / 1024
to
(ulint)(innobase_buffer_pool_size / 1024)
and remove comment which is no longer true.

Provided that innobase_buffer_pool_size is always 64bits these statements
are equivalent if ulint is 64 bit (well it will screw up if
innobase_buffer_pool_size is negative). And if ulint is 32 bit the later
variant gives a little more chance that the value will fit.

Approved by:	Heikki
parent a43cc795
...@@ -130,7 +130,7 @@ static long innobase_mirrored_log_groups, innobase_log_files_in_group, ...@@ -130,7 +130,7 @@ static long innobase_mirrored_log_groups, innobase_log_files_in_group,
innobase_lock_wait_timeout, innobase_force_recovery, innobase_lock_wait_timeout, innobase_force_recovery,
innobase_open_files; innobase_open_files;
static longlong innobase_buffer_pool_size, innobase_log_file_size; static long long innobase_buffer_pool_size, innobase_log_file_size;
/* The default values for the following char* start-up parameters /* The default values for the following char* start-up parameters
are determined in innobase_init below: */ are determined in innobase_init below: */
...@@ -1584,10 +1584,7 @@ innobase_init( ...@@ -1584,10 +1584,7 @@ innobase_init(
changes the value so that it becomes the number of database pages. */ changes the value so that it becomes the number of database pages. */
if (innobase_buffer_pool_awe_mem_mb == 0) { if (innobase_buffer_pool_awe_mem_mb == 0) {
/* Careful here: we first convert the signed long int to ulint srv_pool_size = (ulint)(innobase_buffer_pool_size / 1024);
and only after that divide */
srv_pool_size = ((ulint) innobase_buffer_pool_size) / 1024;
} else { } else {
srv_use_awe = TRUE; srv_use_awe = TRUE;
srv_pool_size = (ulint) srv_pool_size = (ulint)
......
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