1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

set_var.cc, mysqld.cc, ha_innodb.h:

BUG#12701: SHOW VARIABLES does not show correct size of buffer pool.
ha_innodb.cc:
  BUG#12701: SHOW VARIABLES does not show correct size of buffer pool
This commit is contained in:
grog@mysql.com
2005-11-17 15:08:49 +01:00
parent f0e558c1b8
commit e91e55d643
4 changed files with 37 additions and 14 deletions

View File

@ -142,15 +142,16 @@ uint innobase_init_flags = 0;
ulong innobase_cache_size = 0;
ulong innobase_large_page_size = 0;
/* The default values for the following, type long, start-up parameters
are declared in mysqld.cc: */
/* The default values for the following, type long or longlong, start-up
parameters are declared in mysqld.cc: */
long innobase_mirrored_log_groups, innobase_log_files_in_group,
innobase_log_file_size, innobase_log_buffer_size,
innobase_buffer_pool_awe_mem_mb,
innobase_buffer_pool_size, innobase_additional_mem_pool_size,
innobase_file_io_threads, innobase_lock_wait_timeout,
innobase_force_recovery, innobase_open_files;
innobase_log_buffer_size, innobase_buffer_pool_awe_mem_mb,
innobase_additional_mem_pool_size, innobase_file_io_threads,
innobase_lock_wait_timeout, innobase_force_recovery,
innobase_open_files;
longlong innobase_buffer_pool_size, innobase_log_file_size;
/* The default values for the following char* start-up parameters
are determined in innobase_init below: */
@ -1210,6 +1211,25 @@ innobase_init(void)
ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR);
/* Check that values don't overflow on 32-bit systems. */
if (sizeof(ulint) == 4) {
if (innobase_buffer_pool_size > UINT_MAX32) {
sql_print_error(
"innobase_buffer_pool_size can't be over 4GB"
" on 32-bit systems");
DBUG_RETURN(0);
}
if (innobase_log_file_size > UINT_MAX32) {
sql_print_error(
"innobase_log_file_size can't be over 4GB"
" on 32-bit systems");
DBUG_RETURN(0);
}
}
os_innodb_umask = (ulint)my_umask;
/* First calculate the default path for innodb_data_home_dir etc.,