summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_table.cc5
-rw-r--r--sql/wsrep_mysqld.h1
-rw-r--r--storage/example/ha_example.cc4
-rw-r--r--storage/heap/ha_heap.cc2
-rw-r--r--storage/heap/heapdef.h2
-rw-r--r--storage/myisam/ha_myisam.cc2
-rw-r--r--storage/myisam/myisamdef.h2
7 files changed, 8 insertions, 10 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index f091fd29303..d6277e838be 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -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
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index 3347a94cdd6..51c23085717 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -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 */
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index 3bfe1e5e27b..cf259a7e80d 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -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;
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index ee2c9f0d916..f195264ce7f 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -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;
diff --git a/storage/heap/heapdef.h b/storage/heap/heapdef.h
index 6136a90f0aa..ffd5382b6f7 100644
--- a/storage/heap/heapdef.h
+++ b/storage/heap/heapdef.h
@@ -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
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 448aab0a092..e7ca765351b 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -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)
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index 640a04fb3df..f48d1078000 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -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;