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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
98a67ecc
Commit
98a67ecc
authored
Dec 16, 2019
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21327 : MDL wait notification for innodb background threadpool
parent
508bc20a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
libmysqld/CMakeLists.txt
libmysqld/CMakeLists.txt
+2
-1
sql/CMakeLists.txt
sql/CMakeLists.txt
+3
-6
sql/mdl.cc
sql/mdl.cc
+4
-0
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+2
-2
No files found.
libmysqld/CMakeLists.txt
View file @
98a67ecc
...
...
@@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES(
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/libmysqld
${
CMAKE_SOURCE_DIR
}
/sql
${
CMAKE_SOURCE_DIR
}
/tpool
${
CMAKE_BINARY_DIR
}
/sql
${
PCRE_INCLUDES
}
${
ZLIB_INCLUDE_DIR
}
...
...
@@ -456,7 +457,7 @@ IF(NOT DISABLE_SHARED)
SET_TARGET_PROPERTIES
(
libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
TARGET_LINK_LIBRARIES
(
libmysqld
${
CRC32_LIBRARY
}
)
SET_TARGET_PROPERTIES
(
mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
TARGET_LINK_LIBRARIES
(
mysqlserver
${
CRC32_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
mysqlserver
${
CRC32_LIBRARY
}
tpool
)
IF
(
LIBMYSQLD_SO_EXTRA_LIBS
)
TARGET_LINK_LIBRARIES
(
libmysqld
${
LIBMYSQLD_SO_EXTRA_LIBS
}
)
ENDIF
()
...
...
sql/CMakeLists.txt
View file @
98a67ecc
...
...
@@ -44,18 +44,14 @@ ENDIF()
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/sql
${
CMAKE_SOURCE_DIR
}
/sql
${
PCRE_INCLUDES
}
${
ZLIB_INCLUDE_DIR
}
${
SSL_INCLUDE_DIRS
}
${
CMAKE_BINARY_DIR
}
/sql
${
CMAKE_SOURCE_DIR
}
/tpool
)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/lex_token.h
COMMAND gen_lex_token > lex_token.h
...
...
@@ -194,6 +190,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
DTRACE_INSTRUMENT
(
sql
)
TARGET_LINK_LIBRARIES
(
sql
mysys mysys_ssl dbug strings vio pcre2-8
tpool
${
LIBWRAP
}
${
LIBCRYPT
}
${
LIBDL
}
${
CMAKE_THREAD_LIBS_INIT
}
${
SSL_LIBRARIES
}
${
LIBSYSTEMD
}
)
...
...
sql/mdl.cc
View file @
98a67ecc
...
...
@@ -24,6 +24,8 @@
#include <mysql/plugin.h>
#include <mysql/service_thd_wait.h>
#include <mysql/psi/mysql_stage.h>
#include <tpool.h>
#ifdef HAVE_PSI_INTERFACE
static
PSI_mutex_key
key_MDL_wait_LOCK_wait_status
;
...
...
@@ -1125,6 +1127,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
owner
->
ENTER_COND
(
&
m_COND_wait_status
,
&
m_LOCK_wait_status
,
wait_state_name
,
&
old_stage
);
thd_wait_begin
(
NULL
,
THD_WAIT_META_DATA_LOCK
);
tpool
::
tpool_wait_begin
();
while
(
!
m_wait_status
&&
!
owner
->
is_killed
()
&&
wait_result
!=
ETIMEDOUT
&&
wait_result
!=
ETIME
)
{
...
...
@@ -1147,6 +1150,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
wait_result
=
mysql_cond_timedwait
(
&
m_COND_wait_status
,
&
m_LOCK_wait_status
,
abs_timeout
);
}
tpool
::
tpool_wait_end
();
thd_wait_end
(
NULL
);
if
(
m_wait_status
==
EMPTY
)
...
...
storage/innobase/CMakeLists.txt
View file @
98a67ecc
...
...
@@ -155,8 +155,7 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
${
CRC32_LIBRARY
}
${
NUMA_LIBRARY
}
${
LIBSYSTEMD
}
${
LINKER_SCRIPT
}
tpool
)
${
LINKER_SCRIPT
}
)
IF
(
NOT TARGET innobase
)
RETURN
()
...
...
@@ -194,5 +193,6 @@ IF(MSVC)
ENDIF
()
IF
(
NOT
(
PLUGIN_INNOBASE STREQUAL DYNAMIC
))
TARGET_LINK_LIBRARIES
(
innobase tpool
)
ADD_SUBDIRECTORY
(
${
CMAKE_SOURCE_DIR
}
/extra/mariabackup
${
CMAKE_BINARY_DIR
}
/extra/mariabackup
)
ENDIF
()
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