List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:March 25 2009 4:51pm
Subject:bzr push into mysql-6.0 branch (alik:2747 to 2748) Bug#38054
View as plain text  
 2748 Alexander Nozdrin	2009-03-25
      Patch for Bug#38054: "SET SESSION debug" modifies @@global.debug variable.
      
      1. Fix merge error.
      2. Add a test case to ensure it will not be broken in the future.

    modified:
      dbug/dbug.c
      mysql-test/r/variables_debug.result
      mysql-test/t/variables_debug.test
 2747 Davi Arnaut	2009-03-24
      WL#4284: Transactional DDL locking
      
      Post-merge fix:
      
      Move a test case that depends on functionality not available
     @ mysql-test/r/flush_block_commit.result
        Update test case result.
     @ mysql-test/r/flush_block_commit_notembedded.result
        Update test case result.
     @ mysql-test/t/flush_block_commit.test
        Disconnect connections and remove test case as wait_condition.inc
        does not work on the embedded server.
     @ mysql-test/t/flush_block_commit_notembedded.test
        Move test case from flush_block_commit.test.

    modified:
      mysql-test/r/flush_block_commit.result
      mysql-test/r/flush_block_commit_notembedded.result
      mysql-test/t/flush_block_commit.test
      mysql-test/t/flush_block_commit_notembedded.test
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2009-02-13 16:30:54 +0000
+++ b/dbug/dbug.c	2009-03-25 16:51:28 +0000
@@ -836,8 +836,9 @@ yuck:
  *  DESCRIPTION
  *
  *      Given pointer to a debug control string in "control",
- *      parses the control string, and sets
- *      up a current debug settings.
+ *      parses the control string, and sets up a current debug
+ *      settings. Pushes a new debug settings if the current is
+ *      set to the initial debugger settings.
  *
  */
 
@@ -847,6 +848,8 @@ void _db_set_(const char *control)
   uint old_fflags;
   get_code_state_or_return;
   old_fflags=fflags(cs);
+  if (cs->stack == &init_settings)
+    PushState(cs);
   if (DbugParse(cs, control))
     FixTraceFlags(old_fflags, cs);
 }
@@ -865,7 +868,7 @@ void _db_set_(const char *control)
  *
  *      Given pointer to a debug control string in "control", pushes
  *      the current debug settings, parses the control string, and sets
- *      up a new debug settings
+ *      up a new debug settings with DbugParse()
  *
  */
 

=== modified file 'mysql-test/r/variables_debug.result'
--- a/mysql-test/r/variables_debug.result	2008-02-26 15:03:59 +0000
+++ b/mysql-test/r/variables_debug.result	2009-03-25 16:51:28 +0000
@@ -10,3 +10,10 @@ set debug= '-P';
 select @@debug;
 @@debug
 T
+SELECT @@session.debug, @@global.debug;
+@@session.debug	@@global.debug
+T	
+SET SESSION debug = '';
+SELECT @@session.debug, @@global.debug;
+@@session.debug	@@global.debug
+	

=== modified file 'mysql-test/t/variables_debug.test'
--- a/mysql-test/t/variables_debug.test	2008-02-26 15:03:59 +0000
+++ b/mysql-test/t/variables_debug.test	2009-03-25 16:51:28 +0000
@@ -10,3 +10,13 @@ set debug= '+P';
 select @@debug;
 set debug= '-P';
 select @@debug;
+
+#
+# Bug#38054: "SET SESSION debug" modifies @@global.debug variable
+#
+
+SELECT @@session.debug, @@global.debug;
+
+SET SESSION debug = '';
+
+SELECT @@session.debug, @@global.debug;


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20090325165128-et2eti9fvlzjsvzi.bundle
Thread
bzr push into mysql-6.0 branch (alik:2747 to 2748) Bug#38054Alexander Nozdrin25 Mar