Commit graph

1606 commits

Author SHA1 Message Date
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
Sergei Golubchik
0b2042fdca speedup RPM builds
Filter out most common file types from automatic dependency collection.
This makes `make package`  in centos73 VM three times faster
2019-04-02 18:22:37 +02:00
Marko Mäkelä
5c3ff5cb93 Merge 10.3 into 10.4 2019-04-02 11:04:54 +03:00
Sergei Golubchik
4e1d3f83b7 Merge branch '10.2' into 10.3 2019-03-29 19:41:41 +01:00
Sergei Golubchik
cc71e7501c post-merge: -Werror fixes in 10.2 2019-03-29 10:58:25 +01:00
Sergei Golubchik
f2a0c758da Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
Sergei Golubchik
d8084116b5 MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
special cases:

* change systemd detection to use CHECK_LIBRARY_EXISTS at least once,
  to have it detected by build_depends.cmake
* similarly, use find_library for pam
* unixODBC is weird, libodbc.so is in the unixODBC package, not
  in the unixODBC-devel, where normally all .so files belong.
  Packaging bug? As a workaround, use find_file(sql.h) instead of
  find_path(sql.h) to make sure that /usr/include/sql.h (not /usr/include)
  is cached by cmake, and later build_depends.cmake will select
  unixODBC-devel, as a package owning /usr/include/sql.h file.
2019-03-27 22:51:37 +01:00
Sergei Golubchik
b12f14965d MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
automatic BuildRequires for source RPM: for every FILEPATH and
"Have library XXX" cached variable, detect what rpm package it comes from
and add it to the list of dependencies.

That is, the source RPM will BuildRequire all those packages that
were found by cmake when the source RPM was built. Presumably, our
CMakeLists.txt won't check for libraries that aren't needed for a build.

It supports libraries/executables/files found with
  FIND_LIBRARY
  FIND_FILE
  FIND_PROGRAM
  CHECK_LIBRARY_EXISTS
2019-03-27 22:51:37 +01:00
Sergei Golubchik
ecc2711328 MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
create source RPM cpack-way

when building binary packages, this source rpm will use
same BUILD_CONFIG and WITH_SSL values that were used when
creating the source RPM.

Only do it for a reasonably new cmake, where
source rpms are known to work (3.10.2 is ok, 3.5.2 is not).

And force a shorter CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX so that
a source rpm could be built from a standard location in /usr/src
2019-03-27 22:51:37 +01:00
Sergei Golubchik
86e80f944f cmake: don't do fake rpm Provides
instead remove internal modules from Requires/Provides
2019-03-27 22:51:37 +01:00
Sergei Golubchik
39cea72e7b cmake: fix cpack_source_ignore_files
add defensive $ for filenames, don't include .gitattributes
and *.rpm, correct rules for *.gz and *.zip
2019-03-27 22:51:37 +01:00
Sergei Golubchik
6417297180 cmake: remove workarounds for cmake bugs #13248 and #12864
since long we use a different workaround, our own CPackRPM wrapper
2019-03-27 22:51:37 +01:00
Sergei Golubchik
f97d879bf8 cmake: re-enable -Werror in the maintainer mode
now we can afford it. Fix -Werror errors. Note:
* old gcc is bad at detecting uninit variables, disable it.
* time_t is int or long, cast it for printf's
2019-03-27 22:51:37 +01:00
Marko Mäkelä
8b480df63e Merge 10.3 into 10.4 2019-03-25 17:18:15 +02:00
Marko Mäkelä
c3a6c683e2 Merge 10.2 into 10.3 2019-03-25 11:03:19 +02:00
Sergei Golubchik
77e2aca3f0 cmake 3.14
new location for CPackRPM.cmake
2019-03-23 14:33:36 +01:00
Sergei Golubchik
07c3e90210 MDEV-18954 numa dynamic dependency
don't link with libnuma in release builds
2019-03-22 15:42:10 +01:00
Sergei Golubchik
a794db9ade cmake: remove unused variable 2019-03-22 15:40:30 +01:00
Marko Mäkelä
58f3ff7175 Merge 10.3 into 10.4 2019-03-11 18:27:58 +02:00
Marko Mäkelä
814205f306 Merge 10.2 into 10.3 2019-03-11 17:49:36 +02:00
Marko Mäkelä
3ea49d35bd Merge 10.1 into 10.2 2019-03-11 11:45:33 +02:00
Eugene Kosov
2a2ab121b0 MDEV-17703 Add WITH_UBSAN switch to CMake similar to WITH_ASAN
This can be useful:
UBSAN_OPTIONS=log_path=/some/path

clang users may want to increase stack size in include/my_pthread.h or enable
some optimizations
2019-03-11 13:37:19 +04:00
Marko Mäkelä
1a5028f430 Fix the WITH_ASAN clang build of dynamic plugins 2019-03-07 14:32:20 +02:00
Sergei Golubchik
83de75d66d try harder to link unix_socket plugin statically
fix unix_socket tests to work if unix_socket is a built-in
2019-02-21 15:04:03 +01:00
Sergei Golubchik
b63604612e move aws_sdk to extra/ 2019-02-21 14:48:04 +01:00
Oleksandr Byelkin
93ac7ae70f Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
Oleksandr Byelkin
00906719fe Merge branch '10.2' into bb-10.3-merge 2019-02-19 17:26:44 +01:00
Oleksandr Byelkin
91d506cf2d Merge branch '10.1' into 10.2 2019-02-19 16:47:45 +01:00
Marko Mäkelä
fc124778ea Merge 10.2 into 10.3 2019-02-19 17:41:13 +02:00
Sergei Golubchik
2de0b57dd1 Don't build aws_key_management plugin by default 2019-02-19 12:39:40 +01:00
Vladislav Vaintroub
3220227794 MDEV-18578 build aws sdk for all plugins to use 2019-02-18 07:52:13 +01:00
Laurynas Biveinis
43a7409bb8
typo cmake/submodules.cmake
Co-Authored-By: grooverdan <daniel@linux.ibm.com>
2019-02-13 17:48:12 +11:00
Daniel Black
4f5c65367a cmake-wsrep: friendly error message about missing wsrep_api.h
Without this commit the error message is:

$ cmake . -DWITH_WSREP=ON
-- Running cmake version 3.12.1
-- MariaDB 10.4.3
CMake Error at cmake/wsrep.cmake:36 (FILE):
  FILE STRINGS file
  ".../mariadb-server-10.4/wsrep-lib/wsrep-API/v26/wsrep_api.h"
  cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:147 (INCLUDE)

Having 'git config cmake.update-submodules yes' nicely updates the
build without error.

$ cmake . -DWITH_WSREP=ON
-- Running cmake version 3.12.1
-- MariaDB 10.4.3
Submodule path 'wsrep-lib': checked out 'e7d72ae7f6a6995a21d743389426a963429a1fff'
Submodule path 'wsrep-lib/wsrep-API/v26': checked out '75a5f452f2ba07b0f4a3a9a94825fccc71b27398'
2019-02-13 11:36:03 +11:00
Daniel Black
17c3f147f8 cmake/submodules: notify user about gitconfig for automatic update 2019-02-13 11:26:08 +11:00
Sergei Golubchik
b9f3f06857 MDEV-12484 Enable unix socket authentication by default
Change the default authentication for root@localhost to

  IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket

which provides secure passwordless login, while still allowing
SET PASSWORD to work as expected.

Also create a second all-privilege account for the user that owns
datadir (and thus has full access to the data anyway).

Compile unix_socket plugin statically into the server.
2019-02-12 19:14:37 +01:00
Daniel Black
b2dd88f095 cmake/wsrep: allow disabling -DWITH_WSREP=OFF 2019-02-12 15:59:05 +11:00
Monty
4eae9eeccc Backport BUILD scripts from 10.4
- Fixes building with galera and tokudb
- Added support for --without-wsrep BUILD script option
2019-02-06 22:18:20 +02:00
Marko Mäkelä
a249e57b68 Merge 10.1 into 10.2
Temporarily disable a test for
commit 2175bfce3e
because fixing it in 10.2 requires updating libmariadb.
2019-02-03 17:22:05 +02:00
Marko Mäkelä
213ece2f2e Merge 10.1 into 10.1
This is joint work with Oleksandr Byelkin.
2019-02-02 13:00:15 +02:00
Marko Mäkelä
081fd8bfa2 Merge 10.1 into 10.2 2019-02-02 11:40:02 +02:00
Oleksandr Byelkin
560799ebd8 Merge branch '10.0-galera' into 10.1 2019-01-31 09:34:34 +01:00
Oleksandr Byelkin
c4f97d3cfa Merge branch '5.5' into 10.0 2019-01-28 20:52:47 +01:00
Oleksandr Byelkin
a3df9bcadc Merge branch '5.5' into 10.0 2019-01-28 10:36:12 +01:00
Sergei Golubchik
2175bfce3e Crude "auto-load-data-local-infile" mode
Disable LOAD DATA LOCAL INFILE suport by default and
auto-enable it for the duration of one query, if the query
string starts with the word "load". In all other cases the application
should enable LOAD DATA LOCAL INFILE support explicitly.
2019-01-27 18:54:12 +01:00
Brave Galera Crew
36a2a185fe Galera4 2019-01-23 15:30:00 +04:00
Sergei Golubchik
0d3c49ef5d MDEV-17615 cmake ssl error on musl/libressl
don't shortcut trying to test for openssl version,
test what is actually needed for a code to compile
2019-01-21 17:30:07 +01:00
Marko Mäkelä
734510a44d Merge 10.3 into 10.4 2019-01-06 17:43:02 +02:00
Sergei Golubchik
6bb11efa4a Merge branch '10.2' into 10.3 2019-01-03 13:09:41 +01:00
Sergei Golubchik
2f368bb967 fix RHEL8 "ambiguous python shebang" build failures 2019-01-03 00:23:06 +01:00
Sergei Golubchik
67240858b2 Merge branch '10.1' into 10.2 2018-12-30 18:30:29 +01:00
Sergei Golubchik
aeefd26ecb Merge branch '10.0' into 10.1 2018-12-29 23:44:45 +01:00
Sergei Golubchik
8634f7e528 Merge branch '5.5' into 10.0 2018-12-20 09:15:01 +01:00
Sergei Golubchik
cb4c2a98b5 always link C/C with external (to C/C) zlib
it'll be either system zlib.so or bundled with the server (but still
external to C/C) zlib.a
2018-12-20 08:06:55 +01:00
Sergei Golubchik
65525550ab Don't default to bundled zlib
This reverts part of c54271723c
2018-12-17 21:47:14 +01:00
Sergei Golubchik
07e9b13898 mysqld: ignore SIGHUP sent by the kernel
SIGHUP causes debug info in the error log and reload of
logs/privileges/tables/etc. The server should only do it when
a user intentionally sends SUGHUP, not when a parent terminal gets
disconnected or something.

In particular, not ignoring kernel SIGHUP causes FLUSH PRIVILEGES
at some random point during non-systemd Debian upgrades (Debian
restarts mysqld, debian-start script runs mysql_upgrade in the background,
postinit script ends and kernel sends SIGHUP to all background processes
it has started). And during mysql_upgrade privilege tables aren't
necessarily ready to be reloaded.
2018-12-12 00:31:04 +01:00
Monty
84c0563a27 Fixed BUILD scripts to by default work with galera and tokudb
Bascially this means that all builds with BUILD scripts are done with
--with-jemalloc=NO      # Required by tokudb
--with-ssl              # Required on OpenSuse 10.5 to get galera to work
2018-12-09 20:49:05 +02:00
Monty
c8250ed6c5 Add --without-wsrep option to BUILD scripts 2018-12-09 20:49:05 +02:00
Vladislav Vaintroub
3f10cbf3e4 pipe and shared memory protocol should be statically compiled into C/C 2018-11-12 11:46:13 +01:00
Marko Mäkelä
074c684099 Merge 10.3 into 10.4 2018-11-06 16:24:16 +02:00
Marko Mäkelä
df563e0c03 Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
2018-11-06 09:40:39 +02:00
Marko Mäkelä
32062cc61c Merge 10.1 into 10.2 2018-11-06 08:41:48 +02:00
Jan Lindström
c2caca02ac Merge remote-tracking branch 'origin/10.0' into 10.0-galera 2018-11-02 08:46:04 +02:00
Sergei Golubchik
a6e0000494 Merge branch '10.0' into 10.1 2018-10-31 10:53:22 +01:00
Sergei Golubchik
09e97299ba Merge branch '5.5' into 10.0 2018-10-31 00:25:26 +01:00
Sergei Golubchik
31f1fe223e don't try to build with OpenSSL 1.1+ 2018-10-30 22:42:22 +01:00
Sergei Golubchik
44f6f44593 Merge branch '10.0' into 10.1 2018-10-30 15:10:01 +01:00
Jan Lindström
b0fe082b36 Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera 2018-10-30 13:22:52 +02:00
Sergei Golubchik
8772824ce7 Restore auto-switch to bundled ssl if WITH_SSL=yes
if -DWITH_SSL=yes and system ssl cannot be used,
bundled ssl should be auto-selected.

That's how it worked in 10.0, and it was unintentionally broken in 10.1.
2018-10-29 23:21:58 +01:00
Jan Lindström
2ee9343c87 Merge tag 'mariadb-5.5.62' into 5.5-galera 2018-10-29 18:45:19 +02:00
Sergei Golubchik
d5f564a996 rpm fixes: more %ignore'd files 2018-10-28 12:42:06 +01:00
Sergei Golubchik
37ab7e4596 Merge branch '5.5' into 10.0 2018-10-27 20:46:38 +02:00
Sergei Golubchik
f9e5195b40 Merge branch 'mysql/5.5' into 5.5 2018-10-23 15:59:24 +02:00
Vasil Dimov
f500399421 Bump WSREP_PATCH_VERSION 2018-10-10 13:36:05 +03:00
Marko Mäkelä
2a955c7a83 Merge 10.3 into 10.4 2018-10-10 10:36:51 +03:00
Vladislav Vaintroub
acf8fc1ff8 Fix cmake warning
CMP0075 Include file check macros honor CMAKE_REQUIRED_LIBRARIES
2018-10-10 07:36:18 +01:00
Vladislav Vaintroub
f4cdf90d73 MDEV-17279 Windows : link C runtime dynamically
Changed the build to use /MD flag so that DDL version of C runtime is used.

To make sure MariaDB is always runnable on target system, include
redistributable CRT libraries into installer.

For MSI package, use Microsoft's merge modules.
For ZIP  use "applocal" approach,i.e place redistributable dlls
into the bin directory of the package(via InstallRequiredSystemLibraries
cmake module) The space overhead of libraries in negligible, ~ 3MB unpacked.

There are 2 cases, where we still link C runtime statically

- Upgrade wizard, it uses MFC, and we link statically to avoid
redistribute also whole MFC (for this single application, does not
make much sense).

- MSI installer's custom action dll wixca.dll.Here, we need static link
so that MSI won't fail on a target system that does not have VC++2015
runtime already installed.
2018-10-09 08:42:48 +01:00
Marko Mäkelä
43ee6915fa Merge 10.2 into 10.3 2018-10-09 09:11:30 +03:00
Vladislav Vaintroub
f67e050430 Update libmariadb 2018-10-03 14:29:16 +01:00
Sergei Golubchik
57e0da50bb Merge branch '10.2' into 10.3 2018-09-28 16:37:06 +02:00
Sergei Golubchik
9905949b41 cmake: fix usage of GET_TARGET_PROPERTY
and followup fixes
2018-09-22 00:22:09 +02:00
Sergei Golubchik
61a6f4bd96 MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
Use RedHat-recommended /var/lib/rpm-state/mariadb/ for restart flag.
This also fixes SUSE where /var/lib/rpm-state doesn't necessarily exist.
2018-09-22 00:20:25 +02:00
Sergei Golubchik
21d157abaa MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
RPM solution:

Make all server plugins to restart the server when installed.
To avoid multiple server restarts, do it only once in posttrans scriptlet.
Add support for CPACK_RPM_<component>_POST_TRANS_SCRIPT_FILE
2018-09-21 13:31:37 +02:00
Sergei Golubchik
5c83305c4c RPM: generate per-plugin.cnf files where git will ignore them 2018-09-21 13:31:37 +02:00
Vladislav Vaintroub
f0ee8496d2 MDEV-15088 Lighter version of Windows Zip distributions
Add new target win_package, that produces
a) light ZIP (no test suite, no sql-bench, no debugsymbols)
b) debug symbols ZIP
2018-09-14 20:54:54 +01:00
Sergei Golubchik
9c5a038001 MDEV-17040 sql/sql_yacc_orac.cc is included but sql/sql_yacc_ora.cc isn't included in source archive
fix a packaging typo
2018-08-24 11:20:06 +02:00
Sergei Golubchik
97b563b5db less re-cmake messages 2018-08-12 11:37:43 +02:00
Sergei Golubchik
6b53f9d781 MDEV-16662 CMake warnings: CMP0026 2018-08-12 11:37:42 +02:00
Sergei Golubchik
96b8909062 MDEV-16662 CMake warnings: CMP0022 2018-08-12 11:37:42 +02:00
Sergei Golubchik
aa19eda7da MDEV-16662 CMake warnings: CMP0007 2018-08-12 11:37:42 +02:00
Marko Mäkelä
05459706f2 Merge 10.2 into 10.3 2018-08-03 15:57:23 +03:00
Jan Lindström
c5a8583b31 Merge tag 'mariadb-10.0.36' into 10.0-galera 2018-08-02 11:44:02 +03:00
Marko Mäkelä
ef3070e997 Merge 10.1 into 10.2 2018-08-02 08:19:57 +03:00
Oleksandr Byelkin
cb5952b506 Merge branch '10.0' into bb-10.1-merge-sanja 2018-07-25 22:24:40 +02:00
Oleksandr Byelkin
0896d7ebc3 Merge branch '10.0' into bb-10.1-merge 2018-07-19 12:55:54 +02:00
Sergei Golubchik
33eccb5776 MDEV-11790 WITHOUT_SERVER installs mysqld_safe_helper
Don't install server files if WITHOUT_SERVER is specified.
"Server files" are defined as files going into the MariaDB-Server RPM,
that is files in the components Server, ManPagesServer, Server_Scripts,
IniFiles, SuportFiles, and Readme.
2018-07-19 11:35:38 +02:00
Tor Didriksen
8a7db4c320 Bug#28200422 USE CTAGS RATHER THAN ETAGS FOR GENERATING TAGS FILE
Switch to Exuberant Ctags when generating TAGS, since it is much
better at parsing modern C++

Change-Id: I9652012708df7e7edf93161097a547f60fb0cf79
(cherry picked from commit 125b2804fbbb8662632f761f39aeef0a7f9cebb3)
2018-07-19 07:42:48 +02:00
Aditya A
c54271723c Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIES
Upgrading the zlib lib to 1.2.11
2018-07-09 17:25:49 +05:30
Marko Mäkelä
186a998b5b Merge 10.2 into 10.3 2018-07-03 10:25:38 +03:00
Vladislav Vaintroub
0897a25c0f MDEV-16596 : Windows - redo log does not work on native 4K sector disks.
Disks with native 4K sectors need 4K alignment and size for  unbuffered IO
(i.e for files opened with FILE_FLAG_NO_BUFFERING)

Innodb opens redo log with FILE_FLAG_NO_BUFFERING, however it always does
512byte IOs. Thus, the IO on 4K native sectors will fail, rendering
Innodb non-functional.

The fix is to check whether OS_FILE_LOG_BLOCK_SIZE is multiple of logical
sector size, and if it is not, reopen the redo log without
FILE_FLAG_NO_BUFFERING flag.
2018-07-02 15:02:31 +01:00
Sergei Golubchik
36e59752e7 Merge branch '10.2' into 10.3 2018-06-30 16:39:20 +02:00
Vladislav Vaintroub
c612a1e77c MDEV-16596 : Windows - redo log does not work on native 4K sector disks.
Disks with native 4K sectors need 4K alignment and size for  unbuffered IO
(i.e for files opened with FILE_FLAG_NO_BUFFERING)

Innodb opens redo log with FILE_FLAG_NO_BUFFERING, however it always does
512byte IOs. Thus, the IO on 4K native sectors will fail, rendering
Innodb non-functional.

The fix is to check whether OS_FILE_LOG_BLOCK_SIZE is multiple of logical
sector size, and if it is not, reopen the redo log without
FILE_FLAG_NO_BUFFERING flag.
2018-06-30 11:04:51 +01:00