From 97057115962d9dfbe989c799cff089aec5cbcc60 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 9 Aug 2010 11:32:50 +0300 Subject: WL#1054: Pluggable authentication support Merged the implementation to a new base tree. --- sql/sys_vars.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 320e6d9253e..6c456825aa1 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1419,6 +1419,14 @@ static Sys_var_uint Sys_protocol_version( READ_ONLY GLOBAL_VAR(protocol_version), NO_CMD_LINE, VALID_RANGE(0, ~0), DEFAULT(PROTOCOL_VERSION), BLOCK_SIZE(1)); +static Sys_var_proxy_user Sys_proxy_user( + "proxy_user", "The proxy user account name used when logging in", + IN_SYSTEM_CHARSET); + +static Sys_var_external_user Sys_exterenal_user( + "external_user", "The external user account used when logging in", + IN_SYSTEM_CHARSET); + static Sys_var_ulong Sys_read_buff_size( "read_buffer_size", "Each thread that does a sequential scan allocates a buffer of " -- cgit v1.2.1 From 06e921818af65572b30b8521140e967a48dca62d Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 7 Oct 2010 16:38:23 +0100 Subject: BUG#54144: ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE is hard coded The error message for ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE was hard coded. Additionally, the same error was used in three separate error symptoms: 1. when heartbeat period exceeds the value of slave_net_timeout, 2. when it is smaller than 1 milisecond and 3. when it was not in range, ie, either negative or greater than the maximum allowed. We fix this by splitting into three distinct errors and by removing the message from the source code and moving it to the errmsg-utf8.txt file. --- sql/sys_vars.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 69a01259fc0..b8b73bc0387 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2943,11 +2943,8 @@ static bool fix_slave_net_timeout(sys_var *self, THD *thd, enum_var_type type) (active_mi? active_mi->heartbeat_period : 0.0))); if (active_mi && slave_net_timeout < active_mi->heartbeat_period) push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE, - "The current value for master_heartbeat_period" - " exceeds the new value of `slave_net_timeout' sec." - " A sensible value for the period should be" - " less than the timeout."); + ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX, + ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX)); mysql_mutex_unlock(&LOCK_active_mi); return false; } -- cgit v1.2.1 From 96daec35d1b639f5d0f87df295a932fb907c088f Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Fri, 8 Oct 2010 14:22:22 +0200 Subject: Bug #57338: Extreneous server variable thread_pool_size The server contained code for the server variable and option thread_pool_size, but this server variable where not used anywhere. The variable is probably remains from backporting too much from 6.0 (specifically, the thread pool implementation was not backported from 6.0, which this variable is associated with). This patch eliminates the variable from the server. --- sql/sys_vars.cc | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index b8b73bc0387..5c9df82ddac 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2014,15 +2014,6 @@ static Sys_var_ulong Sys_thread_cache_size( GLOBAL_VAR(thread_cache_size), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 16384), DEFAULT(0), BLOCK_SIZE(1)); -#if HAVE_POOL_OF_THREADS == 1 -static Sys_var_ulong Sys_thread_pool_size( - "thread_pool_size", - "How many threads we should create to handle query requests in " - "case of 'thread_handling=pool-of-threads'", - GLOBAL_VAR(thread_pool_size), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 16384), DEFAULT(20), BLOCK_SIZE(0)); -#endif - /** Can't change the 'next' tx_isolation if we are already in a transaction. -- cgit v1.2.1 From 3f5a9c7ea03e5c6a62f41bb90f6b1655c59d3d75 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Fri, 5 Nov 2010 17:42:37 +0000 Subject: BUG#57275 binlog_cache_size affects trx- and stmt-cache and gets twice the expected memory After the WL#2687, the binlog_cache_size and max_binlog_cache_size affect both the stmt-cache and the trx-cache. This means that the resource used is twice the amount expected/defined by the user. The binlog_cache_use is incremented when the stmt-cache or the trx-cache is used and binlog_cache_disk_use is incremented when the disk space from the stmt-cache or the trx-cache is used. This behavior does not allow to distinguish which cache may be harming performance due to the extra disk accesses and needs to have its in-memory cache increased. To fix the problem, we introduced two new options and status variables related to the stmt-cache: Options: . binlog_stmt_cache_size . max_binlog_stmt_cache_size Status Variables: . binlog_stmt_cache_use . binlog_stmt_cache_disk_use So there are . binlog_cache_size that defines the size of the transactional cache for updates to transactional engines for the binary log. . binlog_stmt_cache_size that defines the size of the statement cache for updates to non-transactional engines for the binary log. . max_binlog_cache_size that sets the total size of the transactional cache. . max_binlog_stmt_cache_size that sets the total size of the statement cache. . binlog_cache_use that identifies the number of transactions that used the temporary transactional binary log cache. . binlog_cache_disk_use that identifies the number of transactions that used the temporary transactional binary log cache but that exceeded the value of binlog_cache_size. . binlog_stmt_cache_use that identifies the number of statements that used the temporary non-transactional binary log cache. . binlog_stmt_cache_disk_use that identifies the number of statements that used the temporary non-transactional binary log cache but that exceeded the value of binlog_stmt_cache_size. include/my_sys.h: Updated message on disk_writes' usage. mysql-test/extra/binlog_tests/binlog_cache_stat.test: Updated the test case and added code to check the new status variables binlog_stmt_cache_use and binlog_stmt_cache_disk_use. mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test: Updated the test case to use the new system variables max_binlog_stmt_cache_size and binlog_stmt_cache_size. mysql-test/r/mysqld--help-notwin.result: Updated the result file. mysql-test/suite/binlog/r/binlog_mixed_cache_stat.result: Updated the result file. mysql-test/suite/binlog/r/binlog_row_cache_stat.result: Updated the result file. mysql-test/suite/binlog/r/binlog_stm_cache_stat.result: Updated the result file. mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result: Update the result file. mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result: Update the result file. mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result: Updated the result file. mysql-test/suite/sys_vars/inc/binlog_stmt_cache_size_basic.inc: Added a test case to check the binlog_stmt_cache_size. mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_32.result: Updated the result file. mysql-test/suite/sys_vars/r/binlog_stmt_cache_size_basic_64.result: Updated the result file. mysql-test/suite/sys_vars/r/max_binlog_stmt_cache_size_basic.result: Updated the result file. mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_32.test: Added a test case to check the binlog_stmt_cache_size. mysql-test/suite/sys_vars/t/binlog_stmt_cache_size_basic_64.test: Added a test case to check the binlog_stmt_cache_size. mysql-test/suite/sys_vars/t/max_binlog_cache_size_func-master.opt: Removed because there is no test case max_binlog_cache_size_func. mysql-test/suite/sys_vars/t/max_binlog_stmt_cache_size_basic.test: Added a test case to check the system variable max_binlog_stmt_cache_size. sql/log.cc: There two main changes in here: . Changed the set_write_error() as an error message is set according to the type of the cache. . Created the function set_binlog_cache_info where references to the appropriate status and system variables are set and the server can smoothly compute statistics and set the maximum size for each cache. sql/log.h: Changed the signature of the function in order to identify the error message to be printed out as there is a different error code for each type of cache. sql/mysqld.cc: Added new status variables binlog_stmt_cache_use and binlog_stmt_cache_disk_use. sql/mysqld.h: Added new system variables max_binlog_stmt_cache_size and binlog_stmt_cache_size. sql/share/errmsg-utf8.txt: Added new error message related to the statement cache. sql/sys_vars.cc: Added new system variables max_binlog_stmt_cache_size and binlog_stmt_cache_size. --- sql/sys_vars.cc | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 5c9df82ddac..ed2c44fb03f 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -236,14 +236,23 @@ static Sys_var_charptr Sys_basedir( IN_FS_CHARSET, DEFAULT(0)); static Sys_var_ulong Sys_binlog_cache_size( - "binlog_cache_size", "The size of the cache to " - "hold the SQL statements for the binary log during a " - "transaction. If you often use big, multi-statement " - "transactions you can increase this to get more performance", + "binlog_cache_size", "The size of the transactional cache for " + "updates to transactional engines for the binary log. " + "If you often use transactions containing many statements, " + "you can increase this to get more performance", GLOBAL_VAR(binlog_cache_size), CMD_LINE(REQUIRED_ARG), VALID_RANGE(IO_SIZE, ULONG_MAX), DEFAULT(32768), BLOCK_SIZE(IO_SIZE)); +static Sys_var_ulong Sys_binlog_stmt_cache_size( + "binlog_stmt_cache_size", "The size of the statement cache for " + "updates to non-transactional engines for the binary log. " + "If you often use statements updating a great number of rows, " + "you can increase this to get more performance", + GLOBAL_VAR(binlog_stmt_cache_size), + CMD_LINE(REQUIRED_ARG), + VALID_RANGE(IO_SIZE, ULONG_MAX), DEFAULT(32768), BLOCK_SIZE(IO_SIZE)); + static bool check_has_super(sys_var *self, THD *thd, set_var *var) { DBUG_ASSERT(self->scope() != sys_var::GLOBAL);// don't abuse check_has_super() @@ -1031,13 +1040,20 @@ static Sys_var_ulong Sys_max_allowed_packet( static Sys_var_ulonglong Sys_max_binlog_cache_size( "max_binlog_cache_size", - "Can be used to restrict the total size used to cache a " - "multi-transaction query", + "Sets the total size of the transactional cache", GLOBAL_VAR(max_binlog_cache_size), CMD_LINE(REQUIRED_ARG), VALID_RANGE(IO_SIZE, ULONGLONG_MAX), DEFAULT((ULONGLONG_MAX/IO_SIZE)*IO_SIZE), BLOCK_SIZE(IO_SIZE)); +static Sys_var_ulonglong Sys_max_binlog_stmt_cache_size( + "max_binlog_stmt_cache_size", + "Sets the total size of the statement cache", + GLOBAL_VAR(max_binlog_stmt_cache_size), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(IO_SIZE, ULONGLONG_MAX), + DEFAULT((ULONGLONG_MAX/IO_SIZE)*IO_SIZE), + BLOCK_SIZE(IO_SIZE)); + static bool fix_max_binlog_size(sys_var *self, THD *thd, enum_var_type type) { mysql_bin_log.set_max_size(max_binlog_size); -- cgit v1.2.1 From 7e4961bd51c5aefcaa9a5491dd99251343bc57b3 Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Tue, 7 Dec 2010 20:08:54 +0300 Subject: Fix for bug #58669: read_only not enforced on 5.5.x merged from mysql-5.5.8-release tree, revision: ramil@mysql.com-20101203174908-217tdkn150vieha9 --- sql/sys_vars.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index ed2c44fb03f..68bb77d467f 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1452,7 +1452,6 @@ static Sys_var_ulong Sys_read_buff_size( VALID_RANGE(IO_SIZE*2, INT_MAX32), DEFAULT(128*1024), BLOCK_SIZE(IO_SIZE)); -static my_bool read_only; static bool check_read_only(sys_var *self, THD *thd, set_var *var) { /* Prevent self dead-lock */ @@ -1536,6 +1535,16 @@ static bool fix_read_only(sys_var *self, THD *thd, enum_var_type type) read_only= opt_readonly; DBUG_RETURN(result); } + + +/** + The read_only boolean is always equal to the opt_readonly boolean except + during fix_read_only(); when that function is entered, opt_readonly is + the pre-update value and read_only is the post-update value. + fix_read_only() compares them and runs needed operations for the + transition (especially when transitioning from false to true) and + synchronizes both booleans in the end. +*/ static Sys_var_mybool Sys_readonly( "read_only", "Make all non-temporary tables read-only, with the exception for " -- cgit v1.2.1 From 54461b0699c202abd720970493002125d4f821fd Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 23 Mar 2011 19:03:42 +0200 Subject: Bug #11766306: 59393: have_innodb=yes when mysqld started with --skip-innodb Initialized correctly the have_innodb variable so that when the plugin is not initialized it stays "disabled" instead of "yes". Test suite added. --- sql/sys_vars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 8f9b91f0f92..1a7097e4bdf 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2766,7 +2766,7 @@ static Sys_var_charptr Sys_slow_log_path( ON_CHECK(check_log_path), ON_UPDATE(fix_slow_log_file)); /// @todo deprecate these four legacy have_PLUGIN variables and use I_S instead -export SHOW_COMP_OPTION have_csv, have_innodb; +export SHOW_COMP_OPTION have_csv, have_innodb= SHOW_OPTION_DISABLED; export SHOW_COMP_OPTION have_ndbcluster, have_partitioning; static Sys_var_have Sys_have_csv( "have_csv", "have_csv", -- cgit v1.2.1