Commit graph

1606 commits

Author SHA1 Message Date
Marko Mäkelä
44d70c01f0 Merge 10.3 into 10.4 2021-03-19 11:42:44 +02:00
Marko Mäkelä
19052b6deb Merge 10.2 into 10.3 2021-03-18 12:34:48 +02:00
Vladislav Vaintroub
f2c79eda4b MDEV-24554 Windows authenticode signing stopped working
Change the default timestamping URL, again
http://timestamp.globalsign.com/?signature=sha2 seems to work fine atm
2021-03-16 00:15:34 +01:00
Vicențiu Ciorbaru
ad0f0d2b1a Merge branch '10.3' into 10.4 2021-02-23 21:44:22 +02:00
Vicențiu Ciorbaru
13f0e1e139 Merge branch '10.2' into 10.3 2021-02-23 21:43:05 +02:00
Vicențiu Ciorbaru
9e259d58c2 Remove race condition during make dist
Introduced by 85828b8f22

This is running 2 git processes in parallel, which, if unlucky can cause
either of them to fail with "File already exists" error.
2021-02-23 17:26:08 +02:00
Marko Mäkelä
fd5e103aa4 Merge 10.3 into 10.4 2021-01-11 10:35:06 +02:00
Marko Mäkelä
5a1a714187 Merge 10.2 into 10.3 (except MDEV-17556)
The fix of MDEV-17556 (commit e25623e78a
and commit 61a362c949) has been
omitted due to conflicts and will have to be applied separately later.
2021-01-11 09:41:54 +02:00
Vladislav Vaintroub
3b548d3bbf MDEV-24554 Do not use verisign server for authenticode timestamping 2021-01-09 18:34:28 +01:00
Marko Mäkelä
533a13af06 Merge 10.3 into 10.4 2020-11-03 14:49:17 +02:00
Marko Mäkelä
c7f322c91f Merge 10.2 into 10.3 2020-11-02 15:48:47 +02:00
Sergei Golubchik
c790218612 Fix RPM packaging on cmake 3.18+
cmake has caught up and since version 3.18 it started supporting
CPACK_RPM_POST_TRANS_SCRIPT_FILE, something we've supported for
two years and cmake 2.8.11. Both implementation add %posttrans tag
and rpmbuild gets confused.

Disable our implementation for cmake 3.18+
2020-10-30 10:32:59 +01:00
Marko Mäkelä
7b2bb67113 Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
Sergei Golubchik
6cefe7d31e cleanup: use predefined CMAKE_DL_LIBS
instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
2020-10-23 13:37:26 +02:00
Marko Mäkelä
46957a6a77 Merge 10.3 into 10.4 2020-10-22 13:27:18 +03:00
Marko Mäkelä
e3d692aa09 Merge 10.2 into 10.3 2020-10-22 08:26:28 +03:00
Marko Mäkelä
620ea816ad Merge 10.1 into 10.2 2020-10-21 14:02:04 +03:00
Daniel Black
b4c225ac35 MDEV-23887: check_linker_flags correct for old cmake compatibility
It was only from CMake-3.14.0 that CMAKE_REQUIRED_LINK_OPTIONS
was used in CHECK_CXX_SOURCE_COMPILES. Without this, it could be
the case (as was on OSX) that a flag was never checked in
CHECK_CXX_SOURCE_COMPILES, the CHECK successfully passed, but
failed at link time.

As such we use CMAKE_REQUIRED_LIBRARIES to include the flags to check
as its compatible enough with the cmake versions for non-Windows
compilers/linkers.

Tested on x86_64 with:
* 3.11.4
* 3.17.4

Corrects: 7473e1841c

In the future:
* cmake >=3.14.0 can use CMAKE_REQUIRED_LINK_OPTIONS
* cmake >=3.18.0 can use CHECK_LINKER_FLAG (with policy CMP0057 NEW)
(e.g: commit c7ac2deff9a2c965887dcc67cbf2a3a7c3e0123d)

CMAKE_REQUIRED_LIBRARIES suggested by serg@mariadb.com

Reviewed-by: anel@mariadb.org
2020-10-21 19:11:02 +11:00
Oleksandr Byelkin
57325e4706 Merge branch '10.3' into 10.4 2020-08-03 14:44:06 +02:00
Oleksandr Byelkin
c32f71af7e Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
Oleksandr Byelkin
ef7cb0a0b5 Merge branch '10.1' into 10.2 2020-08-02 11:05:29 +02:00
Karthik Kamath
e6cb263ef3 MDEV-15961: Fix stacktraces under FreeBSD (aarch64)
Largely based on MySQL commit
75271e51d6

MySQL Ref:
    BUG#24566529: BACKPORT BUG#23575445 TO 5.6

    (cut)
    Also, the PTR_SANE macro which tries to check if a pointer
    is invalid (used when printing pointer values in stack traces)
    gave false negatives on OSX/FreeBSD. On these platforms we
    now simply check if the pointer is non-null. This also removes
    a sbrk() deprecation warning when building on OS X. (It was
    before only disabled with building using XCode).

Removed execinfo path of MySQL patch that was already included.

sbrk doesn't exist on FreeBSD aarch64.

Removed HAVE_BSS_START based detection and replaced with __linux__
as it doesn't exist on OSX, Solaris or Windows.  __bss_start
exists on mutiple Linux architectures.

Tested on FreeBSD and Linux x86_64. Being in FreeBSD ports for 2
years implies a good testing there on all FreeBSD architectures there
too. MySQL-8.0.21 code is functionally identical to original commit.
2020-07-28 11:10:25 +10:00
Marko Mäkelä
4b959bd8df Merge 10.3 into 10.4 2020-07-20 15:34:59 +03:00
Marko Mäkelä
acc58fd835 Merge 10.2 into 10.3 2020-07-20 15:11:59 +03:00
Marko Mäkelä
ca9276e37e Merge 10.1 into 10.2 2020-07-20 14:53:24 +03:00
Marko Mäkelä
9936cfd531 Merge 10.3 into 10.4 2020-07-15 10:17:15 +03:00
Daniel Black
7473e1841c check_linker_flag: use for linker flags
-Wl,-z,relro,-z,now are linker flags and should
be checked as such.

TODO: perform module, exe shared checks separately
rather than a pure linker check.
2020-07-15 09:23:53 +03:00
Marko Mäkelä
8a0944080c Merge 10.2 into 10.3 2020-07-14 22:59:19 +03:00
Marko Mäkelä
646a6005e7 Merge 10.1 into 10.2 2020-07-14 15:10:59 +03:00
Vicențiu Ciorbaru
f18c5a7ed7 MDEV-23114 AUTH_PAM plugin can not be disabled when using mysql_release config
When setting the PLUGIN_AUTH_PAM variable, mark it as a "CACHE" variable
so it can be overridden by the user.
2020-07-07 17:59:47 +03:00
Marko Mäkelä
f347b3e0e6 Merge 10.3 into 10.4 2020-07-02 07:39:33 +03:00
Marko Mäkelä
1df1a63924 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
Marko Mäkelä
ea2bc974dc Merge 10.1 into 10.2 2020-07-01 12:03:55 +03:00
Sergei Golubchik
6d3747a294 make rocksdb cmake checks less verbose on repeat
* fix FindLZ4 to follow convention (LIBRARIES, not LIBRARY)
* remove redundant checks from rocksdb/CMakeLists.txt
* put all checks through the same macro that uniformly
  checks for a package, prints the message, adds definition
2020-07-01 09:21:23 +02:00
Otto Kekäläinen
2ed415765a Fix RocksDB detection of ZSTD
The library finder needs to have capitals in its name so that FIND_PACKAGE
will load the correct finder and actually detect that libzstd is available.

Without this change the CMake would just always silently skip ZSTD since
it would never find it.

Simplify Debian autopkgtest RocksDB part and make it more verbose so that
future regressions like this are easier to debug.

Also remove QUIET from the RocksDB FIND_PACKAGE call so that it is easier
to read in build logs what libraries were detected. Also add missing
underscores to error messages.
2020-07-01 09:21:23 +02:00
Otto Kekäläinen
d4d42a6ad0 Revert "Fix cross-compilation for systemd files"
This reverts commit 9fff91b59b
which was pushed on master by accident.
2020-06-27 17:36:53 +03:00
Otto Kekäläinen
9fff91b59b Fix cross-compilation for systemd files
Upstreamed from https://salsa.debian.org/mariadb-team/mariadb-10.4/-/blob/master/debian/patches/930314-cross-build.patch
which has been running in Debian successfully for a year now.

Original bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930314
2020-06-27 17:28:51 +03:00
Daniel Black
37c88445e3 mtr: use env for perl
On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or
elsewhere in the path.

Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to
find perl and run it.
2020-06-23 03:24:46 +02:00
Vladislav Vaintroub
b1b9803cb8 Disable dtrace probes on Windows.
Apparently, in Win10, dtrace is avaialable, but it does not work with
MariaDB user probes
2020-06-20 01:02:05 +02:00
Marko Mäkelä
8059148154 Merge 10.3 into 10.4 2020-06-03 07:32:09 +03:00
Marko Mäkelä
8300f639a1 Merge 10.2 into 10.3 2020-06-02 10:25:11 +03:00
Sergei Golubchik
4832b751ad cmake: quieter 2020-05-31 11:29:43 +02:00
Marko Mäkelä
6da14d7b4a Merge 10.3 into 10.4 2020-05-30 11:04:27 +03:00
Marko Mäkelä
e9aaa10c11 Merge 10.2 into 10.3 2020-05-29 22:21:19 +03:00
Sergei Golubchik
2c9c9acbfc bintars should use bundled PCRE 2020-05-27 15:56:40 +02:00
Sergei Golubchik
04726f2920 get rid of cmake warning 2020-05-27 15:56:40 +02:00
Sergei Golubchik
8cf589218f optimize performance of the build in a fresh clone
don't fetch the complete history of all submodules, it's rarely needed
2020-05-27 15:56:40 +02:00
Sergei Golubchik
39c141b4ae don't include .git files in source packages
the existing ".git/" rule only filters out .git directories,
but as we have submodules now, we have to filter out .git files too.
2020-05-27 15:56:40 +02:00
Sergei Golubchik
f5844e7c4b Merge branch '10.3' into 10.4 2020-05-09 20:36:58 +02:00
Sergei Golubchik
607467bd63 Merge branch '10.2' into 10.3 2020-05-09 20:20:02 +02:00
Sergei Golubchik
7337abd2f7 MDEV-22123 On RHEL8 mariadb-server is not provided
setup alternative name for rhel8/centos8

use correct C/C version when providing mariadb-connector-c
and other changes for installation over distro packages to work:

  dnf install mariadb-server
  dnf install --allowerasing MariaDB-{server,common,client,shared}*.rpm
2020-05-09 20:06:10 +02:00
Oleksandr Byelkin
985f63cce1 Merge branch '10.1' into 10.2 2020-05-08 13:38:36 +02:00
Sergei Golubchik
9c5d06a6d3 MDEV-21437 MariaDB's SUSE/SLES packages don't "provide" all of the same capabilities as the platform's default packages 2020-05-05 19:37:01 +02:00
Marko Mäkelä
0632b8034b Merge 10.3 into 10.4 2020-04-29 09:05:15 +03:00
Marko Mäkelä
1fbdcada73 Merge 10.2 into 10.3 2020-04-28 22:29:13 +03:00
Sergei Golubchik
01f8f33b43 MDEV-21913 Add pam_user_map.so file to binary tarball package 2020-04-28 17:51:38 +02:00
Marko Mäkelä
c06845d6f0 Merge 10.1 into 10.2 2020-04-27 13:28:13 +03:00
Sergei Golubchik
f462fbac61 MDEV-22078 MariaDB-compat missing from MariaDB 10.4 CentOS 8 Yum Repo
Backport INSALL_SYMLINK cmake macro from 10.3.
It'll make libmysqlclient_r.* symlinks to link to the actual
shared library file, not to another symlink.

As a bonus it'll fix cmake warning about deprecated LOCATION property
2020-04-27 09:11:29 +02:00
Marko Mäkelä
af91266498 Merge 10.3 into 10.4
In main.index_merge_myisam we remove the test that was added in
commit a2d24def8c because
it duplicates the test case that was added in
commit 5af12e4635.
2020-04-16 12:12:26 +03:00
Marko Mäkelä
84db10f27b Merge 10.2 into 10.3 2020-04-15 09:56:03 +03:00
Marko Mäkelä
ccaec18b39 Merge 10.1 into 10.2 2020-04-14 16:13:35 +03:00
Marko Mäkelä
31eaa2029f MDEV-19740: Have MYSQL_MAINTAINER_MODE only enable -Werror
Let us enable all GCC and clang warnings independently of the
MYSQL_MAINTAINER_MODE setting for both Debug and RelWithDebInfo
builds, and have MYSQL_MAINTAINER_MODE only enable -Werror.

The default setting of MYSQL_MAINTAINER_MODE=AUTO will continue
to apply the -Werror only to CMAKE_BUILD_TYPE=Debug. To build
a debug version without -Werror, MYSQL_MAINTAINER_MODE=OFF can
be used.
2020-04-01 15:16:11 +03:00
Oleksandr Byelkin
b7362d5fbc Merge branch '10.3' into 10.4 2020-03-11 14:28:24 +01:00
Oleksandr Byelkin
b8c0e49670 Merge commit '10.3' into 10.4 2020-03-11 13:27:10 +01:00
Vicențiu Ciorbaru
1d99e4d674 Merge branch '10.2' into 10.3 2020-03-08 11:02:55 +02:00
Daniel Black
6610532170 Update install layout to account for multi-arch setup
Cleanup install_layout to account for multi-arch setup and remove
redundant defines in debian rules.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2020-03-08 09:25:22 +02:00
Oleksandr Byelkin
440452628d Merge branch '10.2' into 10.3 2020-03-06 23:28:26 +01:00
Alexey Bychko
8382f10691 MENT-606 Error while setting value 'aes_ctr' to 'file-key-management-encryption-algorithm'
cmake cannot detect openssl headers on Mac during checks.
the solution is to add path to openssl includes to
CMAKE_REQUIRED_INCLUDES before checks.
2020-02-26 07:48:05 +01:00
Daniel Black
f6b9a29820 MDEV-16662: cmake remove empty INSTALL_DEBUG_TARGET
No adverse effects since this was made a null function in
6b53f9d781.

This function had the last remaining cmake CMP0026 violation.
2020-02-25 08:11:20 +01:00
Daniel Black
c749eb2b41 MDEV-16662: cmake: CMP0026 compatible for dtrace
cmake enabling -DENABLE_DTRACE=ON is particularlly noisy with CMP0026
errors.

Fixed in the same way as 6b53f9d781
2020-02-25 08:10:17 +01:00
Anel Husakovic
0d1dd2e79d Clean wrong cherry-pick from previous commit
- Delete variable HAVE_PTHREAD_CONDATTR_SETCLOCK and check
- Delete second HAVE_PTHREAD_KEY_DELETE
2020-02-20 09:25:11 +01:00
Daniel Black
fb01cc3766 my_getncpus based on threads available
Detecting the cpus based on sysconf of the online CPUs can significantly
over estimate the number of cpus available.

Wheither via numactl, cgroups, taskset, systemd constraints, docker
containers and probably other mechanisms, the number of threads mysqld
can be run on can be quite less.

As such we use the pthread_getaffinity_np function on Linux and FreeBSD
(identical API) to get the number of CPUs.

The number of CPUs is the default for the thread_pool_size and a too
high default will resulting in large memory usage and high context
switching overhead.

Closes PR #922
2020-02-20 08:44:20 +01:00
Oleksandr Byelkin
646d1ec83a Merge branch '10.3' into 10.4 2020-02-11 14:40:35 +01:00
Oleksandr Byelkin
58b70dc136 Merge branch '10.2' into 10.3 2020-02-10 20:34:16 +01:00
Anel Husakovic
235d7c6f54 Ignore /lib64 for rpm 2020-02-10 14:32:10 +01:00
Aurélien LEQUOY
236aed3f5f MDEV-21656: Wrong directory for pam_user_map.so
JIRA:https://jira.mariadb.org/browse/MDEV-17292

Closes #1443
2020-02-06 07:48:37 +01:00
Oleksandr Byelkin
bfc24bb2ec Merge branch '10.3' into 10.4 2020-01-24 14:50:23 +01:00
Oleksandr Byelkin
ceda5f724f Merge branch '10.2' into 10.3 2020-01-24 14:16:20 +01:00
Sergei Golubchik
8870f18e1d MDEV-17292 Package the pam_user_map module 2020-01-21 10:56:47 +01:00
Sergei Golubchik
42049f9d39 cleanup: simplify install_layout.cmake 2020-01-21 10:56:47 +01:00
Aleksey Midenkov
0b8b11b0b1 Merge 10.3 into 10.4 2019-12-02 12:51:53 +03:00
Sergei Golubchik
dc7d0b5030 RPM packaging fixes for FC31
Obsoletes: cannot contain (x86-64) anymore

Python shebang must be specific
2019-11-28 16:01:02 +01:00
Vladislav Vaintroub
96c6b2b649 MDEV-19781 fixups
- It is not enough to have  and DeleteSymlinks actions
because within the same installation some exes executables can be both
added and removed, which needs both adding and removing some symlinks.

Instead of CreateSymlinks, there is now FixSymlinks function, which
goes through the list, and adds or removes the symlinks as needed.

- Implemented rollback for symlink custom action.

- Generate list of symlinks in C++ file, using CMake, rather than storing
lists as MSI properties.
2019-11-27 15:58:06 +01:00
Vlad Lesin
6718d3bc32 MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOS
The fix consists of three commits backported from 10.3:

1) Cleanup isnan() portability checks

(cherry picked from commit 7ffd7fe962)

2) Cleanup isinf() portability checks

Original problem reported by Wlad: re-compilation of 10.3 on top of 10.2
build would cache undefined HAVE_ISINF from 10.2, whereas it is expected
to be 1 in 10.3.

std::isinf() seem to be available on all supported platforms.
(cherry picked from commit bc469a0bdf)

3) Use std::isfinite in C++ code

This is addition to parent revision fixing build failures.

(cherry picked from commit 54999f4e75)
2019-11-19 16:28:15 +03:00
Marko Mäkelä
ec40980ddd Merge 10.3 into 10.4 2019-11-01 15:23:18 +02:00
Vladislav Vaintroub
73c864b5d1 Fix clang-cl build on Windows 2019-10-30 12:25:07 +01:00
Marko Mäkelä
d3350c160a Merge 10.3 into 10.4 2019-09-25 10:14:33 +03:00
Alexander Barkov
b6bb64e54a Merge remote-tracking branch 'origin/10.2' into 10.3 2019-09-24 23:05:09 +04:00
Alexander Barkov
0a359d7627 Merge remote-tracking branch 'origin/10.1' into 10.2 2019-09-24 19:19:25 +04:00
Alexander Barkov
5f118b26c8 Merge remote-tracking branch 'origin/5.5' into 10.1 2019-09-24 11:18:39 +04:00
Marko Mäkelä
5a92ccbaea Merge 10.3 into 10.4
Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
2019-09-23 17:35:29 +03:00
Marko Mäkelä
c016ea660e Merge 10.2 into 10.3 2019-09-23 10:25:34 +03:00
Sebastian Kemper
d99216356d cmake: support new libedit interface
libedit changed it's interface a while ago. MariaDB's cmake file doesn't
recognize the new interface, the compile test fails:

/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx: In function 'int main(int, char**)':
/mariadb-10.2.19/CMakeFiles/CMakeTmp/src.cxx:6:47: error: invalid conversion from 'char*' to 'int' [-fpermissive]
  int res= (*rl_completion_entry_function)(0,0);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Fix this by adding a detection for the new interface as well.

Run-tested on a MIPS machine.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-09-20 10:27:27 +02:00
Ryan Coe
f541d3f18e MDEV-20596 Configure fails with newer CMake
Fix build error with newer cmake

Fixes the following build error:

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

CMake Error at cmake/os/Linux.cmake:29 (STRING):
STRING sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:101 (INCLUDE)

The error happens when CMAKE_SHARED_LINKER_{LANG}_FLAGS is not set.
Force the variable to be set to "" as input to prevent this.

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2019-09-20 06:39:39 +03:00
Vladislav Vaintroub
99ecb33389 MDEV-20570 : Packaging fails "The specified timestamp server either could not be reached"
On  Windows, during packaging step, if signing fails, retry
signtool again without timestamp parameter.

Fixes sporadic (rare) failures on buildbot
2019-09-12 15:15:33 +02:00
Marko Mäkelä
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +03:00
Marko Mäkelä
da9201dd5b Merge 10.2 into 10.3 2019-09-10 09:25:20 +03:00
Vladislav Vaintroub
879c9ddce7 MDEV-20542 Windows enable/d2OptimizeHugeFunctions 2019-09-09 19:57:25 +02:00
Vladislav Vaintroub
a895c68c58 On Windows, treat linker warnings as errors, if
MYSQL_MAINTAINER_MODE is ERR
2019-09-09 13:52:30 +02:00
Sergei Golubchik
8885e7ba78 Merge branch '10.3' into 10.4 2019-09-06 20:12:11 +02:00
Sergei Golubchik
f80e02e043 Merge branch '10.2' into 10.3 2019-09-06 16:58:39 +02:00
Sergei Golubchik
39e5b76ef1 use a shorter name for sources in debuginfo rpms
have the same path as in source rpms, don't build them differently
2019-09-06 16:35:56 +02:00
Marko Mäkelä
db4a27ab73 Merge 10.3 into 10.4 2019-08-31 06:53:45 +03:00
Marko Mäkelä
1a3c365953 Merge 10.2 into 10.3 2019-08-29 12:00:12 +03:00
Marko Mäkelä
5f35e103ee Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
Sergei Golubchik
6afe013cde always build wsrep libraries static
even if -DBUILD_SHARED_LIBS=ON was used
2019-08-26 23:33:42 +02:00
Marko Mäkelä
efb8485d85 Merge 10.3 into 10.4, except for MDEV-20265
The MDEV-20265 commit e746f451d5
introduces DBUG_ASSERT(right_op == r_tbl) in
st_select_lex::add_cross_joined_table(), and that assertion would
fail in several tests that exercise joins. That commit was skipped
in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
2019-08-23 08:06:17 +03:00
Marko Mäkelä
32ec5fb979 Merge 10.2 into 10.3 2019-08-21 15:23:45 +03:00
Sergei Golubchik
91fdb931fa ensure that pam plugin is present in release packages 2019-08-20 15:38:58 +02:00
Sergei Golubchik
62cc991bc8 really make CPACK_RPM_DEBUGINFO_PACKAGE configurable 2019-08-20 15:38:58 +02:00
Marko Mäkelä
68e6c2d768 MDEV-20377: Introduce cmake -DWITH_MSAN:BOOL=ON
MemorySanitizer is a compile-time instrumentation layer in clang and GCC.
Together with AddressSanitizer mostly makes the run-time instrumentation
of Valgrind redundant. It is a little more tricky to set up, because
running with uninstrumented libraries will lead into false positives.

You will need an instrumented libc++, and you should use
-stdlib=libc++ instead of the default libstdc++. To build the
instrumented library, you can refer to
https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
or you can adapt these steps that worked for me, for clang-8 version 8.0.1:

cd /mariadb
sudo apt source libc++-8-dev
cd llvm-toolchain-8-8.0.1
mkdir libc++msan; cd libc++msan
cmake ../libcxx -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory \
-DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8

Then, in your MariaDB build directory, you have to compile with
libc++ and bundled libraries, such as WITH_SSL=bundled, WITH_ZLIB=bundled.
For uninstrumented system libraries, you will get false positives for
uninitialized values. Like this:

cmake -DWITH_MSAN=ON -DWITH_SSL=bundled -DWITH_ZLIB=bundled \
-DCMAKE_CXX_FLAGS='-stdlib=libc++' ..

Note: you should also add -O2 to the compiler options, or you may
get crashes due to stack overflow.

Finally, to run tests, you must replace libc++ with the instrumented one:

LD_LIBRARY_PATH=/mariadb/llvm-toolchain-8-8.0.1/libc++msan/lib \
MSAN_OPTIONS=abort_on_error=1 \
./mtr --big-test --parallel=auto --force --retry=0

Failure to do so will report numerous false positives related to
operations on std::string and the like.

This is work in progress. Some issues will still have to be fixed
for WITH_MSAN to be usable. See MDEV-20377 for details.
2019-08-19 20:56:26 +03:00
Aleksey Midenkov
6dd3f24090 MDEV-19740 Debug build of 10.3.15 FTBFS
* Replace LINT_INIT for non-struct types with ctor initializers;
* Check BUILD_DEPS list is not empty so REMOVE_DUPLICATES won't throw
  error.
2019-08-19 10:38:24 +03:00
Marko Mäkelä
e9c1701e11 Merge 10.3 into 10.4 2019-07-25 18:42:06 +03:00
Eugene Kosov
0f83c8878d Merge 10.2 into 10.3 2019-07-16 18:39:21 +03:00
Sergei Golubchik
ab3a6ca670 cleanup: CPACK_RPM_* package description
add cmake helper macro SET_IF_UNSET()
and use it for CPACK_* variables
2019-07-10 09:02:10 +02:00
Eugene Kosov
26c389b7b7 Merge 10.1 into 10.2 2019-07-09 13:22:22 +03:00
Sergei Golubchik
971bef89ab MDEV-19481 mariadb-10.3.15-linux-systemd-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' and 'GLIBCXX_3.4.21' not found
don't ignore LIBSYSTEMD_LDFLAGS when trying out systemd

(and put them in LIBSYSTEMD, because MYSQLD_LINK_FLAGS has stuff like
-lmtmalloc and is used only for mysqld, not for, say, explain_filename-t)

LIBSYSTEMD_LDFLAGS come from libsystemd.pc via pkg-config
2019-07-04 18:19:52 +02:00
Robert Bindar
e8392e58b2 MDEV-19696 - Cleanup gcc sync builtins
Since 10.4 requires C++11 capable compiler, gcc sync builtins became
dead code. Remove relevant cmake checks and cleanup include files.
2019-07-03 12:11:22 +03:00
Marko Mäkelä
5e929ee8a0 MDEV-19845: Define my_timer_cycles() inline
On clang, use __builtin_readcyclecounter() when available.
Hinted by Sergey Vojtovich. (This may lead to runtime failure
on ARM systems. The hardware should be available on ARMv8 (AArch64),
but access to it may require special privileges.)

We remove support for the proprietary Sun Microsystems compiler,
and rely on clang or the __GNUC__ assembler syntax instead.

For now, we retain support for IA-64 (Itanium) and 32-bit SPARC,
even though those platforms are likely no longer widely used.

We remove support for clock_gettime(CLOCK_SGI_CYCLE),
because Silicon Graphics ceased supporting IRIX in December 2013.
This was the only cycle timer interface available for MIPS.

On PowerPC, we rely on the GCC 4.8 __builtin_ppc_get_timebase()
(or clang __builtin_readcyclecounter()), which should be equivalent
to the old assembler code on both 64-bit and 32-bit targets.
2019-06-28 19:19:31 +03:00
Vladislav Vaintroub
9e0ed0fabd MDEV-19860 - do not produce huge strings wtih comp_sql anymore.
Limit lines to ~16K
2019-06-25 23:53:42 +02:00
Sergei Golubchik
306e439c6d MDEV-17592 Create MariaDB named commands/symlinks
post-merge fixes:
* .gitignore
* don't put the keyword COMPONENT into ${COMP} anymore
* don't alias mytop, but do alias mysql_client_test
* don't symlink manpages, use troff aliasing technique instead
  (symlinked manpages break rpm and out-of-source bintar builds)
* move debian to use troff aliased manpages, fix typos in debian files,
  put aliases in the correct packages, add more aliases to match
  rpm/bintar packaging
2019-06-17 12:26:26 +02:00
Rasmus Johansson
24503d5711 MDEV-17592 Create MariaDB named commands/symlinks 2019-06-17 12:26:26 +02:00
Oleksandr Byelkin
f66d1850ac Merge branch '10.3' into 10.4 2019-06-14 22:10:50 +02:00
Vladislav Vaintroub
1e3dc15d62 Use generated user_settings.h for WolfSSL, as recommended by WolfSSL
documentation


Apparently, WolfSSL wants to have *exactly* the same defines for
the user of the library as the was when building library itself.

A lot of #defines have an impact on ABI (structure sizes, alignment etc)
2019-06-14 15:50:12 +02:00
Oleksandr Byelkin
4a3d51c76c Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
Marko Mäkelä
4bbd8be482 Merge 10.1 into 10.2 2019-06-12 10:30:01 +03:00
Vladislav Vaintroub
c97c8c28b5 MDEV-17103 MY_CHECK_{C,CXX}_COMPILER_FLAG do not work on with localized gcc
messages

Force LANG=C for MY_CHECK_{C,CXX}_COMPILER_FLAG
2019-06-05 19:42:55 +02:00
Marko Mäkelä
f98bb23168 Merge 10.3 into 10.4 2019-05-29 22:17:00 +03:00
Marko Mäkelä
90a9193685 Merge 10.2 into 10.3 2019-05-29 11:32:46 +03:00
Marko Mäkelä
d59e15bdb9 Merge 10.1 into 10.2 2019-05-28 15:56:24 +03:00
Marko Mäkelä
bf8fe324d2 Merge 5.5 into 10.1 2019-05-28 11:25:45 +03:00
Vladislav Vaintroub
f465ec8c45 Lets pretend that WolfSSL does not support AES-CTR
In Wolfcrypt, output length after CTR encryption is not the same
as input length. This is different from openssl and this makes unit test
aes-t fail.

So disable CTR for now.
2019-05-25 23:03:02 +02:00
Vladislav Vaintroub
5e4b657dd4 MDEV-18531 : Use WolfSSL instead of YaSSL as "bundled" SSL/encryption library
- Add new submodule for WolfSSL
- Build and use wolfssl and wolfcrypt instead of yassl/taocrypt
- Use HAVE_WOLFSSL instead of HAVE_YASSL
- Increase MY_AES_CTX_SIZE, to avoid compile time asserts in my_crypt.cc
(sizeof(EVP_CIPHER_CTX) is larger on WolfSSL)
2019-05-22 13:48:25 +02:00
Sergei Golubchik
4584c18631 make CPACK_RPM_DEBUGINFO_PACKAGE configurable from the command-line 2019-05-22 00:52:15 +02:00
Samuel Thibault
fceffcdf0b Add GNU/Hurd cmake configuration 2019-05-21 17:34:48 +04:00
Oleksandr Byelkin
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
Sergei Golubchik
2400e06946 remove -fno-rtti 2019-05-18 20:34:03 +02:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Marko Mäkelä
7896503686 Merge 10.3 into 10.4 2019-04-12 12:45:06 +03:00
Jan Lindström
a05f423554 Merge remote-tracking branch 'origin/10.2' into 10.3 2019-04-12 10:56:36 +03:00
Sergei Golubchik
725579c0f4 cmake: pass CMAKE_BUILD_TYPE into src.rpm
and don't pass BUILD_CONFIG twice, once is enough.
2019-04-09 11:47:27 +03:00
Marko Mäkelä
edd1a53a55 Merge 10.3 into 10.4 2019-04-08 22:00:07 +03:00
Marko Mäkelä
9ba0865b87 Merge 10.2 into 10.3 2019-04-08 21:38:13 +03:00
Sergei Golubchik
e124ff17e0 cmake: force Boost dependency as needed
because FindBoost.cmake won't do it
2019-04-08 17:27:25 +02:00
Marko Mäkelä
c8f8d5ceb7 Merge 10.3 into 10.4 2019-04-03 11:43:39 +03:00
Marko Mäkelä
c6b8b05be4 Merge 10.2 into 10.3 2019-04-03 11:22:51 +03:00
Marko Mäkelä
dbc716675b Merge 10.1 into 10.2 2019-04-03 10:32:21 +03:00