Below is the list of changes that have just been committed into a local
5.0 repository of grog. When grog does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1969 05/11/17 15:08:49 grog@stripped +4 -0
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
sql/set_var.cc
1.144 05/11/17 15:06:38 grog@stripped +2 -2
BUG#12701: SHOW VARIABLES does not show correct size of buffer pool.
sql/mysqld.cc
1.517 05/11/17 15:06:23 grog@stripped +5 -3
BUG#12701: SHOW VARIABLES does not show correct size of buffer pool.
sql/ha_innodb.h
1.107 05/11/17 15:06:04 grog@stripped +3 -2
BUG#12701: SHOW VARIABLES does not show correct size of buffer pool.
sql/ha_innodb.cc
1.277 05/11/17 15:02:37 grog@stripped +27 -7
BUG#12701: SHOW VARIABLES does not show correct size of buffer pool
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: grog
# Host: dl145k.mysql.com
# Root: /users/grog/5.0
--- 1.516/sql/mysqld.cc 2005-11-10 20:22:09 +01:00
+++ 1.517/sql/mysqld.cc 2005-11-17 15:06:23 +01:00
@@ -5418,7 +5418,8 @@
{"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
(gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0,
- GET_LONG, REQUIRED_ARG, 8*1024*1024L, 1024*1024L, ~0L, 0, 1024*1024L, 0},
+ GET_LL, REQUIRED_ARG, 8*1024*1024L, 1024*1024L, LONGLONG_MAX, 0,
+ 1024*1024L, 0},
{"innodb_concurrency_tickets", OPT_INNODB_CONCURRENCY_TICKETS,
"Number of times a thread is allowed to enter InnoDB within the same \
SQL query after it has once got the ticket",
@@ -5442,9 +5443,10 @@
(gptr*) &innobase_log_buffer_size, (gptr*) &innobase_log_buffer_size, 0,
GET_LONG, REQUIRED_ARG, 1024*1024L, 256*1024L, ~0L, 0, 1024, 0},
{"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE,
- "Size of each log file in a log group in megabytes.",
+ "Size of each log file in a log group.",
(gptr*) &innobase_log_file_size, (gptr*) &innobase_log_file_size, 0,
- GET_LONG, REQUIRED_ARG, 5*1024*1024L, 1*1024*1024L, ~0L, 0, 1024*1024L, 0},
+ GET_LL, REQUIRED_ARG, 5*1024*1024L, 1*1024*1024L, LONGLONG_MAX, 0,
+ 1024*1024L, 0},
{"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP,
"Number of log files in the log group. InnoDB writes to the files in a circular
fashion. Value 3 is recommended here.",
(gptr*) &innobase_log_files_in_group, (gptr*) &innobase_log_files_in_group,
--- 1.276/sql/ha_innodb.cc 2005-11-14 13:18:41 +01:00
+++ 1.277/sql/ha_innodb.cc 2005-11-17 15:02:37 +01:00
@@ -142,15 +142,16 @@
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: */
@@ -1209,6 +1210,25 @@
goto error;
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;
--- 1.106/sql/ha_innodb.h 2005-10-04 06:08:55 +02:00
+++ 1.107/sql/ha_innodb.h 2005-11-17 15:06:04 +01:00
@@ -206,8 +206,9 @@
extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
extern long innobase_lock_scan_time;
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
-extern long innobase_log_file_size, innobase_log_buffer_size;
-extern long innobase_buffer_pool_size, innobase_additional_mem_pool_size;
+extern longlong innobase_buffer_pool_size, innobase_log_file_size;
+extern long innobase_log_buffer_size;
+extern long innobase_additional_mem_pool_size;
extern long innobase_buffer_pool_awe_mem_mb;
extern long innobase_file_io_threads, innobase_lock_wait_timeout;
extern long innobase_force_recovery;
--- 1.143/sql/set_var.cc 2005-11-10 17:50:43 +01:00
+++ 1.144/sql/set_var.cc 2005-11-17 15:06:38 +01:00
@@ -818,7 +818,7 @@
{"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size,
SHOW_LONG },
{sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment,
SHOW_SYS},
{"innodb_buffer_pool_awe_mem_mb", (char*) &innobase_buffer_pool_awe_mem_mb,
SHOW_LONG },
- {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONG },
+ {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG },
{"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL},
{sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency,
SHOW_SYS},
{sys_innodb_concurrency_tickets.name, (char*) &sys_innodb_concurrency_tickets,
SHOW_SYS},
@@ -836,7 +836,7 @@
{"innodb_log_arch_dir", (char*) &innobase_log_arch_dir, SHOW_CHAR_PTR},
{"innodb_log_archive", (char*) &innobase_log_archive, SHOW_MY_BOOL},
{"innodb_log_buffer_size", (char*) &innobase_log_buffer_size, SHOW_LONG },
- {"innodb_log_file_size", (char*) &innobase_log_file_size, SHOW_LONG},
+ {"innodb_log_file_size", (char*) &innobase_log_file_size, SHOW_LONGLONG},
{"innodb_log_files_in_group", (char*) &innobase_log_files_in_group, SHOW_LONG},
{"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR},
{sys_innodb_max_dirty_pages_pct.name, (char*) &sys_innodb_max_dirty_pages_pct,
SHOW_SYS},
| Thread |
|---|
| • bk commit into 5.0 tree (grog:1.1969) BUG#12701 | Greg Lehey | 17 Nov |