Allow one to decrease page-buffer-size down to 1M (from 128M) for maria_read_log

Don't allow too low value of pagecache_buffer_size for mysqld

storage/maria/ha_maria.cc:
  Don't allow too low value of pagecache_buffer_size (as it will stop mysqld from starting)
storage/maria/maria_read_log.c:
  Allow one to decrease page-buffer-size down to 1M (from 128M)
This commit is contained in:
Michael Widenius 2011-01-12 01:48:34 +02:00
parent a008186f1d
commit 713999a4fe
2 changed files with 3 additions and 2 deletions

View File

@ -191,7 +191,7 @@ static MYSQL_SYSVAR_ULONGLONG(pagecache_buffer_size, pagecache_buffer_size,
"The size of the buffer used for index blocks for Maria tables. " "The size of the buffer used for index blocks for Maria tables. "
"Increase this to get better index handling (for all reads and " "Increase this to get better index handling (for all reads and "
"multiple writes) to as much as you can afford.", 0, 0, "multiple writes) to as much as you can afford.", 0, 0,
KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, IO_SIZE); KEY_CACHE_SIZE, 8192*16L, ~(ulong) 0, IO_SIZE);
static MYSQL_SYSVAR_ULONG(pagecache_division_limit, pagecache_division_limit, static MYSQL_SYSVAR_ULONG(pagecache_division_limit, pagecache_division_limit,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,

View File

@ -199,7 +199,8 @@ static struct my_option my_long_options[] =
"Path to the directory where to store transactional log", "Path to the directory where to store transactional log",
(uchar **) &maria_data_root, (uchar **) &maria_data_root, 0, (uchar **) &maria_data_root, (uchar **) &maria_data_root, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "page-buffer-size", 'P', "", { "page-buffer-size", 'P',
"The size of the buffer used for index blocks for Maria tables",
&opt_page_buffer_size, &opt_page_buffer_size, 0, &opt_page_buffer_size, &opt_page_buffer_size, 0,
GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT, GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT,
1024L*1024L, (long) ~(ulong) 0, (long) MALLOC_OVERHEAD, 1024L*1024L, (long) ~(ulong) 0, (long) MALLOC_OVERHEAD,