=== modified file 'sql/ha_partition.cc' --- sql/ha_partition.cc 2010-01-19 16:02:51 +0000 +++ sql/ha_partition.cc 2010-01-26 15:06:22 +0000 @@ -58,6 +58,10 @@ #include +#if defined(ENABLED_DEBUG_SYNC) +#include "debug_sync.h" +#endif + static const char *ha_par_ext= ".par"; #ifdef NOT_USED static int free_share(PARTITION_SHARE * share); @@ -690,6 +694,7 @@ DBUG_ASSERT(!strcmp(path, get_canonical_filename(m_file[0], path, norm_name_buff))); + DEBUG_SYNC(ha_thd(), "before_rename_partitions"); if (temp_partitions) { /* @@ -2597,6 +2602,7 @@ DBUG_RETURN(0); err_handler: + DEBUG_SYNC(ha_thd(), "partition_open_error"); while (file-- != m_file) (*file)->close(); bitmap_free(&m_bulk_insert_started); === modified file 'sql/sql_base.cc' --- sql/sql_base.cc 2010-01-24 07:03:23 +0000 +++ sql/sql_base.cc 2010-01-26 14:57:59 +0000 @@ -29,6 +29,9 @@ #ifdef __WIN__ #include #endif +#if defined(ENABLED_DEBUG_SYNC) +#include "debug_sync.h" +#endif #define FLAGSTR(S,F) ((S) & (F) ? #F " " : "") @@ -1244,6 +1247,7 @@ table->s->table_name.str, (long) table)); #endif + DEBUG_SYNC(thd, "before_close_thread_tables"); /* We are assuming here that thd->derived_tables contains ONLY derived tables for this substatement. i.e. instead of approach which uses === modified file 'sql/sql_show.cc' --- sql/sql_show.cc 2010-01-22 10:58:21 +0000 +++ sql/sql_show.cc 2010-01-26 15:55:48 +0000 @@ -30,6 +30,9 @@ #include "event_data_objects.h" #endif #include +#if defined(ENABLED_DEBUG_SYNC) +#include "debug_sync.h" +#endif #define STR_OR_NIL(S) ((S) ? (S) : "") @@ -3447,8 +3450,13 @@ lex->sql_command= SQLCOM_SHOW_FIELDS; show_table_list->i_s_requested_object= schema_table->i_s_requested_object; + DEBUG_SYNC(thd, "before_open_in_get_all_tables"); res= open_normal_and_derived_tables(thd, show_table_list, +#if 1 + 0); +#else MYSQL_LOCK_IGNORE_FLUSH); +#endif lex->sql_command= save_sql_command; /* XXX: show_table_list has a flag i_is_requested,