List:Commits« Previous MessageNext Message »
From:Tatiana Azundris Nurnberg Date:February 10 2011 5:34am
Subject:bzr commit into mysql-trunk-bugfixing branch (azundris:3477) Bug#56124
View as plain text  
#At file:///Users/tnurnberg/forest/1/56-1/ based on revid:azundris@stripped

 3477 Tatiana Azundris Nurnberg	2011-02-10 [merge]
      merge and fixes for Bug#56124

    added:
      mysql-test/suite/sys_vars/r/core_file_basic.result
      mysql-test/suite/sys_vars/t/core_file_basic-master.opt
      mysql-test/suite/sys_vars/t/core_file_basic.test
    modified:
      sql/sys_vars.cc
      sql/sys_vars.h
=== added file 'mysql-test/suite/sys_vars/r/core_file_basic.result'
--- a/mysql-test/suite/sys_vars/r/core_file_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/core_file_basic.result	2011-02-10 04:52:55 +0000
@@ -0,0 +1,6 @@
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE '%core%';
+VARIABLE_NAME	VARIABLE_VALUE
+CORE_FILE	ON
+SHOW GLOBAL VARIABLES LIKE '%core%';
+Variable_name	Value
+core_file	ON

=== added file 'mysql-test/suite/sys_vars/t/core_file_basic-master.opt'
--- a/mysql-test/suite/sys_vars/t/core_file_basic-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/core_file_basic-master.opt	2011-02-10 04:52:55 +0000
@@ -0,0 +1,2 @@
+--core-file
+

=== added file 'mysql-test/suite/sys_vars/t/core_file_basic.test'
--- a/mysql-test/suite/sys_vars/t/core_file_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/core_file_basic.test	2011-02-10 04:52:55 +0000
@@ -0,0 +1,2 @@
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE '%core%';
+SHOW GLOBAL VARIABLES LIKE '%core%';

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-12-20 13:26:51 +0000
+++ b/sql/sys_vars.cc	2011-02-10 05:29:15 +0000
@@ -359,6 +359,9 @@ static bool fix_binlog_format_after_upda
   return false;
 }
 
+static Sys_var_test_flag Sys_core_file(
+       "core_file", "write a core-file on crashes", TEST_CORE_ON_SIGNAL);
+
 static Sys_var_enum Sys_binlog_format(
        "binlog_format", "What form of binary logging the master will "
        "use: either ROW for row-based binary logging, STATEMENT "
@@ -1520,7 +1523,7 @@ 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(
+static Sys_var_external_user Sys_external_user(
        "external_user", "The external user account used when logging in",
        IN_SYSTEM_CHARSET);
 

=== modified file 'sql/sys_vars.h'
--- a/sql/sys_vars.h	2010-12-21 15:27:40 +0000
+++ b/sql/sys_vars.h	2011-02-10 05:29:15 +0000
@@ -842,6 +842,35 @@ public:
 };
 
 /**
+  The class for @test_flags (core_file for now).
+  It's derived from Sys_var_mybool.
+
+  Class specific constructor arguments:
+    Caller need not pass in a variable as we make up the value on the
+    fly, that is, we derive it from the global test_flags bit vector.
+
+  Backing store: my_bool
+*/
+class Sys_var_test_flag: public Sys_var_mybool
+{
+private:
+  my_bool test_flag_value;
+  uint    test_flag_mask;
+public:
+  Sys_var_test_flag(const char *name_arg, const char *comment, uint mask)
+  : Sys_var_mybool(name_arg, comment, READ_ONLY GLOBAL_VAR(test_flag_value),
+          NO_CMD_LINE, DEFAULT(FALSE))
+  {
+    test_flag_mask= mask;
+  }
+  uchar *global_value_ptr(THD *thd, LEX_STRING *base)
+  {
+    test_flag_value= ((test_flags & test_flag_mask) > 0);
+    return (uchar*) &test_flag_value;
+  }
+};
+
+/**
   The class for the @max_user_connections.
   It's derived from Sys_var_uint, but non-standard session value
   requires a new class.

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into mysql-trunk-bugfixing branch (azundris:3477) Bug#56124Tatiana Azundris Nurnberg10 Feb