diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-06-14 11:46:37 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-07-04 01:44:46 +0200 |
commit | d2b852b4ca326f2a47ba1f51cd27e04a9954aa0d (patch) | |
tree | de9e9d52dc03343a17150c008fe8797dc213dbe6 /storage | |
parent | 7d75e4326170ab3b22de0365b4b093ea6bc24285 (diff) | |
download | mariadb-git-d2b852b4ca326f2a47ba1f51cd27e04a9954aa0d.tar.gz |
cleanup, less #ifdef's
Diffstat (limited to 'storage')
-rw-r--r-- | storage/example/ha_example.cc | 4 | ||||
-rw-r--r-- | storage/heap/ha_heap.cc | 2 | ||||
-rw-r--r-- | storage/heap/heapdef.h | 2 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 2 | ||||
-rw-r--r-- | storage/myisam/myisamdef.h | 2 |
5 files changed, 6 insertions, 6 deletions
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; |