Skip to content

Commit bdd9d86

Browse files
author
Olav Sandstaa
committed
WL#7315 Optimizer cost model: main memory management of cost constants
Follow-up patch: Fix compile failure in unit tests when compiling without performance schema. The fix is to remove the PSI_mutex_key object from being included in the unit tests. This is no longer needed since the unit test no longer needs to link in ha_resolve_by_name().
1 parent dc4b004 commit bdd9d86

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

unittest/gunit/test_utils.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
#include "mysqld_thd_manager.h" // Global_THD_manager
2323
#include "opt_costconstantcache.h" // optimizer cost constant cache
2424

25-
/*
26-
These are needed in order to call ha_resolve_by_name().
27-
*/
28-
extern mysql_mutex_t LOCK_plugin;
29-
static PSI_mutex_key key_LOCK_plugin;
30-
3125
namespace my_testing {
3226

3327
int chars_2_decimal(const char *chars, my_decimal *to)
@@ -64,7 +58,6 @@ void setup_server_for_unit_tests()
6458
// Initialize Query_logger last, to avoid spurious warnings to stderr.
6559
query_logger.init();
6660
init_optimizer_cost_module();
67-
mysql_mutex_init(key_LOCK_plugin, &LOCK_plugin, MY_MUTEX_INIT_FAST);
6861
}
6962

7063
void teardown_server_for_unit_tests()
@@ -76,7 +69,6 @@ void teardown_server_for_unit_tests()
7669
mysql_mutex_destroy(&LOCK_error_log);
7770
query_logger.cleanup();
7871
delete_optimizer_cost_module();
79-
mysql_mutex_destroy(&LOCK_plugin);
8072
}
8173

8274
void Server_initializer::set_expected_error(uint val)

0 commit comments

Comments
 (0)