Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 22f87e4

Browse files
committedMay 21, 2018
Prepare branch for governor 1.3
1 parent fb9a51b commit 22f87e4

File tree

144 files changed

+1452
-211189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1452
-211189
lines changed
 

‎CMakeLists.txt

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
33
PROJECT(MYSQL_GOVERNOR C)
44

55
INCLUDE(CheckFunctionExists)
6+
INCLUDE(CheckIncludeFile)
67

78
CHECK_FUNCTION_EXISTS (mmap64 HAVE_MMAP64)
89

910
SET(CMAKE_BUILD_TYPE Debug)
1011
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
11-
#SET(MYSQL_INCLUDE_DIRS "/usr/include/mysql")
1212
FIND_PACKAGE(GLIB2 REQUIRED)
1313
FIND_PACKAGE(LibXml2 REQUIRED)
14-
#FIND_PACKAGE(MySQL REQUIRED)
1514

16-
#INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS})
1715
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
1816
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
19-
#LINK_LIBRARIES(${GLIB2_LIBRARIES} ${MYSQL_CLIENT_LIBS})
20-
#INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
2117
LINK_LIBRARIES(${GLIB2_LIBRARIES})
2218
LINK_LIBRARIES(${LIBXML2_LIBRARIES})
2319
LINK_LIBRARIES(pthread)
@@ -31,8 +27,8 @@ IF (${SYSTEMD_FLAG})
3127
LINK_LIBRARIES(systemd)
3228
ENDIF(${SYSTEMD_FLAG})
3329

34-
SET(EXECUTABLE_OUTPUT_PATH "bin")
35-
SET(LIBRARY_OUTPUT_PATH "lib")
30+
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin/")
31+
SET(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/lib/")
3632

3733
SET(SRC "${CMAKE_SOURCE_DIR}/src/")
3834
SET(config_SRC ${SRC}/governor_config.c ${SRC}/xml.c)
@@ -110,24 +106,50 @@ SET(dbctl_SRC ${SRC}/dbctl.c
110106
${SRC}/mysql_connector_common.c
111107
${config_SRC}
112108
)
113-
SET(governor_lib_src ${SRC}/dbgovernor_string_functions.c
114-
${SRC}/governor_write_data.c
115-
${SRC}/parce_proc_fs.c
116-
${SRC}/shared_memory.c
109+
110+
SET(governor_plugin_src ${SRC}/plugin.c
111+
${SRC}/dbgovernor_string_functions.c
112+
${SRC}/governor_write_data.c
113+
${SRC}/parce_proc_fs.c
114+
${SRC}/shared_memory.c
115+
${SRC}/dbuser_map.c
116+
${SRC}/calc_stats.c
117+
${SRC}/stats.c
118+
${SRC}/fifo_stats.c
119+
${SRC}/tick_generator.c
120+
${SRC}/governor_config.c
121+
${SRC}/xml.c
122+
${SRC}/log.c
123+
${SRC}/user_account.c
124+
${SRC}/commands.c
125+
${SRC}/log-decoder.c
126+
${SRC}/tid_table.c
127+
${SRC}/mysql_connector_common.c
128+
${SRC}/dlload.c
129+
${SRC}/getsysinfo.c
117130
)
118-
SET_SOURCE_FILES_PROPERTIES(${db_governor_SRC} ${dbtop_SRC} ${governor_lib_src} ${mysql_unfreeze_SRC} ${dbctl_SRC} PROPERTIES COMPILE_FLAGS "-DOK -ggdb -fstack-protector-all")
131+
132+
SET(governor_ld_src ${SRC}/ld.c)
133+
134+
SET_SOURCE_FILES_PROPERTIES(${db_governor_SRC} ${dbtop_SRC} ${mysql_unfreeze_SRC} ${dbctl_SRC} ${governor_plugin_src} $(governor_lib_src) ${governor_ld_src} PROPERTIES COMPILE_FLAGS "-DOK -ggdb -fstack-protector-all -DMYSQL_DYNAMIC_PLUGIN")
119135

120136
ADD_EXECUTABLE(db_governor ${db_governor_SRC})
121137
ADD_EXECUTABLE(dbtop ${dbtop_SRC})
122138
ADD_EXECUTABLE(mysql_unfreeze ${mysql_unfreeze_SRC})
123139
ADD_LIBRARY(governor SHARED ${governor_lib_src})
124140
ADD_EXECUTABLE(dbctl ${dbctl_SRC})
125141

142+
ADD_LIBRARY(governorplugin3 SHARED ${governor_plugin_src})
143+
ADD_LIBRARY(governorplugin4 SHARED ${governor_plugin_src})
144+
target_compile_definitions(governorplugin4 PRIVATE MYSQL_PLUGIN_AUDIT4=1)
145+
ADD_LIBRARY(governor SHARED ${governor_lib_src})
146+
ADD_LIBRARY(governorld SHARED ${governor_ld_src})
147+
126148
INSTALL(TARGETS db_governor dbtop mysql_unfreeze dbctl
127149
DESTINATION bin
128150
COMPONENT Runtime)
129151

130-
INSTALL(TARGETS governor
152+
INSTALL(TARGETS governor governorld governorplugin3 governorplugin4
131153
DESTINATION lib
132154
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
133155

‎clean.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/bash
2+
3+
rm -rf CMakeFiles bin lib *.cmake CMakeCache.txt Makefile

0 commit comments

Comments
 (0)
Please sign in to comment.