summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-24 15:19:00 +0200
committerunknown <monty@donna.mysql.com>2000-12-24 15:19:00 +0200
commit78cf07c8ea126fc03706988de23893ca4680ac77 (patch)
tree899e99579647137316d4fbc999750fb989b1cf2e /sql/mysqld.cc
parentb23a560f84a33ee28d630f6baf7b4f7848fa3db8 (diff)
downloadmariadb-git-78cf07c8ea126fc03706988de23893ca4680ac77.tar.gz
New benchmark test
Fixed bug in REPLACE with BDB tables Prepare for write lock on read for BDB Inform the handler when we want to use IGNORE / REPLACE New manual pages Docs/manual.texi: Updates for BDB tables and new changes client/mysql.cc: Cleanup configure.in: Added sys/ioctl.h heap/hp_rkey.c: Fixed bug when reading next on not unique key include/my_base.h: Added new extra options man/mysql.1: Added example mysys/my_write.c: Safety fix scripts/mysqlaccess.sh: Removed debug output scripts/safe_mysqld.sh: Added --open-files-limit sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/bench-init.pl.sh: Updated to new benchmark sql-bench/server-cfg.sh: Fixes for HEAP tables sql-bench/test-ATIS.sh: Fix for heap tables sql-bench/test-insert.sh: Added some ORDER BY benchmarks to test more things sql/ha_berkeley.cc: Fix a bug in REPLACE sql/ha_berkeley.h: Fix to handle lock_on_read sql/mysql_priv.h: Prepare for internal subtransactions in BDB sql/mysqld.cc: Added -O open_files_limit=# sql/sql_insert.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_load.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_parse.cc: Cleanup sql/sql_show.cc: Cleanup sql/sql_table.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_update.cc: Inform the handler when we want to use IGNORE / REPLACE support-files/binary-configure.sh: Better message
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ad5fc926afd..754ebc12766 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -203,7 +203,8 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
thread_stack_min,net_wait_timeout,what_to_log= ~ (1L << (uint) COM_TIME),
query_buff_size, lower_case_table_names, mysqld_net_retry_count,
net_interactive_timeout, slow_launch_time = 2L,
- net_read_timeout,net_write_timeout,slave_open_temp_tables=0;
+ net_read_timeout,net_write_timeout,slave_open_temp_tables=0,
+ open_files_limit=0;
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
volatile ulong cached_thread_count=0;
@@ -1461,8 +1462,10 @@ int main(int argc, char **argv)
{
uint wanted_files=10+(uint) max(max_connections*5,
max_connections+table_cache_size*2);
+ set_if_bigger(wanted_files, open_files_limit);
+ // Note that some system returns 0 if we succeed here:
uint files=set_maximum_open_files(wanted_files);
- if (files && files < wanted_files) // Some systems return 0
+ if (files && files < wanted_files && ! open_files_limit)
{
max_connections= (ulong) min((files-10),max_connections);
table_cache_size= (ulong) max((files-10-max_connections)/2,64);
@@ -2225,7 +2228,7 @@ enum options {
OPT_BDB_HOME, OPT_BDB_LOG,
OPT_BDB_TMP, OPT_BDB_NOSYNC,
OPT_BDB_LOCK, OPT_BDB_SKIP,
- OPT_BDB_RECOVER, OPT_BDB_SHARED,
+ OPT_BDB_NO_RECOVER, OPT_BDB_SHARED,
OPT_MASTER_HOST,
OPT_MASTER_USER, OPT_MASTER_PASSWORD,
OPT_MASTER_PORT, OPT_MASTER_INFO_FILE,
@@ -2252,7 +2255,7 @@ static struct option long_options[] = {
{"bdb-home", required_argument, 0, (int) OPT_BDB_HOME},
{"bdb-lock-detect", required_argument, 0, (int) OPT_BDB_LOCK},
{"bdb-logdir", required_argument, 0, (int) OPT_BDB_LOG},
- {"bdb-recover", no_argument, 0, (int) OPT_BDB_RECOVER},
+ {"bdb-no-recover", no_argument, 0, (int) OPT_BDB_NO_RECOVER},
{"bdb-no-sync", no_argument, 0, (int) OPT_BDB_NOSYNC},
{"bdb-shared-data", no_argument, 0, (int) OPT_BDB_SHARED},
{"bdb-tmpdir", required_argument, 0, (int) OPT_BDB_TMP},
@@ -2463,6 +2466,8 @@ CHANGEABLE_VAR changeable_vars[] = {
NET_READ_TIMEOUT, 1, 65535, 0, 1 },
{ "net_write_timeout", (long*) &net_write_timeout,
NET_WRITE_TIMEOUT, 1, 65535, 0, 1 },
+ { "open_files_limit", (long*) &open_files_limit,
+ 0, 0, 65535, 0, 1},
{ "query_buffer_size", (long*) &query_buff_size,
0, MALLOC_OVERHEAD, (long) ~0, MALLOC_OVERHEAD, IO_SIZE },
{ "record_buffer", (long*) &my_default_record_cache_size,
@@ -2543,6 +2548,7 @@ struct show_var_st init_vars[]= {
{"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG},
{"net_retry_count", (char*) &mysqld_net_retry_count, SHOW_LONG},
{"net_write_timeout", (char*) &net_write_timeout, SHOW_LONG},
+ {"open_files_limit", (char*) &open_files_limit, SHOW_LONG},
{"pid_file", (char*) pidfile_name, SHOW_CHAR},
{"port", (char*) &mysql_port, SHOW_INT},
{"protocol_version", (char*) &protocol_version, SHOW_INT},
@@ -2744,7 +2750,7 @@ static void usage(void)
(DEFAULT, OLDEST, RANDOM or YOUNGEST, # sec)\n\
--bdb-logdir=directory Berkeley DB log file directory\n\
--bdb-no-sync Don't synchronously flush logs\n\
- --bdb-recover Start Berkeley DB in recover mode\n\
+ --bdb-no-recover Don't try to recover Berkeley DB tables on start\n\
--bdb-shared-data Start Berkeley DB in multi-process mode\n\
--bdb-tmpdir=directory Berkeley DB tempfile name\n\
--skip-bdb Don't use berkeley db (will save memory)\n\
@@ -3233,10 +3239,10 @@ static void get_options(int argc,char **argv)
berkeley_home=optarg;
break;
case OPT_BDB_NOSYNC:
- berkeley_init_flags|=DB_TXN_NOSYNC;
+ berkeley_env_flags|=DB_TXN_NOSYNC;
break;
- case OPT_BDB_RECOVER:
- berkeley_init_flags|=DB_RECOVER;
+ case OPT_BDB_NO_RECOVER:
+ berkeley_init_flags&= ~(DB_RECOVER);
break;
case OPT_BDB_TMP:
berkeley_tmpdir=optarg;