Commit graph

1952 commits

Author SHA1 Message Date
Marko Mäkelä
7d4077cc11 Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
Brandon Nesterenko
773cb726a8 MDEV-34348: MariaDB is violating clang-16 -Wcast-function-type-strict
This HEAD commit just makes cast-function-type-strict fatal.
It will stay at the HEAD, and prior commits contain the
actual fixes, organized by the part of the code that the fix
targets. Future changes will be force pushed to have their
fixes come before this HEAD.

This branch cherry-picks patches from daniel@mariadb.org
(in bb-10.5-MDEV-34508-ubsan-errors) which initially
incorporate the flag into the build, as well as fix some of
its findings.
2024-11-23 08:14:23 -07:00
Daniel Black
6456e437f2 MDEV-34348: Add cast-function-type-strict to warnings 2024-11-23 08:14:23 -07:00
Daniel Black
971a0ba23c MDEV-34408: Facilitate the addition of warnings into the build system
Create a MY_WARNING_FLAGS_NON_FATAL for testing warnings

Add -Weffc++ as no-error espect, disabling from rocksdb due
to excessive errors that will be corrected later.
2024-11-23 08:14:23 -07:00
Oleksandr Byelkin
f00711bba2 Merge branch '10.5' into 10.6 2024-10-29 14:20:03 +01:00
Kristian Nielsen
45537939e7 MDEV-34859: Pass thorugh -DWITH_BOOST_CONTEXT to libmariadb
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2024-10-22 09:37:13 +02:00
Sergei Golubchik
a20c79da13 MDEV-25633 MariaDB crashes when compiled with link time optimizations
don't force -static-libgcc in gcc builds

gcc can decide automatically if it's needed.
forcing static libgcc breaks lto.
2024-10-17 21:37:37 +02:00
Sergei Golubchik
3e3fdb25f1 better disable lto for libmysqld_exports.cc
e.g. also when -flto is set in CMAKE_CXX_FLAGS_RELWITHDEBINFO
2024-10-17 21:37:37 +02:00
Julius Goryavsky
41b036bff0 This commit adds package dependencies for socat
which is needed for testing galera.
2024-10-17 03:21:51 +02:00
Daniel Black
e927e28ebe Remove HAVE_BROKEN_REALPATH
Was only applicable to FreeBSD < ~5.1.9
per: 33173fbe82
2024-10-16 11:46:19 +11:00
Yuchen Pei
cd5577ba4a
Merge branch '10.5' into 10.6 2024-10-15 16:00:44 +11:00
Sergei Golubchik
d5f5062a48 our release packages on rhel8 use bundled readline
for historical reasons, but we keep doing it for compatibility
2024-10-14 13:09:20 +02:00
Yuchen Pei
60b93cdd30
Merge branch '10.5' into 10.6 2024-09-06 13:52:57 +10:00
Sergei Golubchik
566c22e814 pcre.cmake: always check the library with check_library_exists()
even if pkg-config has it. otherwise build dependencies
aren't detected.
2024-09-05 12:14:06 +10:00
Sergei Golubchik
b2ebe1cb7b MDEV-33091 pcre2 headers aren't found on Solaris
use pkg-config to find pcre2, if possible

rename PCRE_INCLUDES to use PKG_CHECK_MODULES naming, PCRE_INCLUDE_DIRS
2024-09-05 12:14:06 +10:00
Daniel Black
c991efd9c3 MDEV-34825 FreeBSD fails to build under clang natively
clang doesn't have /usr/local/lib in the path. As such
there are various depedency linkages that will fail.

For example pcre and libfmt.`
2024-09-05 12:14:06 +10:00
Marko Mäkelä
757c368139 Merge 10.5 into 10.6 2024-08-14 10:56:11 +03:00
Vladislav Vaintroub
b619be3569 Support -DCONC_WITH_SSL parameter passed to CMake
Usually it is not needed, but sometimes we need to testing interoperability,
e.g OpenSSL server / SCHANNEL client, or WolfSSL server / OpenSSL client.
2024-08-09 01:15:45 +02:00
Andre F de Miranda
83040474dc MDEV-34234: make lsof optional on RPM
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-08-04 17:44:08 +02:00
Oleksandr Byelkin
9af2caca33 Merge branch '10.5' into 10.6 2024-07-18 16:25:33 +02:00
Oleksandr Byelkin
7478fabcff new PCRE2-10.44 2024-07-17 13:04:24 +02:00
Oleksandr Byelkin
dcd8a64892 Merge branch '10.5' into 10.6 2024-07-03 13:27:23 +02:00
Daniel Black
54b7a879e9 MDEV-34313 WITHOUT_SERVER/WSREP postfix
Mismatched IF/ENDIF statements in cmake
caused a warning.
2024-06-29 10:24:09 +10:00
Daniel Black
d5bad49011 MDEV-34313: compile WITHOUT_SERVER and WSREP=ON
CMake WSREP=ON has some implications for client
executables so still present this as an option
when compiling WITHOUT_SERVER. In this case
default to ON for maximium compatibility of
the build client executables and libraries.
2024-06-26 12:42:25 +10:00
Marko Mäkelä
0076eb3d4e Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
Dave Gosselin
db0c28eff8 MDEV-33746 Supply missing override markings
Find and fix missing virtual override markings.  Updates cmake
maintainer flags to include -Wsuggest-override and
-Winconsistent-missing-override.
2024-06-20 11:32:13 -04:00
Marko Mäkelä
5ba542e9ee Merge 10.5 into 10.6 2024-05-30 14:27:07 +03:00
Sergei Golubchik
7e65512ecc cleanup: compile with -fno-operator-names in maintainer mode 2024-05-14 13:37:59 +02:00
Sergei Golubchik
7b53672c63 Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
Vladislav Vaintroub
029e2a5fd9 MDEV-33876 CMake, zlib - use names compatible with official FindZLIB.cmake
- ZLIB_LIBRARIES, not ZLIB_LIBRARY
- ZLIB_INCLUDE_DIRS, not ZLIB_INCLUDE_DIR

For building libmariadb, ZLIB_LIBRARY/ZLIB_INCLUDE_DIR are still defined
This workaround will be removed later.
2024-05-03 21:48:47 +02:00
Vladislav Vaintroub
20f60fe70f postfix a09ebe5567 (PCRE-10.43)
- no need to switch off -fsanitize-address for MSVC anymore
- option /WX is MSVC only
- CMAKE_C_STANDARD C99 is already in pcre's own CMakeLists.txt
2024-05-02 22:13:48 +02:00
Dimitri John Ledkov
bf77f9793d openssl: add a more specific DES support detection
Improve detection for DES support in OpenSSL, to allow compilation
against system OpenSSL without DES.

Note that MariaDB needs to be compiled against OpenSSL-like library
that itself has DES support which cmake detected. Positive detection
is indicated with CMake variable HAVE_des 1.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@surgut.co.uk>
2024-04-30 23:09:02 +10:00
Sergei Golubchik
c1f3eff53f Merge branch '10.5' into 10.6 2024-04-29 10:08:58 +02:00
Oleksandr Byelkin
a09ebe5567 PCRE2-10.43
pcre2 - fix CMAKE_C_FLAGS for MSVC for external project by Vladislav Vaintroub <vvaintroub@gmail.com>
2024-04-28 18:09:13 +02:00
Meng-Hsiu Chiang
55cb2c2916 MDEV-29955: Set path for zlib library with pkg-config
`FindZLIB` module uses variable `ZLIB_ROOT`[1] to look for libraries. By
setting the variable, `FindZLIB` is able to search the libraries that
installed in a non-system path (/workspace/mylib for example).

And when using `z` in `LINK_LIBRARIES()` CMake tries to lookup the
library in system path by default. It doesn't work if the library isn't
installed in the path, and use ${ZLIB_LIBRARY} which set by FindZLIB
solve the issue.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services.

[1]: https://cmake.org/cmake/help/latest/module/FindZLIB.html#hints
2024-04-23 15:40:57 +01:00
Marko Mäkelä
8e663f5e90 MDEV-32791 MariaDB cannot be installed on Red Hat ubi9
The libpmem dependency that had been added in
commit 3daef523af (MDEV-17084)
did not achieve any measurable performance improvement when
comparing the same PMEM device with and without "mount -o dax"
using the Linux ext4 file system.

Because Red Hat has deprecated libpmem, let us remove the code
altogether.

Note: This is a 10.6 version of
commit 3f9f5ca48e
which will retain PMEM support in MariaDB Server 10.11.
2024-04-19 11:04:51 +03:00
Marko Mäkelä
bb2e125d07 Merge 10.5 into 10.6
This excludes commit 040069f4ba
because it is specific to innodb_sync_debug, which had been removed
in commit ff5d306e29.
2024-04-18 07:14:56 +03:00
Vladislav Vaintroub
e87a175b3a Fix LTO (aka interprocedural optimization) build with MSVC
Also, disable MSVC LTO for static client libraries - they won't be usable
for end-users.
2024-04-17 16:18:44 +02:00
Marko Mäkelä
ccb7a1e9a1 Merge 10.5 into 10.6 2024-03-27 15:00:56 +02:00
Daniel Black
ee2ed1a036 Revert "MDEV-33636: RPM caps is on mariadbd exe"
This was the orginal implementation that reverted with a bunch of
commits.

This reverts commit a13e521bc5.

Revert "cmake: append to the array correctly"
This reverts commit 51e3f1daf5.

Revert "build failure with cmake < 3.10"
This reverts commit 49cf702ee5.

Revert "MDEV-33301 memlock with systemd still not working"
This reverts commit 8a1904d782.
2024-03-27 13:36:31 +11:00
Daniel Black
a13e521bc5 MDEV-33636: RPM caps is on mariadbd exe
Postfix on 51e3f1daf5 that
mariadbd should be the executable name rather than capabilities
on a symlink.
2024-03-19 09:15:03 +11:00
Sergei Golubchik
55cea0c2a6 Merge branch '10.5' into 10.6 2024-03-14 19:52:08 +01:00
Sergei Golubchik
51e3f1daf5 cmake: append to the array correctly
it was generating broken spec files
2024-03-14 19:11:18 +01:00
Sergei Golubchik
49cf702ee5 build failure with cmake < 3.10
cmake bug #14362
2024-03-14 11:43:13 +01:00
Marko Mäkelä
c3a00dfa53 Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
Vladislav Vaintroub
d510f80549 MDEV-33482: Optimize WolfSSL for improved performance
- Use "new" math library WOLFSSL_SP_MATH_ALL, which is now  promoted by
  WolfSSL for faster performance. "fastmath" we  used previously is going
  to be deprecated, it was not really always fast.
- Optimize common RSA math operations with WOLFSSL_HAVE_SP_RSA
- Incorporate assembly optimizations, currently for Intel x64 only

This patch significantly reduces execution time for SSL tests like
main.ssl-big and main.ssl_connect, which now run 2 to 3 times faster.

Notably, when this patch is applied to 11.4, server startup in with
ephemeral certificates becomes approximately 10x faster due to optimized
wolfSSL_EVP_PKEY_keygen().

Additionally, refactored WolfSSL by removing old workarounds and
consolidating wolfssl and wolfcrypt into a single library wolfssl, just
like it was done in WolfSSL's own CMake.
2024-02-18 01:10:41 +01:00
Daniel Black
8a1904d782 MDEV-33301 memlock with systemd still not working
CapabilityBoundingSet included CAP_IPC_LOCK in MDEV-9095, however
it requires that the executable has the capability marked in extended
attributes also.

The alternate to this is raising the RLIMIT_MEMLOCK for the service/
process to be able to complete the mlockall system call. This needs to
be adjusted to whatever the MariaDB server was going to allocate.
Rather than leave the non-obvious mapping of settings and tuning,
add the capability so its easier for the user.

We set the capability, if possible, but may never be used depending
on user settings. As such in the Debian postinst script, don't
complain if this fails.

The CAP_IPC_LOCK also facilitates the mmaping of huge memory pages.
(see man mmap), like mariadb uses with --large-pages.
2024-02-15 12:58:13 +11:00
Oleksandr Byelkin
d337700cc0 Merge branch '10.6' into mariadb-10.6.17 2024-02-06 22:45:22 +01:00
Vladislav Vaintroub
a94d2a6888 CMake remember decision to bundle WITH_PCRE, avoid repeated system checks 2024-02-06 20:03:41 +01:00
Sergei Golubchik
15c75ad083 pcre.cmake: always check the library with check_library_exists()
even if pkg-config has it. otherwise build dependencies
aren't detected.
2024-02-01 11:26:36 +01:00