List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:June 6 2008 4:03pm
Subject:bk commit into 6.0 tree (istruewing:1.2629)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of istruewing.  When istruewing does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-06-06 16:03:17+02:00, istruewing@stripped +18 -0
  Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
  
  Removed all unused BACKUP_BREAKPOINTs. None is left.
  Removed sql/backup/debug.h as it is now obsolete.
  Removed inclusion of debug.h from many files.
  Cleaned mysql-test/t/disabled.def.

  BitKeeper/deleted/.del-debug.h~bdd8a2cd3122ae80@stripped, 2008-06-06 15:59:55+02:00,
istruewing@stripped +0 -0
    Delete: sql/backup/debug.h

  mysql-test/r/backup_commit_blocker.result@stripped, 2008-06-06 16:03:15+02:00,
istruewing@stripped +2 -2
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Changed result.

  mysql-test/t/backup_commit_blocker.test@stripped, 2008-06-06 16:03:15+02:00,
istruewing@stripped +2 -2
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Changed test to follow renaming of a sync point.

  mysql-test/t/disabled.def@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0
-6
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed all converted tests from the disabled list.

  sql/backup/Makefile.am@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed obolete header file.

  sql/backup/be_default.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/backup/be_snapshot.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -2
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.
    Removed unused brekpoint.

  sql/backup/data_backup.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -9
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.
    Removed unused brekpoints.

  sql/backup/kernel.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -9
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.
    Removed unused brekpoints.

  sql/backup/logger.h@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/backup/stream.h@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/ddl_blocker.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -2
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed unused brekpoint.

  sql/ddl_blocker.h@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/handler.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/lock.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +36 -19
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Fixed location of two DEBUG_SYNC points to avoid nested calls
    of THD::enter_cond() and THD::exit_cond().
    Renamed a sync point hoping it reflects its location better.

  sql/sql_delete.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/sql_insert.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

  sql/sql_parse.cc@stripped, 2008-06-06 16:03:15+02:00, istruewing@stripped +0 -1
    Convert BACKUP_BREAKPOINT to DEBUG_SYNC.
    Removed inclusion of obsolete header file.

diff -Nrup a/mysql-test/r/backup_commit_blocker.result
b/mysql-test/r/backup_commit_blocker.result
--- a/mysql-test/r/backup_commit_blocker.result	2008-06-05 21:17:52 +02:00
+++ b/mysql-test/r/backup_commit_blocker.result	2008-06-06 16:03:15 +02:00
@@ -58,7 +58,7 @@ INSERT INTO bup_commit_blocker.t2 VALUES
 con1: Activate synchronization points for BACKUP.
 SET DEBUG_SYNC= 'before_commit_block SIGNAL bup_commit_block
                  WAIT_FOR bup_go_read_lock';
-SET DEBUG_SYNC= 'wait_protect_global_read_lock SIGNAL bup_read_lock';
+SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL bup_read_lock';
 SET DEBUG_SYNC= 'before_backup_unblock_commit WAIT_FOR finish';
 con1: Backing up database -- will block with lock
 BACKUP DATABASE bup_commit_blocker TO "bup_commit_blocker.bak";
@@ -349,7 +349,7 @@ INSERT INTO bup_commit_blocker.t2 VALUES
 con1: Activate synchronization points for BACKUP.
 SET DEBUG_SYNC= 'before_commit_block SIGNAL bup_commit_block
                  WAIT_FOR bup_go_read_lock';
-SET DEBUG_SYNC= 'wait_protect_global_read_lock SIGNAL bup_read_lock';
+SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL bup_read_lock';
 SET DEBUG_SYNC= 'before_backup_unblock_commit SIGNAL bup_unblocking
                  WAIT_FOR finish';
 con1: Backing up database -- will block with lock
diff -Nrup a/mysql-test/t/backup_commit_blocker.test
b/mysql-test/t/backup_commit_blocker.test
--- a/mysql-test/t/backup_commit_blocker.test	2008-06-05 21:17:52 +02:00
+++ b/mysql-test/t/backup_commit_blocker.test	2008-06-06 16:03:15 +02:00
@@ -155,7 +155,7 @@ connection con1;
 --echo con1: Activate synchronization points for BACKUP.
 SET DEBUG_SYNC= 'before_commit_block SIGNAL bup_commit_block
                  WAIT_FOR bup_go_read_lock';
-SET DEBUG_SYNC= 'wait_protect_global_read_lock SIGNAL bup_read_lock';
+SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL bup_read_lock';
 SET DEBUG_SYNC= 'before_backup_unblock_commit WAIT_FOR finish';
 --echo con1: Backing up database -- will block with lock
 send BACKUP DATABASE bup_commit_blocker TO "bup_commit_blocker.bak";
@@ -556,7 +556,7 @@ connection con1;
 --echo con1: Activate synchronization points for BACKUP.
 SET DEBUG_SYNC= 'before_commit_block SIGNAL bup_commit_block
                  WAIT_FOR bup_go_read_lock';
-SET DEBUG_SYNC= 'wait_protect_global_read_lock SIGNAL bup_read_lock';
+SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL bup_read_lock';
 SET DEBUG_SYNC= 'before_backup_unblock_commit SIGNAL bup_unblocking
                  WAIT_FOR finish';
 --echo con1: Backing up database -- will block with lock
diff -Nrup a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
--- a/mysql-test/t/disabled.def	2008-06-05 22:01:34 +02:00
+++ b/mysql-test/t/disabled.def	2008-06-06 16:03:15 +02:00
@@ -22,12 +22,6 @@ ctype_create         : Bug#32965 main.ct
 status               : Bug#32966 main.status fails
 ps_ddl               : Bug#12093 2007-12-14 pending WL#4165 / WL#4166
 user_limits          : Bug#23921 2007-12-16 random failure of user_limits.test
-#backup                :BUG#34235 pending replacement of test facility with WL#4259
-#backup_commit_blocker :BUG#34235 pending replacement of test facility with WL#4259
-#backup_ddl_blocker    :BUG#34235 pending replacement of test facility with WL#4259
-#backup_progress       :BUG#34235 pending replacement of test facility with WL#4259
-#backup_security       :BUG#34235 pending replacement of test facility with WL#4259
-#backup_snapshot       :BUG#34235 pending replacement of test facility with WL#4259
 backup_no_engine     : Bug#36021 2008-04-13 rsomla server crashes when openning table
with unknown storage engine
 csv_alter_table      : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL
columns in CSV tables
 ctype_latin2_ch      : BUG #33791 2008-01-18 mats Wrong ORDER BY with latin2_czech_cs
diff -Nrup a/sql/backup/Makefile.am b/sql/backup/Makefile.am
--- a/sql/backup/Makefile.am	2008-05-14 02:23:54 +02:00
+++ b/sql/backup/Makefile.am	2008-06-06 16:03:15 +02:00
@@ -52,7 +52,6 @@ noinst_HEADERS = \
   backup_kernel.h \
   backup_stream.h \
   stream_services.h \
-  debug.h \
   error.h \
   stream.h \
   backup_aux.h \
diff -Nrup a/sql/backup/be_default.cc b/sql/backup/be_default.cc
--- a/sql/backup/be_default.cc	2008-06-05 22:01:34 +02:00
+++ b/sql/backup/be_default.cc	2008-06-06 16:03:15 +02:00
@@ -68,7 +68,6 @@
 #include "be_default.h"
 #include "backup_aux.h"
 #include "rpl_record.h"
-#include "debug.h"
 
 namespace default_backup {
 
diff -Nrup a/sql/backup/be_snapshot.cc b/sql/backup/be_snapshot.cc
--- a/sql/backup/be_snapshot.cc	2008-05-22 17:03:10 +02:00
+++ b/sql/backup/be_snapshot.cc	2008-06-06 16:03:15 +02:00
@@ -44,7 +44,6 @@
 #include "backup_engine.h"
 #include "be_snapshot.h"
 #include "backup_aux.h"
-#include "debug.h"
 
 namespace snapshot_backup {
 
@@ -103,7 +102,6 @@ result_t Backup::get_data(Buffer &buf)
 
   if (!tables_open && (locking_thd->lock_state == LOCK_ACQUIRED))
   {
-    BACKUP_BREAKPOINT("backup_cs_open_tables");
     open_and_lock_tables(locking_thd->m_thd, locking_thd->tables_in_backup);
     tables_open= TRUE;
   }
diff -Nrup a/sql/backup/data_backup.cc b/sql/backup/data_backup.cc
--- a/sql/backup/data_backup.cc	2008-06-05 21:17:53 +02:00
+++ b/sql/backup/data_backup.cc	2008-06-06 16:03:15 +02:00
@@ -19,7 +19,6 @@
 #include "backup_engine.h"
 #include "stream.h"
 #include "backup_progress.h"
-#include "debug.h"
 #include "be_default.h"  // needed for table locking code
 
 /***********************************************
@@ -425,14 +424,12 @@ int block_commits(THD *thd, TABLE_LIST *
     that do not take lock tables. Thus, it should apply to write locked
     tables only and only to non-transactional engines.
 
-    BACKUP_BREAKPOINT("commit_blocker_step_2");
     result= close_cached_tables(thd, 0, tables);
   */
 
   /*
     Step 3 - make the global read lock to block commits.
   */
-  BACKUP_BREAKPOINT("commit_blocker_step_3");
   if (make_global_read_lock_block_commit(thd))
   {
     /* Don't leave things in a half-locked state */
@@ -455,7 +452,6 @@ int block_commits(THD *thd, TABLE_LIST *
 int unblock_commits(THD *thd)
 {
   DBUG_ENTER("unblock_commits()");
-  BACKUP_BREAKPOINT("commit_blocker_step_5");
   unlock_global_read_lock(thd);
   DBUG_RETURN(0);
 }
@@ -529,7 +525,6 @@ int write_table_data(THD* thd, Backup_in
                             inactive.elements));
 
   DBUG_PRINT("backup_data",("-- INIT PHASE --"));
-  BACKUP_BREAKPOINT("data_init");
 
   /*
    Poll "at end" drivers activating inactive ones on the way.
@@ -592,7 +587,6 @@ int write_table_data(THD* thd, Backup_in
 
     // prepare for VP
     DBUG_PRINT("backup_data",("-- PREPARE PHASE --"));
-    BACKUP_BREAKPOINT("data_prepare");
 
     if (sch.prepare())
       goto error;
@@ -627,7 +621,6 @@ int write_table_data(THD* thd, Backup_in
     if (error)
       goto error;
 
-    BACKUP_BREAKPOINT("data_lock");
     if (sch.lock())
       goto error;
 
@@ -642,7 +635,6 @@ int write_table_data(THD* thd, Backup_in
     */
     vp_time= my_time(0);
 
-    BACKUP_BREAKPOINT("data_unlock");
     DEBUG_SYNC(thd, "before_backup_data_unlock");
     if (sch.unlock())
       goto error;
@@ -673,7 +665,6 @@ int write_table_data(THD* thd, Backup_in
 
     // get final data from drivers
     DBUG_PRINT("backup_data",("-- FINISH PHASE --"));
-    BACKUP_BREAKPOINT("data_finish");
 
     while (sch.finish_count > 0)
     if (sch.step())
diff -Nrup a/sql/backup/debug.h b/sql/backup/debug.h
--- a/sql/backup/debug.h	2008-03-19 10:18:54 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,231 +0,0 @@
-#ifndef _BACKUP_DEBUG_H
-#define _BACKUP_DEBUG_H
-
-#define BACKUP_BREAKPOINT_TIMEOUT 300
-
-/*
-  TODO
-  - decide how to configure DEBUG_BACKUP
- */
-
-#ifndef DBUG_OFF
-# define DBUG_BACKUP
-#endif
-
-
-/**
-  @page BACKUP_BREAKPOINT Online Backup Breakpoints
-  Macros for creating breakpoints during testing.
-
-  @section WHAT What are breakpoints?
-  Breakpoints are devices used to pause the execution of the backup system
-  at a certain point in the code. There is a timeout that you can specify
-  when you set the lock for the breakpoint (from get_lock() see below)
-  which will enable execution to continue after the period in seconds
-  expires.
-
-  The best use of these breakpoints is for pausing execution at critical
-  points in the backup code to allow proper testing of certain features.
-  For example, suppose you wanted to ensure the Consistent Snapshot driver
-  was working properly. To do so, you would need to ensure no new @INSERT
-  statements are executed while the data is being backed up. If you use
-  a breakpoint, you can set the breakpoint to pause the backup kernel at
-  the point where it has set the consistent read and is reading rows.
-  You can then insert some rows and release the breakpoint. The result
-  should contain all of the rows in the table except those that were
-  inserted once the consistent read was set.
-
-  @section USAGE How to use breakpoints.
-  To make a breakpoint available, you must add a macro call to the code.
-  Simply insert the macro call as follows. The @c breakpoint_name is a 
-  text string that must be unique among the breakpoints. It is used in 
-  the macro as a means of tagging the code for pausing and resuming
-  execution. Once the code is compiled, you can use a client connection
-  to set and release the breakpoint. Be sure to use a separate connection
-  for getting, checking, and releasing locks. 
-
-  <b><c>BACKUP_BREAKPOINT("<breakpoint_name>");</c></b>
-  
-  Breakpoints use the user-defined locking functions @c get_lock() to set
-  the breakpoint and @c release_lock() to release it.
-
-  @subsection SET Setting breakpoints.
-  To set an existing breakpoint, issue the following command where @c
-  timeout is the number of seconds execution will pause once the breakpoint
-  is reached before continuing execution.
-
-  <b><c>SELECT
get_lock("<breakpoint_name>",<timeout>);</c></b>
-
-  @subsection RELEASE Releasing breakpoints.
-  To release an existing breakpoint, issue the following command. This
-  releases execution allow the system to continue.
-
-  <b><c>SELECT release_lock("<breakpoint_name>");</c></b>
-
-  @subsection EXAMPLE Example - Testing the Consistent Snapshot Driver
-  To test the consistent snapshot driver, we can make use of the @c
-  backup_cs_locked breakpoint to pause execution after the consistent read
-  is initiated and before all of the rows from the table have been read.
-  Consider an InnoDB table with the following structure as our test table.
-
-  <c>CREATE TABLE t1 (a INT) ENGINE=INNODB;</c>
-
-  To perform this test using breakpoints, we need two client connections.
-  One will be used to execute the backup command and another to set and
-  release the breakpoint. In the first client, we set the breakpoint with
-  the <c>SELECT get_lock("backup_cs_locked", 100);</c> command. In the 
-  second client, we start the execution of the backup. We can return to
-  the first client and issue several @INSERT statements then issue the
-  <c>SELECT release_lock("backup_cs_locked");</c> command to release the
-  breakpoint.
-
-  We can then return to the second client, select all of the rows from the
-  table to verify the rows were inserted. We can verify that the consistent
-  snapshot worked by restoring the database (which is a destructive restore)
-  and then select all of the rows. This will show that the new rows 
-  inserted while the backup was running were not inserted into the table.
-  The following shows the output of the commands as described.
-
-  <b>First Client</b>
-  @code mysql> SELECT * FROM t1;
-  +---+
-  | a |
-  +---+
-  | 1 |
-  | 2 |
-  | 3 |
-  +---+
-  3 rows in set (0.00 sec)
-
-  mysql> SELECT get_lock("backup_cs_locked", 100);
-  +-----------------------------------+
-  | get_lock("backup_cs_locked", 100) |
-  +-----------------------------------+
-  |                                 1 |
-  +-----------------------------------+
-  1 row in set (0.00 sec) @endcode
-
-  <b>Second Client</b>
-  @code mysql> BACKUP DATABASE test TO 'test.bak'; @endcode
-
-  Note: The backup will pause while the breakpoint is set (the lock is held).
-
-  <b>First Client</b>
-  @code mysql> INSERT INTO t1 VALUES (101), (102), (103);
-  Query OK, 3 rows affected (0.02 sec)
-  Records: 3  Duplicates: 0  Warnings: 0
-
-  mysql> SELECT * FROM t1;
-  +-----+
-  | a   |
-  +-----+
-  |   1 |
-  |   2 |
-  |   3 |
-  | 101 |
-  | 102 |
-  | 103 |
-  +-----+
-  6 rows in set (0.00 sec)
-  
-  mysql> SELECT release_lock("backup_cs_locked");
-  +----------------------------------+
-  | release_lock("backup_cs_locked") |
-  +----------------------------------+
-  |                                1 |
-  +----------------------------------+
-  1 row in set (0.01 sec) @endcode
-
-  <b>Second Client</b>
-  @code +------------------------------+
-  | Backup Summary               |
-  +------------------------------+
-  |  header     =       14 bytes |
-  |  meta-data  =      120 bytes |
-  |  data       =       30 bytes |
-  |               -------------- |
-  |  total             164 bytes |
-  +------------------------------+
-  5 rows in set (33.45 sec)
-
-  mysql> SELECT * FROM t1;
-  +-----+
-  | a   |
-  +-----+
-  |   1 |
-  |   2 |
-  |   3 |
-  | 101 |
-  | 102 |
-  | 103 |
-  +-----+
-  6 rows in set (0.00 sec)
-  
-  mysql> RESTORE FROM 'test.bak';
-  +------------------------------+
-  | Restore Summary              |
-  +------------------------------+
-  |  header     =       14 bytes |
-  |  meta-data  =      120 bytes |
-  |  data       =       30 bytes |
-  |               -------------- |
-  |  total             164 bytes |
-  +------------------------------+
-  5 rows in set (0.08 sec)
-  
-  mysql> SELECT * FROM t1;
-  +---+
-  | a |
-  +---+
-  | 1 |
-  | 2 |
-  | 3 |
-  +---+
-  3 rows in set (0.00 sec)@endcode
-
-  Note: The backup will complete once breakpoint is released (the lock is
-  released).
-
-  @section BREAKPOINTS Breakpoints
-  The following are the available breakpoints included in the code.
-
-  - <b>backup_command</b>  Occurs at the start of the backup operation.
-  - <b>data_init</b>  Occurs at the start of the <b>INITIALIZE
PHASE</b>.
-  - <b>data_prepare</b>  Occurs at the start of the <b>PREPARE
PHASE</b>.
-  - <b>data_lock</b>  Occurs at the start of the <b>SYNC
PHASE</b>.
-  - <b>data_unlock</b>  Occurs before the unlock calls.
-  - <b>data_finish</b>  Occurs at the start of the <b>FINISH
PHASE</b>.
-  - <b>backup_meta</b>  Occurs before the call to write_meta_data().
-  - <b>backup_data</b>  Occurs before the call to write_table_data().
-  - <b>backup_done</b>  Occurs after the call to write_table_data() returns.
-  - <b>backup_cs_locked</b>  Consistent Snapshot - after the consistent
-                             read has been initiated but before rows are read.
-  - <b>backup_cs_open_tables</b>  Consistent Snapshot - before the call to
-                             open and lock tables.
-  - <b>backup_cs_reading</b>  Consistent Snapshot - occurs during read.
-
-  @section NOTES Developer Notes
-  - Breakpoints can be used in debug builds only. You must compile
-  the code using the @c DEBUG_EXTRA preprocessor directive. 
-  - When adding breakpoints, you must add a list item for each breakpoint
-  to the documentation for breakpoints. See the code for the macro
-  definition in @ref debug.h for details.
-  - You must use a dedicated connection for getting and releasing locks. Do
-  not issue a get_lock() or release_lock() in the same connection (thread) as
-  code that calls BACKUP_BREAKPOINT(). Using the same connection to get/release
-  locks and run code that issues BACKUP_BREAKPOINTs will result in an
-  assertion using DEBUG_ASSERT(thd->ull == NULL) from debug_sync_point() in
-  item_func.cc.
-
- */
-
-/*
-  Consider: set thd->proc_info when waiting on lock
-*/
-#define BACKUP_BREAKPOINT(S) \
- do { \
-  DBUG_PRINT("backup",("== breakpoint on '%s' ==",(S))); \
-  DBUG_EXECUTE_IF("backup_debug", DBUG_SYNC_POINT((S),BACKUP_BREAKPOINT_TIMEOUT);); \
- } while (0)
-
-#endif
diff -Nrup a/sql/backup/kernel.cc b/sql/backup/kernel.cc
--- a/sql/backup/kernel.cc	2008-05-22 14:12:57 +02:00
+++ b/sql/backup/kernel.cc	2008-06-06 16:03:15 +02:00
@@ -69,7 +69,6 @@
 #include "restore_info.h"
 #include "logger.h"
 #include "stream.h"
-#include "debug.h"
 #include "be_native.h"
 #include "be_default.h"
 #include "be_snapshot.h"
@@ -127,8 +126,6 @@ execute_backup_command(THD *thd, LEX *le
   DBUG_ENTER("execute_backup_command");
   DBUG_ASSERT(thd && lex);
 
-  BACKUP_BREAKPOINT("backup_command");
-
   using namespace backup;
 
   Backup_restore_ctx context(thd); // reports errors
@@ -181,7 +178,6 @@ execute_backup_command(THD *thd, LEX *le
     if (res)
       DBUG_RETURN(send_error(context, ER_BACKUP_BACKUP));
 
-    BACKUP_BREAKPOINT("bp_complete_state");
     break;
   }
 
@@ -734,8 +730,6 @@ int Backup_restore_ctx::do_backup()
   Output_stream &s= *static_cast<Output_stream*>(m_stream);
   Backup_info   &info= *static_cast<Backup_info*>(m_catalog);
 
-  BACKUP_BREAKPOINT("backup_meta");
-
   report_stats_pre(info);
 
   DBUG_PRINT("backup",("Writing preamble"));
@@ -748,8 +742,6 @@ int Backup_restore_ctx::do_backup()
 
   DBUG_PRINT("backup",("Writing table data"));
 
-  BACKUP_BREAKPOINT("backup_data");
-
   if (write_table_data(m_thd, info, s)) // reports errors
     DBUG_RETURN(send_error(*this, ER_BACKUP_BACKUP));
 
@@ -764,7 +756,6 @@ int Backup_restore_ctx::do_backup()
   report_stats_post(info);
 
   DBUG_PRINT("backup",("Backup done."));
-  BACKUP_BREAKPOINT("backup_done");
 
   DBUG_RETURN(0);
 }
diff -Nrup a/sql/backup/logger.h b/sql/backup/logger.h
--- a/sql/backup/logger.h	2008-05-22 14:12:57 +02:00
+++ b/sql/backup/logger.h	2008-06-06 16:03:15 +02:00
@@ -4,7 +4,6 @@
 #include "mysql_priv.h"
 #include <backup_stream.h>
 #include <backup/error.h>
-#include <backup/debug.h>
 #include <backup/backup_progress.h>
 
 
diff -Nrup a/sql/backup/stream.h b/sql/backup/stream.h
--- a/sql/backup/stream.h	2008-03-04 17:06:24 +01:00
+++ b/sql/backup/stream.h	2008-06-06 16:03:15 +02:00
@@ -5,7 +5,6 @@
 
 #include <backup/api_types.h>    // for Buffer definition
 #include <backup/image_info.h>
-#include <backup/debug.h>        // for definition of DBUG_BACKUP
 #include <backup/logger.h>
 
 /**
diff -Nrup a/sql/ddl_blocker.cc b/sql/ddl_blocker.cc
--- a/sql/ddl_blocker.cc	2008-05-23 17:27:24 +02:00
+++ b/sql/ddl_blocker.cc	2008-06-06 16:03:15 +02:00
@@ -159,8 +159,6 @@ my_bool DDL_blocker_class::block_DDL(THD
   DDL_blocked= TRUE;
   thd->exit_cond("DDL blocker: Ok to block DDL");
 
-  BACKUP_BREAKPOINT("DDL_blocker_blocked");
-
   /*
     Check the ddl blocker condition. Rest until ddl blocker is released.
   */
diff -Nrup a/sql/ddl_blocker.h b/sql/ddl_blocker.h
--- a/sql/ddl_blocker.h	2007-12-12 21:13:24 +01:00
+++ b/sql/ddl_blocker.h	2008-06-06 16:03:15 +02:00
@@ -4,7 +4,6 @@
   Header file for DDL blocker code.
  */
 #include "mysql_priv.h"
-#include "backup/debug.h"
 
 /**
    @class DDL_blocker_class
diff -Nrup a/sql/handler.cc b/sql/handler.cc
--- a/sql/handler.cc	2008-06-05 21:17:52 +02:00
+++ b/sql/handler.cc	2008-06-06 16:03:15 +02:00
@@ -27,7 +27,6 @@
 #include "rpl_filter.h"
 #include <myisampack.h>
 #include <errno.h>
-#include "backup/debug.h"
 
 #ifdef WITH_PARTITION_STORAGE_ENGINE
 #include "ha_partition.h"
diff -Nrup a/sql/lock.cc b/sql/lock.cc
--- a/sql/lock.cc	2008-06-05 22:01:34 +02:00
+++ b/sql/lock.cc	2008-06-06 16:03:15 +02:00
@@ -1423,25 +1423,33 @@ bool lock_global_read_lock(THD *thd)
   if (!thd->global_read_lock)
   {
     const char *old_message;
+    const char *new_message= "Waiting to get readlock";
     (void) pthread_mutex_lock(&LOCK_global_read_lock);
-    old_message=thd->enter_cond(&COND_global_read_lock,
&LOCK_global_read_lock,
-                                "Waiting to get readlock");
 
 #if defined(ENABLED_DEBUG_SYNC)
     /*
       The below sync point fires if we have to wait for
-      protect_against_global_read_lock. Beware to use WAIT_FOR with this
-      sync point. We hold LOCK_global_read_lock here.
-      Call the sync point after calling enter_cond() so that proc_info
-      is set correctly after a SIGNAL activity. OTOH this placement is
-      another argument, not to use a WAIT_FOR action as it would destroy
-      the mutex settings of enter_cond() and thus make the thread
-      non-killable.
+      protect_against_global_read_lock.
+
+      WARNING: Beware to use WAIT_FOR with this sync point. We hold
+      LOCK_global_read_lock here.
+
+      Call the sync point before calling enter_cond() as it does use
+      enter_cond() and exit_cond() itself if a WAIT_FOR action is
+      executed in spite of the above warning.
+
+      Pre-set proc_info so that it is available immediately after the
+      sync point sends a SIGNAL. This makes tests more reliable.
     */
     if (protect_against_global_read_lock)
-      DEBUG_SYNC(thd, "wait_protect_global_read_lock");
+    {
+      thd_proc_info(thd, new_message);
+      DEBUG_SYNC(thd, "wait_lock_global_read_lock");
+    }
 #endif /* defined(ENABLED_DEBUG_SYNC) */
 
+    old_message=thd->enter_cond(&COND_global_read_lock,
&LOCK_global_read_lock,
+                                new_message);
     DBUG_PRINT("info",
 	       ("waiting_for: %d  protect_against: %d",
 		waiting_for_read_lock, protect_against_global_read_lock));
@@ -1517,6 +1525,8 @@ bool wait_if_global_read_lock(THD *thd, 
   (void) pthread_mutex_lock(&LOCK_global_read_lock);
   if ((need_exit_cond= must_wait))
   {
+    const char *new_message= "Waiting for release of readlock";
+
     if (thd->global_read_lock)		// This thread had the read locks
     {
       if (is_not_commit)
@@ -1530,24 +1540,31 @@ bool wait_if_global_read_lock(THD *thd, 
       */
       DBUG_RETURN(is_not_commit);
     }
-    old_message=thd->enter_cond(&COND_global_read_lock,
&LOCK_global_read_lock,
-				"Waiting for release of readlock");
 
 #if defined(ENABLED_DEBUG_SYNC)
     /*
       The below sync point fires if we have to wait for
-      global_read_lock. Beware to use WAIT_FOR with this sync point. We
-      hold LOCK_global_read_lock here.
-      Call the sync point after calling enter_cond() so that proc_info
-      is set correctly after a SIGNAL activity. OTOH this placement is
-      another argument, not to use a WAIT_FOR action as it would destroy
-      the mutex settings of enter_cond() and thus make the thread
-      non-killable.
+      global_read_lock.
+
+      WARNING: Beware to use WAIT_FOR with this sync point. We hold
+      LOCK_global_read_lock here.
+
+      Call the sync point before calling enter_cond() as it does use
+      enter_cond() and exit_cond() itself if a WAIT_FOR action is
+      executed in spite of the above warning.
+
+      Pre-set proc_info so that it is available immediately after the
+      sync point sends a SIGNAL. This makes tests more reliable.
     */
     if (must_wait)
+    {
+      thd_proc_info(thd, new_message);
       DEBUG_SYNC(thd, "wait_if_global_read_lock");
+    }
 #endif /* defined(ENABLED_DEBUG_SYNC) */
 
+    old_message=thd->enter_cond(&COND_global_read_lock,
&LOCK_global_read_lock,
+                                new_message);
     while (must_wait && ! thd->killed &&
 	   (!abort_on_refresh || thd->version == refresh_version))
     {
diff -Nrup a/sql/sql_delete.cc b/sql/sql_delete.cc
--- a/sql/sql_delete.cc	2008-06-05 21:17:53 +02:00
+++ b/sql/sql_delete.cc	2008-06-06 16:03:15 +02:00
@@ -23,7 +23,6 @@
 #include "sql_select.h"
 #include "sp_head.h"
 #include "sql_trigger.h"
-#include "backup/debug.h"
 
 /**
   Implement DELETE SQL word.
diff -Nrup a/sql/sql_insert.cc b/sql/sql_insert.cc
--- a/sql/sql_insert.cc	2008-06-05 21:17:53 +02:00
+++ b/sql/sql_insert.cc	2008-06-06 16:03:15 +02:00
@@ -61,7 +61,6 @@
 #include "sql_show.h"
 #include "slave.h"
 #include "rpl_mi.h"
-#include "backup/debug.h"
 #include "sql_audit.h"
 
 #ifndef EMBEDDED_LIBRARY
diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc	2008-06-05 21:17:53 +02:00
+++ b/sql/sql_parse.cc	2008-06-06 16:03:15 +02:00
@@ -28,7 +28,6 @@
 #include "events.h"
 #include "sql_trigger.h"
 #include <ddl_blocker.h>
-#include "backup/debug.h"
 #include "sql_audit.h"
 
 #ifdef BACKUP_TEST
Thread
bk commit into 6.0 tree (istruewing:1.2629)Ingo Struewing6 Jun