Commit d2b852b4 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup, less #ifdef's

parent 7d75e432
......@@ -2443,14 +2443,11 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
}
else
{
#ifdef WITH_WSREP
if (WSREP(thd) &&
!wsrep_should_replicate_ddl(thd, table_type->db_type))
if (WSREP(thd) && !wsrep_should_replicate_ddl(thd, table_type->db_type))
{
error= 1;
goto err;
}
#endif
/*
It could happen that table's share in the table definition cache
......
......@@ -627,6 +627,7 @@ enum wsrep::streaming_context::fragment_unit wsrep_fragment_unit(ulong unit);
#define wsrep_thr_deinit() do {} while(0)
#define wsrep_init_globals() do {} while(0)
#define wsrep_create_appliers(X) do {} while(0)
#define wsrep_should_replicate_ddl(X,Y) (1)
#endif /* WITH_WSREP */
......
......@@ -215,6 +215,8 @@ static void init_example_psi_keys()
count= array_elements(all_example_mutexes);
mysql_mutex_register(category, all_example_mutexes, count);
}
#else
static void init_example_psi_keys() { }
#endif
......@@ -252,9 +254,7 @@ static int example_init_func(void *p)
{
DBUG_ENTER("example_init_func");
#ifdef HAVE_PSI_INTERFACE
init_example_psi_keys();
#endif
example_hton= (handlerton *)p;
example_hton->create= example_create_handler;
......
......@@ -44,9 +44,7 @@ int heap_init(void *p)
{
handlerton *heap_hton;
#ifdef HAVE_PSI_INTERFACE
init_heap_psi_keys();
#endif
heap_hton= (handlerton *)p;
heap_hton->db_type= DB_TYPE_HEAP;
......
......@@ -110,6 +110,8 @@ extern PSI_memory_key hp_key_memory_HP_KEYDEF;
#ifdef HAVE_PSI_INTERFACE
void init_heap_psi_keys();
#else
#define init_heap_psi_keys() do { } while(0)
#endif /* HAVE_PSI_INTERFACE */
C_MODE_END
......
......@@ -2516,9 +2516,7 @@ static int myisam_init(void *p)
{
handlerton *hton;
#ifdef HAVE_PSI_INTERFACE
init_myisam_psi_keys();
#endif
/* Set global variables based on startup options */
if (myisam_recover_options && myisam_recover_options != HA_RECOVER_OFF)
......
......@@ -774,6 +774,8 @@ extern PSI_file_key mi_key_file_datatmp, mi_key_file_dfile, mi_key_file_kfile,
extern PSI_thread_key mi_key_thread_find_all_keys;
void init_myisam_psi_keys();
#else
#define init_myisam_psi_keys() do { } while(0)
#endif /* HAVE_PSI_INTERFACE */
extern PSI_memory_key mi_key_memory_MYISAM_SHARE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment