mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel BitKeeper/etc/ignore: auto-union client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged include/Makefile.am: Auto merged include/m_string.h: Auto merged include/my_base.h: Auto merged include/my_dbug.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged libmysql/CMakeLists.txt: Auto merged libmysql/Makefile.shared: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysys/mf_keycache.c: Auto merged sql/gen_lex_hash.cc: Auto merged sql/ha_partition.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_func.cc: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged sql/unireg.cc: Auto merged storage/myisam/ft_boolean_search.c: Auto merged storage/myisam/ft_nlq_search.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_check.c: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged client/mysqlslap.c: Manual merge with main 5.1 tree.
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "mysql_priv.h"
|
||||
#include <m_ctype.h>
|
||||
#include <my_dir.h>
|
||||
#include <my_bit.h>
|
||||
#include "slave.h"
|
||||
#include "rpl_mi.h"
|
||||
#include "sql_repl.h"
|
||||
@ -455,7 +456,7 @@ uint volatile thread_count, thread_running;
|
||||
ulonglong thd_startup_options;
|
||||
ulong back_log, connect_timeout, concurrency, server_id;
|
||||
ulong table_cache_size, table_def_size;
|
||||
ulong thread_stack, what_to_log;
|
||||
ulong what_to_log;
|
||||
ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
|
||||
ulong open_files_limit, max_binlog_size, max_relay_log_size;
|
||||
ulong slave_net_timeout, slave_trans_retries;
|
||||
@ -2214,7 +2215,7 @@ or misconfigured. This error can also be caused by malfunctioning hardware.\n",
|
||||
We will try our best to scrape up some info that will hopefully help diagnose\n\
|
||||
the problem, but since we have already crashed, something is definitely wrong\n\
|
||||
and this may fail.\n\n");
|
||||
fprintf(stderr, "key_buffer_size=%lu\n",
|
||||
fprintf(stderr, "key_buffer_size=%lu\n",
|
||||
(ulong) dflt_key_cache->key_cache_mem_size);
|
||||
fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size);
|
||||
fprintf(stderr, "max_used_connections=%lu\n", max_used_connections);
|
||||
@ -2246,7 +2247,7 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n",
|
||||
{
|
||||
fprintf(stderr,"thd: 0x%lx\n",(long) thd);
|
||||
print_stacktrace(thd ? (uchar*) thd->thread_stack : (uchar*) 0,
|
||||
thread_stack);
|
||||
my_thread_stack_size);
|
||||
}
|
||||
if (thd)
|
||||
{
|
||||
@ -2405,9 +2406,9 @@ static void start_signal_handler(void)
|
||||
Peculiar things with ia64 platforms - it seems we only have half the
|
||||
stack size in reality, so we have to double it here
|
||||
*/
|
||||
pthread_attr_setstacksize(&thr_attr,thread_stack*2);
|
||||
pthread_attr_setstacksize(&thr_attr,my_thread_stack_size*2);
|
||||
#else
|
||||
pthread_attr_setstacksize(&thr_attr,thread_stack);
|
||||
pthread_attr_setstacksize(&thr_attr,my_thread_stack_size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -3604,6 +3605,13 @@ server.");
|
||||
using_update_log=1;
|
||||
}
|
||||
|
||||
/* call ha_init_key_cache() on all key caches to init them */
|
||||
process_key_caches(&ha_init_key_cache);
|
||||
|
||||
/* Allow storage engine to give real error messages */
|
||||
if (ha_init_errors())
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (plugin_init(&defaults_argc, defaults_argv,
|
||||
(opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) |
|
||||
(opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
|
||||
@ -3770,9 +3778,6 @@ server.");
|
||||
if (opt_myisam_log)
|
||||
(void) mi_log(1);
|
||||
|
||||
/* call ha_init_key_cache() on all key caches to init them */
|
||||
process_key_caches(&ha_init_key_cache);
|
||||
|
||||
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && !defined(EMBEDDED_LIBRARY)
|
||||
if (locked_in_memory && !getuid())
|
||||
{
|
||||
@ -3962,9 +3967,9 @@ int main(int argc, char **argv)
|
||||
Peculiar things with ia64 platforms - it seems we only have half the
|
||||
stack size in reality, so we have to double it here
|
||||
*/
|
||||
pthread_attr_setstacksize(&connection_attrib,thread_stack*2);
|
||||
pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size*2);
|
||||
#else
|
||||
pthread_attr_setstacksize(&connection_attrib,thread_stack);
|
||||
pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size);
|
||||
#endif
|
||||
#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
{
|
||||
@ -3975,15 +3980,15 @@ int main(int argc, char **argv)
|
||||
stack_size/= 2;
|
||||
#endif
|
||||
/* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */
|
||||
if (stack_size && stack_size < thread_stack)
|
||||
if (stack_size && stack_size < my_thread_stack_size)
|
||||
{
|
||||
if (global_system_variables.log_warnings)
|
||||
sql_print_warning("Asked for %lu thread stack, but got %ld",
|
||||
thread_stack, (long) stack_size);
|
||||
my_thread_stack_size, (long) stack_size);
|
||||
#if defined(__ia64__) || defined(__ia64)
|
||||
thread_stack= stack_size*2;
|
||||
my_thread_stack_size= stack_size*2;
|
||||
#else
|
||||
thread_stack= stack_size;
|
||||
my_thread_stack_size= stack_size;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -5228,7 +5233,7 @@ enum options_mysqld
|
||||
OPT_MAX_ERROR_COUNT, OPT_MULTI_RANGE_COUNT, OPT_MYISAM_DATA_POINTER_SIZE,
|
||||
OPT_MYISAM_BLOCK_SIZE, OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
|
||||
OPT_MYISAM_MAX_SORT_FILE_SIZE, OPT_MYISAM_SORT_BUFFER_SIZE,
|
||||
OPT_MYISAM_USE_MMAP,
|
||||
OPT_MYISAM_USE_MMAP, OPT_MYISAM_REPAIR_THREADS,
|
||||
OPT_MYISAM_STATS_METHOD,
|
||||
OPT_NET_BUFFER_LENGTH, OPT_NET_RETRY_COUNT,
|
||||
OPT_NET_READ_TIMEOUT, OPT_NET_WRITE_TIMEOUT,
|
||||
@ -5243,7 +5248,7 @@ enum options_mysqld
|
||||
OPT_SORT_BUFFER, OPT_TABLE_OPEN_CACHE, OPT_TABLE_DEF_CACHE,
|
||||
OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE,
|
||||
OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK,
|
||||
OPT_WAIT_TIMEOUT, OPT_MYISAM_REPAIR_THREADS,
|
||||
OPT_WAIT_TIMEOUT,
|
||||
OPT_ERROR_LOG_FILE,
|
||||
OPT_DEFAULT_WEEK_FORMAT,
|
||||
OPT_RANGE_ALLOC_BLOCK_SIZE, OPT_ALLOW_SUSPICIOUS_UDFS,
|
||||
@ -6414,10 +6419,10 @@ The minimum value for this variable is 4096.",
|
||||
(uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
|
||||
"The size of the buffer that is allocated when preloading indexes",
|
||||
(uchar**) &global_system_variables.preload_buff_size,
|
||||
(uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
|
||||
"The size of the buffer that is allocated when preloading indexes",
|
||||
(uchar**) &global_system_variables.preload_buff_size,
|
||||
(uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
|
||||
{"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE,
|
||||
"Allocation block size for query parsing and execution",
|
||||
(uchar**) &global_system_variables.query_alloc_block_size,
|
||||
@ -6561,8 +6566,8 @@ The minimum value for this variable is 4096.",
|
||||
REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
|
||||
#endif
|
||||
{"thread_stack", OPT_THREAD_STACK,
|
||||
"The stack size for each thread.", (uchar**) &thread_stack,
|
||||
(uchar**) &thread_stack, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
|
||||
"The stack size for each thread.", (uchar**) &my_thread_stack_size,
|
||||
(uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
|
||||
1024L*128L, ULONG_MAX, 0, 1024, 0},
|
||||
{ "time_format", OPT_TIME_FORMAT,
|
||||
"The TIME format (for future).",
|
||||
@ -6576,12 +6581,12 @@ The minimum value for this variable is 4096.",
|
||||
(uchar**) &max_system_variables.tmp_table_size, 0, GET_ULL,
|
||||
REQUIRED_ARG, 16*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0},
|
||||
{"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE,
|
||||
"Allocation block size for various transaction-related structures",
|
||||
"Allocation block size for transactions to be stored in binary log",
|
||||
(uchar**) &global_system_variables.trans_alloc_block_size,
|
||||
(uchar**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
|
||||
REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
|
||||
{"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
|
||||
"Persistent buffer for various transaction-related structures",
|
||||
"Persistent buffer for transactions to be stored in binary log",
|
||||
(uchar**) &global_system_variables.trans_prealloc_size,
|
||||
(uchar**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
|
||||
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
|
||||
@ -7013,6 +7018,7 @@ SHOW_VAR status_vars[]= {
|
||||
{"Open_tables", (char*) &show_open_tables, SHOW_FUNC},
|
||||
{"Opened_files", (char*) &my_file_total_opened, SHOW_LONG_NOFLUSH},
|
||||
{"Opened_tables", (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS},
|
||||
{"Opened_table_definitions", (char*) offsetof(STATUS_VAR, opened_shares), SHOW_LONG_STATUS},
|
||||
{"Prepared_stmt_count", (char*) &show_prepared_stmt_count, SHOW_FUNC},
|
||||
#ifdef HAVE_QUERY_CACHE
|
||||
{"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH},
|
||||
@ -7242,9 +7248,10 @@ static void mysql_init_variables(void)
|
||||
thread_cache.empty();
|
||||
key_caches.empty();
|
||||
if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str,
|
||||
default_key_cache_base.length)))
|
||||
default_key_cache_base.length)))
|
||||
exit(1);
|
||||
multi_keycache_init(); /* set key_cache_hash.default_value = dflt_key_cache */
|
||||
/* set key_cache_hash.default_value = dflt_key_cache */
|
||||
multi_keycache_init();
|
||||
|
||||
/* Set directory paths */
|
||||
strmake(language, LANGUAGE, sizeof(language)-1);
|
||||
@ -7259,7 +7266,7 @@ static void mysql_init_variables(void)
|
||||
master_password= master_host= 0;
|
||||
master_info_file= (char*) "master.info",
|
||||
relay_log_info_file= (char*) "relay-log.info";
|
||||
master_ssl_key= master_ssl_cert= master_ssl_ca=
|
||||
master_ssl_key= master_ssl_cert= master_ssl_ca=
|
||||
master_ssl_capath= master_ssl_cipher= 0;
|
||||
report_user= report_password = report_host= 0; /* TO BE DELETED */
|
||||
opt_relay_logname= opt_relaylog_index_name= 0;
|
||||
@ -7920,7 +7927,7 @@ mysql_getopt_value(const char *keyname, uint key_length,
|
||||
}
|
||||
}
|
||||
}
|
||||
return option->value;
|
||||
return option->value;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user