List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:December 12 2008 11:27am
Subject:bzr commit into mysql-6.0-runtime branch (davi:2780)
View as plain text  
# At a local mysql-6.0-runtime repository of davi

 2780 Davi Arnaut	2008-12-12
      Move the debug sync interface to its own self-sufficient header.
      This allows the debug sync interface to be utilized from files
      that don't include mysql_priv.h
modified:
  sql/Makefile.am
  sql/backup/be_default.cc
  sql/backup/be_snapshot.cc
  sql/backup/logger.h
  sql/ddl_blocker.cc
  sql/debug_sync.cc
  sql/handler.cc
  sql/item_func.cc
  sql/lock.cc
  sql/mysql_priv.h
  sql/mysqld.cc
  sql/sql_base.cc
  sql/sql_class.cc
  sql/sql_delete.cc
  sql/sql_insert.cc
  sql/sql_parse.cc
  sql/sql_repl.cc
  sql/sql_table.cc
  storage/myisam/myisam_backup_engine.cc
  storage/myisammrg/ha_myisammrg.cc

per-file messages:
  sql/Makefile.am
    Add debug_sync.h
  sql/backup/be_default.cc
    Include debug_sync.h
  sql/backup/be_snapshot.cc
    Include debug_sync.h
  sql/backup/logger.h
    Include debug_sync.h
  sql/ddl_blocker.cc
    Include debug_sync.h
  sql/debug_sync.cc
    Interface is now defined in the debug_sync.h header.
  sql/handler.cc
    Include debug_sync.h
  sql/item_func.cc
    Include debug_sync.h
  sql/lock.cc
    Include debug_sync.h
  sql/mysql_priv.h
    Move debug sync interfaces to debug_sync.h
  sql/mysqld.cc
    Include debug_sync.h
  sql/sql_base.cc
    Include debug_sync.h
  sql/sql_class.cc
    Include debug_sync.h
  sql/sql_delete.cc
    Include debug_sync.h
  sql/sql_insert.cc
    Include debug_sync.h
  sql/sql_parse.cc
    Include debug_sync.h
  sql/sql_repl.cc
    Include debug_sync.h
  sql/sql_table.cc
    Include debug_sync.h
  storage/myisam/myisam_backup_engine.cc
    Include debug_sync.h
  storage/myisammrg/ha_myisammrg.cc
    Include debug_sync.h
=== modified file 'sql/Makefile.am'
--- a/sql/Makefile.am	2008-12-03 16:53:23 +0000
+++ b/sql/Makefile.am	2008-12-12 11:26:54 +0000
@@ -99,7 +99,7 @@ noinst_HEADERS =	item.h item_func.h item
 			probes.h sql_audit.h transaction.h \
 			contributors.h sql_servers.h ddl_blocker.h \
 			si_objects.h si_logs.h sql_plist.h mdl.h records.h \
-			rpl_handler.h replication.h sql_prepare.h
+			rpl_handler.h replication.h sql_prepare.h debug_sync.h
 
 mysqld_SOURCES =	sql_lex.cc sql_handler.cc sql_partition.cc \
 			item.cc item_sum.cc item_buff.cc item_func.cc \

=== modified file 'sql/backup/be_default.cc'
--- a/sql/backup/be_default.cc	2008-09-09 08:19:21 +0000
+++ b/sql/backup/be_default.cc	2008-12-12 11:26:54 +0000
@@ -68,6 +68,7 @@
 #include "be_default.h"
 #include "backup_aux.h"
 #include "rpl_record.h"
+#include "debug_sync.h"
 
 namespace default_backup {
 

=== modified file 'sql/backup/be_snapshot.cc'
--- a/sql/backup/be_snapshot.cc	2008-10-30 12:29:54 +0000
+++ b/sql/backup/be_snapshot.cc	2008-12-12 11:26:54 +0000
@@ -45,6 +45,7 @@
 #include "be_snapshot.h"
 #include "backup_aux.h"
 #include "transaction.h"
+#include "debug_sync.h"
 
 namespace snapshot_backup {
 

=== modified file 'sql/backup/logger.h'
--- a/sql/backup/logger.h	2008-11-14 15:02:10 +0000
+++ b/sql/backup/logger.h	2008-12-12 11:26:54 +0000
@@ -6,6 +6,7 @@
 #include <backup/error.h>
 #include "si_logs.h"
 #include "rpl_mi.h"
+#include "debug_sync.h"
 
 namespace backup {
 

=== modified file 'sql/ddl_blocker.cc'
--- a/sql/ddl_blocker.cc	2008-11-21 19:35:55 +0000
+++ b/sql/ddl_blocker.cc	2008-12-12 11:26:54 +0000
@@ -28,6 +28,7 @@
   */
 
 #include "ddl_blocker.h"
+#include "debug_sync.h"
 
 DDL_blocker_class *DDL_blocker_class::m_instance= NULL;
 

=== modified file 'sql/debug_sync.cc'
--- a/sql/debug_sync.cc	2008-11-20 11:01:12 +0000
+++ b/sql/debug_sync.cc	2008-12-12 11:26:54 +0000
@@ -206,10 +206,12 @@
   See also worklog entry WL#4259 - Test Synchronization Facility
 */
 
-#include "mysql_priv.h"
+#include "debug_sync.h"
 
 #if defined(ENABLED_DEBUG_SYNC)
 
+#include "mysql_priv.h"
+
 /*
   Action to perform at a synchronization point.
   NOTE: This structure is moved around in memory by realloc(), qsort(),

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-12-08 11:29:15 +0000
+++ b/sql/handler.cc	2008-12-12 11:26:54 +0000
@@ -24,6 +24,7 @@
 #endif
 
 #include "mysql_priv.h"
+#include "debug_sync.h"
 #include "rpl_filter.h"
 #include <myisampack.h>
 #include "myisam.h"

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2008-11-28 11:40:40 +0000
+++ b/sql/item_func.cc	2008-12-12 11:26:54 +0000
@@ -37,6 +37,7 @@
 #include "sp_head.h"
 #include "sp_rcontext.h"
 #include "sp.h"
+#include "debug_sync.h"
 
 #ifdef NO_EMBEDDED_ACCESS_CHECKS
 #define sp_restore_security_context(A,B) while (0) {}

=== modified file 'sql/lock.cc'
--- a/sql/lock.cc	2008-10-23 16:29:52 +0000
+++ b/sql/lock.cc	2008-12-12 11:26:54 +0000
@@ -75,6 +75,7 @@
 
 #include "mysql_priv.h"
 #include "transaction.h"
+#include "debug_sync.h"
 #include <hash.h>
 #include <assert.h>
 

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2008-12-08 11:29:15 +0000
+++ b/sql/mysql_priv.h	2008-12-12 11:26:54 +0000
@@ -598,42 +598,6 @@ enum open_table_mode
 
 /* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
 #define UNDEF_POS (-1)
-#ifdef EXTRA_DEBUG
-/**
-  Sync points allow us to force the server to reach a certain line of code
-  and block there until the client tells the server it is ok to go on.
-  The client tells the server to block with SELECT GET_LOCK()
-  and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
-  concurrency problems
-*/
-#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
- debug_sync_point(lock_name,lock_timeout)
-void debug_sync_point(const char* lock_name, uint lock_timeout);
-#else
-#define DBUG_SYNC_POINT(lock_name,lock_timeout)
-#endif /* EXTRA_DEBUG */
-
-/* Debug Sync Facility. */
-#if defined(ENABLED_DEBUG_SYNC)
-/* Macro to be put in the code at synchronization points. */
-#define DEBUG_SYNC(_thd_, _sync_point_name_)                            \
-          do { if (unlikely(opt_debug_sync_timeout))                    \
-               debug_sync(_thd_, STRING_WITH_LEN(_sync_point_name_));   \
-             } while (0)
-/* Command line option --debug-sync-timeout. See mysqld.cc. */
-extern uint opt_debug_sync_timeout;
-/* Default WAIT_FOR timeout if command line option is given without argument. */
-#define DEBUG_SYNC_DEFAULT_WAIT_TIMEOUT 300
-/* Debug Sync prototypes. See debug_sync.cc. */
-extern int  debug_sync_init(void);
-extern void debug_sync_end(void);
-extern void debug_sync_init_thread(THD *thd);
-extern void debug_sync_end_thread(THD *thd);
-extern void debug_sync(THD *thd, const char *sync_point_name, size_t name_len);
-#else /* defined(ENABLED_DEBUG_SYNC) */
-#define DEBUG_SYNC(_thd_, _sync_point_name_)    /* disabled DEBUG_SYNC */
-#endif /* defined(ENABLED_DEBUG_SYNC) */
-
 #define BACKUP_WAIT_TIMEOUT_DEFAULT 50;
 
 /* BINLOG_DUMP options */

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2008-12-08 11:29:15 +0000
+++ b/sql/mysqld.cc	2008-12-12 11:26:54 +0000
@@ -28,6 +28,7 @@
 #include "events.h"
 #include "ddl_blocker.h"
 #include "sql_audit.h"
+#include "debug_sync.h"
 #include <waiting_threads.h>
 
 #include "../storage/myisam/ha_myisam.h"

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2008-12-08 11:29:15 +0000
+++ b/sql/sql_base.cc	2008-12-12 11:26:54 +0000
@@ -17,6 +17,7 @@
 /* Basic functions needed by many modules */
 
 #include "mysql_priv.h"
+#include "debug_sync.h"
 #include "sql_select.h"
 #include "sp_head.h"
 #include "sp.h"

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2008-12-08 11:29:15 +0000
+++ b/sql/sql_class.cc	2008-12-12 11:26:54 +0000
@@ -43,6 +43,7 @@
 #include "sp_rcontext.h"
 #include "sp_cache.h"
 #include "transaction.h"
+#include "debug_sync.h"
 
 /*
   The following is used to initialise Table_ident with a internal

=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc	2008-11-06 18:39:27 +0000
+++ b/sql/sql_delete.cc	2008-12-12 11:26:54 +0000
@@ -20,6 +20,7 @@
 */
 
 #include "mysql_priv.h"
+#include "debug_sync.h"
 #include "sql_select.h"
 #include "sp_head.h"
 #include "sql_trigger.h"

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2008-12-04 16:50:07 +0000
+++ b/sql/sql_insert.cc	2008-12-12 11:26:54 +0000
@@ -63,6 +63,7 @@
 #include "rpl_mi.h"
 #include "sql_audit.h"
 #include "transaction.h"
+#include "debug_sync.h"
 
 #ifndef EMBEDDED_LIBRARY
 static bool delayed_get_table(THD *thd, TABLE_LIST *table_list);

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2008-12-10 21:53:59 +0000
+++ b/sql/sql_parse.cc	2008-12-12 11:26:54 +0000
@@ -32,6 +32,7 @@
 #include "sql_audit.h"
 #include "transaction.h"
 #include "sql_prepare.h"
+#include "debug_sync.h"
 
 #ifdef BACKUP_TEST
 #include "backup/backup_test.h"

=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc	2008-11-24 20:46:11 +0000
+++ b/sql/sql_repl.cc	2008-12-12 11:26:54 +0000
@@ -22,6 +22,7 @@
 #include "rpl_filter.h"
 #include <my_dir.h>
 #include "rpl_handler.h"
+#include "debug_sync.h"
 
 int max_binlog_dump_events = 0; // unlimited
 my_bool opt_sporadic_binlog_dump_fail = 0;

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2008-12-08 11:29:15 +0000
+++ b/sql/sql_table.cc	2008-12-12 11:26:54 +0000
@@ -16,6 +16,7 @@
 /* drop and alter of tables */
 
 #include "mysql_priv.h"
+#include "debug_sync.h"
 #include <hash.h>
 #include <myisam.h>
 #include <my_dir.h>

=== modified file 'storage/myisam/myisam_backup_engine.cc'
--- a/storage/myisam/myisam_backup_engine.cc	2008-08-11 16:06:30 +0000
+++ b/storage/myisam/myisam_backup_engine.cc	2008-12-12 11:26:54 +0000
@@ -27,6 +27,7 @@
 #include "myisamdef.h" // to access dfile and kfile
 #include "backup/backup_engine.h"
 #include "backup/backup_aux.h"         // for build_table_list()
+#include "debug_sync.h"
 #include <hash.h>
 
 /**

=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc	2008-10-20 09:16:47 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc	2008-12-12 11:26:54 +0000
@@ -96,7 +96,7 @@
 #include "../myisam/ha_myisam.h"
 #include "ha_myisammrg.h"
 #include "myrg_def.h"
-
+#include "debug_sync.h"
 
 static handler *myisammrg_create_handler(handlerton *hton,
                                          TABLE_SHARE *table,

Thread
bzr commit into mysql-6.0-runtime branch (davi:2780) Davi Arnaut12 Dec