Skip to content

Commit

Permalink
Tweak some cmake switches to enable more things
Browse files Browse the repository at this point in the history
Both mysql/mariadb:
WITH_ASAN=ON adress sanitization
WITH_LIBWRAP=ON tcp wrappers

Mysql only:
ENABLED_PROFILING=OFF profiling disable
ENABLE_DEBUG_SYNC=OFF debug testing sync disable
WITH_PIC=ON by default we want pic generated binaries
  • Loading branch information
Tomáš Chvátal committed Jul 21, 2015
1 parent 984792b commit 67896a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions common/mysql.spec.in
Expand Up @@ -352,14 +352,19 @@ EXTRA_FLAGS="${EXTRA_FLAGS} -Wno-error"
export CFLAGS="%{optflags} -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS"
export CXXFLAGS="$CFLAGS -felide-constructors"
%cmake -DWITH_SSL=system \
-DWITH_ASAN=ON \
-DWITH_LIBWRAP=ON \
-DENABLED_PROFILING=OFF \
-DENABLE_DEBUG_SYNC=OFF \
-DWITH_PIC=ON \
-DWITH_ZLIB=system \
-DWITH_LIBEVENT=system \
-DWITH_JEMALLOC=auto \
-DWITH_READLINE=0 \
-DWITH_LIBEDIT=0 \
-DWITH_EDITLINE=system \
-DINSTALL_LAYOUT=RPM \
-DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \
-DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \
-DINSTALL_UNIX_ADDRDIR="%{_localstatedir}/run/mysql/mysql.sock" \
-DINSTALL_MYSQLSHAREDIR=share/%{name} \
-DWITH_COMMENT="openSUSE MySQL rpm" \
Expand All @@ -384,7 +389,8 @@ export CXXFLAGS="$CFLAGS -felide-constructors"
-DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$CFLAGS" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DINSTALL_SQLBENCHDIR=share \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DINSTALL_SQLBENCHDIR=share \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
Expand Down

4 comments on commit 67896a3

@archon810
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scarabeusiv What is the reason for disabling profiling, a very useful feature present in MySQL for a long time and enabled by default by MySQL itself?

Please see https://bugzilla.opensuse.org/show_bug.cgi?id=981215 and consider re-enabling it.

I don't think there's much performance benefit to disabling it since it needs to be enabled manually before profiling information is collected for queries you want to profile, and more importantly, there's no way to actually enable it at all via some package in YaST - it needs to be compiled in.

@scarabeusiv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well feel free to create pullrequest enabling it back with refference to your bugreport.
I didn't check if it was variable controled I just tried it with profiling enabled and it was slow :)

@archon810
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scarabeusiv Thanks for your reply. Do you have a reference for the slow claims - benchmark result comparisons?

According to https://dev.mysql.com/doc/refman/5.6/en/show-profile.html

Profiling is controlled by the profiling session variable, which has a default value of 0 (OFF). Profiling is enabled by setting profiling to 1 or ON: mysql> SET profiling = 1;

I'll create a PR and reference the above and the bug report.

@archon810
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR: #43.

Please sign in to comment.