MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:March 31 2010 1:12pm
Subject:bzr commit into mysql-5.1-bugteam branch (joro:3436) Bug#37168
View as plain text  
#At file:///home/kgeorge/mysql/work/B37168-5.1-bugteam/ based on revid:sergey.glukhov@stripped

 3436 Georgi Kodinov	2010-03-31
      Bug #37168: Missing variable - skip_name_resolve
      
      Added a read-only global boolean variable skip_name_resolve.

    modified:
      mysql-test/r/skip_name_resolve.result
      mysql-test/r/variables.result
      mysql-test/t/skip_name_resolve.test
      mysql-test/t/variables.test
      sql/mysql_priv.h
      sql/mysqld.cc
      sql/set_var.cc
=== modified file 'mysql-test/r/skip_name_resolve.result'
--- a/mysql-test/r/skip_name_resolve.result	2009-03-10 15:54:24 +0000
+++ b/mysql-test/r/skip_name_resolve.result	2010-03-31 13:12:37 +0000
@@ -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

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2010-03-25 12:08:21 +0000
+++ b/mysql-test/r/variables.result	2010-03-31 13:12:37 +0000
@@ -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

=== modified file 'mysql-test/t/skip_name_resolve.test'
--- a/mysql-test/t/skip_name_resolve.test	2009-03-10 15:54:24 +0000
+++ b/mysql-test/t/skip_name_resolve.test	2010-03-31 13:12:37 +0000
@@ -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

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2009-12-17 11:45:13 +0000
+++ b/mysql-test/t/variables.test	2010-03-31 13:12:37 +0000
@@ -1232,4 +1232,12 @@ SET @old_max_binlog_cache_size = @@GLOBA
 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

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2010-03-19 09:06:40 +0000
+++ b/sql/mysql_priv.h	2010-03-31 13:12:37 +0000
@@ -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;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-03-25 12:08:21 +0000
+++ b/sql/mysqld.cc	2010-03-31 13:12:37 +0000
@@ -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:

=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2010-03-10 12:26:39 +0000
+++ b/sql/set_var.cc	2010-03-31 13:12:37 +0000
@@ -533,6 +533,10 @@ static sys_var_const    sys_skip_show_da
                                             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);


Attachment: [text/bzr-bundle] bzr/joro@sun.com-20100331131237-ts0pnjw9h4vlxnge.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (joro:3436) Bug#37168Georgi Kodinov31 Mar