Commit c847ae5d authored by Georgi Kodinov's avatar Georgi Kodinov

Bug #37168: Missing variable - skip_name_resolve

Added a read-only global boolean variable skip_name_resolve.
parent 21b1c1a7
......@@ -9,3 +9,30 @@ SELECT USER();
USER()
#
SHOW PROCESSLIST;
#
# Bug #37168: Missing variable - skip_name_resolve
#
SHOW VARIABLES LIKE 'skip_name_resolve';
Variable_name Value
skip_name_resolve ON
SHOW GLOBAL VARIABLES LIKE 'skip_name_resolve';
Variable_name Value
skip_name_resolve ON
SHOW SESSION VARIABLES LIKE 'skip_name_resolve';
Variable_name Value
skip_name_resolve ON
SELECT @@skip_name_resolve;
@@skip_name_resolve
1
SELECT @@LOCAL.skip_name_resolve;
ERROR HY000: Variable 'skip_name_resolve' is a GLOBAL variable
SELECT @@GLOBAL.skip_name_resolve;
@@GLOBAL.skip_name_resolve
1
SET @@skip_name_resolve=0;
ERROR HY000: Variable 'skip_name_resolve' is a read only variable
SET @@LOCAL.skip_name_resolve=0;
ERROR HY000: Variable 'skip_name_resolve' is a read only variable
SET @@GLOBAL.skip_name_resolve=0;
ERROR HY000: Variable 'skip_name_resolve' is a read only variable
End of 5.1 tests
......@@ -1495,4 +1495,13 @@ SELECT @@GLOBAL.max_binlog_cache_size;
@@GLOBAL.max_binlog_cache_size
5368709120
SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size;
#
# Bug #37168 : Missing variable - skip_name_resolve
#
SELECT @@skip_name_resolve;
@@skip_name_resolve
0
SHOW VARIABLES LIKE 'skip_name_resolve';
Variable_name Value
skip_name_resolve OFF
End of 5.1 tests
......@@ -29,3 +29,24 @@ disconnect con1;
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
--echo #
--echo # Bug #37168: Missing variable - skip_name_resolve
--echo #
SHOW VARIABLES LIKE 'skip_name_resolve';
SHOW GLOBAL VARIABLES LIKE 'skip_name_resolve';
SHOW SESSION VARIABLES LIKE 'skip_name_resolve';
SELECT @@skip_name_resolve;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@LOCAL.skip_name_resolve;
SELECT @@GLOBAL.skip_name_resolve;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@skip_name_resolve=0;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@LOCAL.skip_name_resolve=0;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.skip_name_resolve=0;
--echo End of 5.1 tests
......@@ -1232,4 +1232,12 @@ SET @old_max_binlog_cache_size = @@GLOBAL.max_binlog_cache_size;
SET GLOBAL max_binlog_cache_size = 5 * 1024 * 1024 * 1024;
SELECT @@GLOBAL.max_binlog_cache_size;
SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size;
--echo #
--echo # Bug #37168 : Missing variable - skip_name_resolve
--echo #
SELECT @@skip_name_resolve;
SHOW VARIABLES LIKE 'skip_name_resolve';
--echo End of 5.1 tests
......@@ -1990,6 +1990,7 @@ extern my_bool opt_log, opt_slow_log;
extern ulong log_output_options;
extern my_bool opt_log_queries_not_using_indexes;
extern bool opt_disable_networking, opt_skip_show_db;
extern bool opt_skip_name_resolve;
extern bool opt_ignore_builtin_innodb;
extern my_bool opt_character_set_client_handshake;
extern bool volatile abort_loop, shutdown_in_progress;
......
......@@ -410,6 +410,7 @@ ulong log_output_options;
my_bool opt_log_queries_not_using_indexes= 0;
bool opt_error_log= IF_WIN(1,0);
bool opt_disable_networking=0, opt_skip_show_db=0;
bool opt_skip_name_resolve=0;
my_bool opt_character_set_client_handshake= 1;
bool server_id_supplied = 0;
bool opt_endinfo, using_udf_functions;
......@@ -7715,6 +7716,7 @@ static int mysql_init_variables(void)
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
opt_bin_log= 0;
opt_disable_networking= opt_skip_show_db=0;
opt_skip_name_resolve= 0;
opt_ignore_builtin_innodb= 0;
opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name !
......@@ -8241,6 +8243,7 @@ mysqld_get_one_option(int optid,
opt_specialflag|= SPECIAL_NO_HOST_CACHE;
break;
case (int) OPT_SKIP_RESOLVE:
opt_skip_name_resolve= 1;
opt_specialflag|=SPECIAL_NO_RESOLVE;
break;
case (int) OPT_SKIP_NETWORKING:
......
......@@ -533,6 +533,10 @@ static sys_var_const sys_skip_show_database(&vars, "skip_show_database",
OPT_GLOBAL, SHOW_BOOL,
(uchar*) &opt_skip_show_db);
static sys_var_const sys_skip_name_resolve(&vars, "skip_name_resolve",
OPT_GLOBAL, SHOW_BOOL,
(uchar*) &opt_skip_name_resolve);
static sys_var_const sys_socket(&vars, "socket",
OPT_GLOBAL, SHOW_CHAR_PTR,
(uchar*) &mysqld_unix_port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment