summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-01 15:51:25 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-01 15:51:25 +0200
commit5091a4ba755250ed8e35f4f5a39a118d476cd8f1 (patch)
tree370ba468d78204544b56e9d967d8d09e1317a1ed /sql/mysqld.cc
parent84eaf0911f311acba797c265ef7508ab6c108b35 (diff)
parent0880284bf715b4916cc735e19b76d1062c2bfdcf (diff)
downloadmariadb-git-5091a4ba755250ed8e35f4f5a39a118d476cd8f1.tar.gz
Merge tag 'mariadb-10.0.19' into 10.1
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc87
1 files changed, 51 insertions, 36 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 63d34218172..5a97e908b2f 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2008, 2014, SkySQL Ab.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2008, 2015, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -520,6 +520,7 @@ ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
ulong max_connections, max_connect_errors;
ulong extra_max_connections;
+ulong max_digest_length= 0;
ulong slave_retried_transactions;
ulonglong slave_skipped_errors;
ulong feature_files_opened_with_delayed_keys;
@@ -2332,7 +2333,8 @@ static struct passwd *check_user(const char *user)
{
if (!opt_bootstrap && !opt_help)
{
- sql_print_error("Fatal error: Please read \"Security\" section of the manual to find out how to run mysqld as root!\n");
+ sql_print_error("Fatal error: Please consult the Knowledge Base "
+ "to find out how to run mysqld as root!\n");
unireg_abort(1);
}
return NULL;
@@ -4188,6 +4190,10 @@ static int init_common_variables()
return 1;
set_server_version();
+ if (!opt_help)
+ sql_print_information("%s (mysqld %s) starting as process %lu ...",
+ my_progname, server_version, (ulong) getpid());
+
#ifndef EMBEDDED_LIBRARY
if (opt_abort && !opt_verbose)
unireg_abort(0);
@@ -4459,11 +4465,12 @@ static int init_common_variables()
if (lower_case_table_names_used)
{
if (global_system_variables.log_warnings)
- sql_print_warning("\
-You have forced lower_case_table_names to 0 through a command-line \
-option, even though your file system '%s' is case insensitive. This means \
-that you can corrupt a MyISAM table by accessing it with different cases. \
-You should consider changing lower_case_table_names to 1 or 2",
+ sql_print_warning("You have forced lower_case_table_names to 0 through "
+ "a command-line option, even though your file system "
+ "'%s' is case insensitive. This means that you can "
+ "corrupt a MyISAM table by accessing it with "
+ "different cases. You should consider changing "
+ "lower_case_table_names to 1 or 2",
mysql_real_data_home);
}
else
@@ -4680,7 +4687,6 @@ static void init_ssl()
opt_ssl_cipher, &error,
opt_ssl_crl, opt_ssl_crlpath);
DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
- ERR_remove_state(0);
if (!ssl_acceptor_fd)
{
sql_print_warning("Failed to setup SSL");
@@ -4688,6 +4694,14 @@ static void init_ssl()
opt_use_ssl = 0;
have_ssl= SHOW_OPTION_DISABLED;
}
+ if (global_system_variables.log_warnings > 0)
+ {
+ ulong err;
+ while ((err= ERR_get_error()))
+ sql_print_warning("SSL error: %s", ERR_error_string(err, NULL));
+ }
+ else
+ ERR_remove_state(0);
}
else
{
@@ -4915,15 +4929,16 @@ static int init_server_components()
{
if (opt_bin_log)
{
- sql_print_error("using --replicate-same-server-id in conjunction with \
---log-slave-updates is impossible, it would lead to infinite loops in this \
-server.");
+ sql_print_error("using --replicate-same-server-id in conjunction with "
+ "--log-slave-updates is impossible, it would lead to "
+ "infinite loops in this server.");
unireg_abort(1);
}
else
- sql_print_warning("using --replicate-same-server-id in conjunction with \
---log-slave-updates would lead to infinite loops in this server. However this \
-will be ignored as the --log-bin option is not defined.");
+ sql_print_warning("using --replicate-same-server-id in conjunction with "
+ "--log-slave-updates would lead to infinite loops in "
+ "this server. However this will be ignored as the "
+ "--log-bin option is not defined.");
}
#endif
@@ -4936,8 +4951,8 @@ will be ignored as the --log-bin option is not defined.");
if (opt_bin_logname[0] &&
opt_bin_logname[strlen(opt_bin_logname) - 1] == FN_LIBCHAR)
{
- sql_print_error("Path '%s' is a directory name, please specify \
-a file name for --log-bin option", opt_bin_logname);
+ sql_print_error("Path '%s' is a directory name, please specify "
+ "a file name for --log-bin option", opt_bin_logname);
unireg_abort(1);
}
@@ -4947,8 +4962,9 @@ a file name for --log-bin option", opt_bin_logname);
opt_binlog_index_name[strlen(opt_binlog_index_name) - 1]
== FN_LIBCHAR)
{
- sql_print_error("Path '%s' is a directory name, please specify \
-a file name for --log-bin-index option", opt_binlog_index_name);
+ sql_print_error("Path '%s' is a directory name, please specify "
+ "a file name for --log-bin-index option",
+ opt_binlog_index_name);
unireg_abort(1);
}
@@ -5229,6 +5245,7 @@ a file name for --log-bin-index option", opt_binlog_index_name);
init_global_client_stats();
if (!opt_bootstrap)
servers_init(0);
+ init_status_vars();
DBUG_RETURN(0);
}
@@ -5478,6 +5495,8 @@ int mysqld_main(int argc, char **argv)
pfs_param.m_hints.m_table_open_cache= tc_size;
pfs_param.m_hints.m_max_connections= max_connections;
pfs_param.m_hints.m_open_files_limit= open_files_limit;
+ /* the performance schema digest size is the same as the SQL layer */
+ pfs_param.m_max_digest_length= max_digest_length;
PSI_hook= initialize_performance_schema(&pfs_param);
if (PSI_hook == NULL)
{
@@ -5695,7 +5714,6 @@ int mysqld_main(int argc, char **argv)
#endif
}
- init_status_vars();
if (opt_bootstrap) /* If running with bootstrap, do not start replication. */
opt_skip_slave_start= 1;
@@ -8433,16 +8451,15 @@ static void usage(void)
else
{
#ifdef __WIN__
- puts("NT and Win32 specific options:\n\
- --install Install the default service (NT).\n\
- --install-manual Install the default service started manually (NT).\n\
- --install service_name Install an optional service (NT).\n\
- --install-manual service_name Install an optional service started manually (NT).\n\
- --remove Remove the default service from the service list (NT).\n\
- --remove service_name Remove the service_name from the service list (NT).\n\
- --enable-named-pipe Only to be used for the default server (NT).\n\
- --standalone Dummy option to start as a standalone server (NT).\
-");
+ puts("NT and Win32 specific options:\n"
+ " --install Install the default service (NT).\n"
+ " --install-manual Install the default service started manually (NT).\n"
+ " --install service_name Install an optional service (NT).\n"
+ " --install-manual service_name Install an optional service started manually (NT).\n"
+ " --remove Remove the default service from the service list (NT).\n"
+ " --remove service_name Remove the service_name from the service list (NT).\n"
+ " --enable-named-pipe Only to be used for the default server (NT).\n"
+ " --standalone Dummy option to start as a standalone server (NT).");
puts("");
#endif
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
@@ -8454,14 +8471,12 @@ static void usage(void)
if (! plugins_are_initialized)
{
- puts("\n\
-Plugins have parameters that are not reflected in this list\n\
-because execution stopped before plugins were initialized.");
+ puts("\nPlugins have parameters that are not reflected in this list"
+ "\nbecause execution stopped before plugins were initialized.");
}
- puts("\n\
-To see what values a running MySQL server is using, type\n\
-'mysqladmin variables' instead of 'mysqld --verbose --help'.");
+ puts("\nTo see what values a running MySQL server is using, type"
+ "\n'mysqladmin variables' instead of 'mysqld --verbose --help'.");
}
DBUG_VOID_RETURN;
}