Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7c61679c
Commit
7c61679c
authored
Jun 22, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4685 Compile error on LFS
fix the code to compile w/o perfomance schema
parent
7cc77106
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
plugin/feedback/feedback.cc
plugin/feedback/feedback.cc
+6
-0
plugin/sql_errlog/sql_logger.cc
plugin/sql_errlog/sql_logger.cc
+4
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-0
sql/threadpool_common.cc
sql/threadpool_common.cc
+8
-0
sql/threadpool_unix.cc
sql/threadpool_unix.cc
+4
-0
No files found.
plugin/feedback/feedback.cc
View file @
7c61679c
...
...
@@ -38,6 +38,7 @@ mysql_cond_t sleep_condition;
volatile
bool
shutdown_plugin
;
static
pthread_t
sender_thread
;
#ifdef HAVE_PSI_INTERFACE
static
PSI_mutex_key
key_sleep_mutex
;
static
PSI_mutex_info
mutex_list
[]
=
{{
&
key_sleep_mutex
,
"sleep_mutex"
,
PSI_FLAG_GLOBAL
}};
...
...
@@ -49,6 +50,7 @@ static PSI_cond_info cond_list[]=
static
PSI_thread_key
key_sender_thread
;
static
PSI_thread_info
thread_list
[]
=
{{
&
key_sender_thread
,
"sender_thread"
,
0
}};
#endif
Url
**
urls
;
///< list of urls to send the report to
uint
url_count
;
...
...
@@ -231,8 +233,12 @@ static int init(void *p)
i_s_feedback
->
fill_table
=
fill_feedback
;
///< how to fill the I_S table
i_s_feedback
->
idx_field1
=
0
;
///< virtual index on the 1st col
#ifdef HAVE_PSI_INTERFACE
#define PSI_register(X) \
if(PSI_server) PSI_server->register_ ## X("feedback", X ## _list, array_elements(X ## _list))
#else
#define PSI_register(X)
/* no-op */
#endif
PSI_register
(
mutex
);
PSI_register
(
cond
);
...
...
plugin/sql_errlog/sql_logger.cc
View file @
7c61679c
...
...
@@ -21,10 +21,12 @@
extern
MYSQL_PLUGIN_IMPORT
char
*
mysql_data_home
;
#ifdef HAVE_PSI_INTERFACE
/* These belong to the service initialization */
static
PSI_mutex_key
key_LOCK_logger_service
;
static
PSI_mutex_info
mutex_list
[]
=
{{
&
key_LOCK_logger_service
,
"logger_service_file_st::lock"
,
PSI_FLAG_GLOBAL
}};
#endif
typedef
struct
logger_handle_st
{
File
file
;
...
...
@@ -188,7 +190,9 @@ int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...)
void
init_logger_mutexes
()
{
#ifdef HAVE_PSI_INTERFACE
if
(
PSI_server
)
PSI_server
->
register_mutex
(
"sql_logger"
,
mutex_list
,
1
);
#endif
}
sql/mysqld.cc
View file @
7c61679c
...
...
@@ -1766,7 +1766,9 @@ static void mysqld_exit(int exit_code)
clean_up_mutexes
();
clean_up_error_log_mutex
();
my_end
((
opt_endinfo
?
MY_CHECK_ERROR
|
MY_GIVE_INFO
:
0
));
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
shutdown_performance_schema
();
// we do it as late as possible
#endif
exit
(
exit_code
);
/* purecov: inspected */
}
...
...
sql/threadpool_common.cc
View file @
7c61679c
...
...
@@ -72,14 +72,18 @@ struct Worker_thread_context
void
save
()
{
#ifdef HAVE_PSI_INTERFACE
psi_thread
=
PSI_server
?
PSI_server
->
get_thread
()
:
0
;
#endif
mysys_var
=
(
st_my_thread_var
*
)
pthread_getspecific
(
THR_KEY_mysys
);
}
void
restore
()
{
#ifdef HAVE_PSI_INTERFACE
if
(
PSI_server
)
PSI_server
->
set_thread
(
psi_thread
);
#endif
pthread_setspecific
(
THR_KEY_mysys
,
mysys_var
);
pthread_setspecific
(
THR_THD
,
0
);
pthread_setspecific
(
THR_MALLOC
,
0
);
...
...
@@ -95,8 +99,10 @@ static bool thread_attach(THD* thd)
pthread_setspecific
(
THR_KEY_mysys
,
thd
->
mysys_var
);
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
#ifdef HAVE_PSI_INTERFACE
if
(
PSI_server
)
PSI_server
->
set_thread
(
thd
->
event_scheduler
.
m_psi
);
#endif
return
0
;
}
...
...
@@ -123,11 +129,13 @@ int threadpool_add_connection(THD *thd)
}
/* Create new PSI thread for use with the THD. */
#ifdef HAVE_PSI_INTERFACE
if
(
PSI_server
)
{
thd
->
event_scheduler
.
m_psi
=
PSI_server
->
new_thread
(
key_thread_one_connection
,
thd
,
thd
->
thread_id
);
}
#endif
/* Login. */
...
...
sql/threadpool_unix.cc
View file @
7c61679c
...
...
@@ -52,6 +52,7 @@ static bool threadpool_started= false;
*/
#ifdef HAVE_PSI_INTERFACE
static
PSI_mutex_key
key_group_mutex
;
static
PSI_mutex_key
key_timer_mutex
;
static
PSI_mutex_info
mutex_list
[]
=
...
...
@@ -79,6 +80,9 @@ static PSI_thread_info thread_list[] =
/* Macro to simplify performance schema registration */
#define PSI_register(X) \
if(PSI_server) PSI_server->register_ ## X("threadpool", X ## _list, array_elements(X ## _list))
#else
#define PSI_register(X)
/* no-op */
#endif
struct
thread_group_t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment