Skip to content

Commit cdae3c3

Browse files
author
Tor Didriksen
committed
Bug#18363910 SKIP MAIN.PLUGIN_LOAD AND MAIN.PLUGIN_LOAD_OPTIONS ON WINDOWS EMBEDDED
The tests plugin_load and plugin_load_options will pre-load the plugin *before* the test is started, so the 'skip this on windows' logic is executed too late. Plugin initialization fails because the embedded server is compiled without performance schema, and the plugin is compiled with performance schema. In this case, mysql_mutex_register has two different implementations, breaking the "one-definition-rule". The trick of mapping PSI_server to PSI_noop works on most platforms, but not windows. Solution: remove the mutex registration code, the mutex was unused anyways.
1 parent da4803a commit cdae3c3

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

mysql-test/t/disabled.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this le
1616
ds_mrr-big @solaris : Bug#14168107 2012-04-03 Hemant disabled new test added by Olav Sandstå,since this leads to timeout on Solaris on slow sparc servers
1717
mysql_embedded_client_test : Bug#13964673 2012-04-16 amitbha since most of the test cases are failing
1818
mysql_client_test_embedded : Bug#16084066 2013-01-08 Disabled since this test is failing
19-
main.plugin_load @windows : Bug#18363910 2014-02-07 Anitha Test crashing on windows after fix for bug#17772560
20-
main.plugin_load_option @windows : Bug#18363910 2014-02-07 Anitha Test crashing on windows after fix for bug#17772560

storage/example/ha_example.cc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -104,40 +104,17 @@ static const char* example_system_database();
104104
static bool example_is_supported_system_table(const char *db,
105105
const char *table_name,
106106
bool is_sql_layer_system_table);
107-
#ifdef HAVE_PSI_INTERFACE
108-
static PSI_mutex_key ex_key_mutex_Example_share_mutex;
109-
110-
static PSI_mutex_info all_example_mutexes[]=
111-
{
112-
{ &ex_key_mutex_Example_share_mutex, "Example_share::mutex", 0}
113-
};
114-
115-
static void init_example_psi_keys()
116-
{
117-
const char* category= "example";
118-
int count;
119-
120-
count= array_elements(all_example_mutexes);
121-
mysql_mutex_register(category, all_example_mutexes, count);
122-
}
123-
#endif
124107

125108
Example_share::Example_share()
126109
{
127110
thr_lock_init(&lock);
128-
mysql_mutex_init(ex_key_mutex_Example_share_mutex,
129-
&mutex, MY_MUTEX_INIT_FAST);
130111
}
131112

132113

133114
static int example_init_func(void *p)
134115
{
135116
DBUG_ENTER("example_init_func");
136117

137-
#ifdef HAVE_PSI_INTERFACE
138-
init_example_psi_keys();
139-
#endif
140-
141118
example_hton= (handlerton *)p;
142119
example_hton->state= SHOW_OPTION_YES;
143120
example_hton->create= example_create_handler;

storage/example/ha_example.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -42,13 +42,11 @@
4242
*/
4343
class Example_share : public Handler_share {
4444
public:
45-
mysql_mutex_t mutex;
4645
THR_LOCK lock;
4746
Example_share();
4847
~Example_share()
4948
{
5049
thr_lock_delete(&lock);
51-
mysql_mutex_destroy(&mutex);
5250
}
5351
};
5452

0 commit comments

Comments
 (0)