Commit graph

1874 commits

Author SHA1 Message Date
Marko Mäkelä
3794673111 MDEV-28836: Memory alignment cleanup
Table_cache_instance: Define the structure aligned at
the CPU cache line, and remove a pad[] data member.
Krunal Bauskar reported this to improve performance on ARMv8.

aligned_malloc(): Wrapper for the Microsoft _aligned_malloc()
and the ISO/IEC 9899:2011 <stdlib.h> aligned_alloc().
Note: The parameters are in the Microsoft order (size, alignment),
opposite of aligned_alloc(alignment, size).
Note: The standard defines that size must be an integer multiple
of alignment. It is enforced by AddressSanitizer but not by GNU libc
on Linux.

aligned_free(): Wrapper for the Microsoft _aligned_free() and
the standard free().

HAVE_ALIGNED_ALLOC: A new test. Unfortunately, support for
aligned_alloc() may still be missing on some platforms.
We will fall back to posix_memalign() for those cases.

HAVE_MEMALIGN: Remove, along with any use of the nonstandard memalign().

PFS_ALIGNEMENT (sic): Removed; we will use CPU_LEVEL1_DCACHE_LINESIZE.

PFS_ALIGNED: Defined using the C++11 keyword alignas.

buf_pool_t::page_hash_table::create(),
lock_sys_t::hash_table::create():
lock_sys_t::hash_table::resize(): Pad the allocation size to an
integer multiple of the alignment.

Reviewed by: Vladislav Vaintroub
2022-06-21 16:59:49 +03:00
Oleksandr Byelkin
987d16a0b4 Revert "don't build with OpenSSL 3.0, it doesn't work before MDEV-25785"
This reverts commit c9beef4315, because
we have OpenSSL 3.0 support here.

part of MDEV-28133
2022-05-23 15:28:06 +02:00
Vladislav Vaintroub
f0fa40efad MDEV-25785 Add support for OpenSSL 3.0
Summary of changes

- MD_CTX_SIZE is increased

- EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points
  to nobody knows where. The assumption made previously was that
  (since the function does not seem to be documented)
  was that it points to the last partial source block.
  Add own partial block buffer for NOPAD encryption instead

- SECLEVEL in CipherString in openssl.cnf
  had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible
   (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md
   even though the manual for SSL_CTX_get_security_level claims that it
   should not be necessary)

- Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers,
  in addition to what was set in --ssl-cipher

- ctx_buf buffer now must be aligned to 16 bytes with openssl(
  previously with WolfSSL only), ot crashes will happen

- updated aes-t , to be better debuggable
  using function, rather than a huge multiline macro
  added test that does "nopad" encryption piece-wise, to test
  replacement of EVP_CIPHER_CTX_buf_noconst

part of MDEV-28133
2022-05-23 15:27:51 +02:00
Sergei Golubchik
b2187662bc Merge branch '10.5' into 10.6 2022-05-18 10:30:47 +02:00
Sergei Golubchik
7970ac7fe8 Merge branch '10.4' into 10.5 2022-05-18 09:50:26 +02:00
Sergei Golubchik
29c07643a1 enable -Wenum-compare -Wenum-conversion
to make the all headers -std=c++20 clean for those, who need c++20
(some plugins)
2022-05-15 20:37:51 +02:00
Marko Mäkelä
57a9626fe4 Merge 10.5 into 10.6 2022-05-06 11:11:04 +03:00
Oleksandr Byelkin
34b002d0dc New PCRE2 (10.40) 2022-04-27 13:23:42 +02:00
Marko Mäkelä
b242c3141f Merge 10.5 into 10.6 2022-03-29 16:16:21 +03:00
Marko Mäkelä
d62b0368ca Merge 10.4 into 10.5 2022-03-29 12:59:18 +03:00
Marko Mäkelä
ae6e214fd8 Merge 10.3 into 10.4 2022-03-29 11:13:18 +03:00
Sutou Kouhei
cf86580f2b MDEV-28032 "git submodule update --depth 1" may fail with old Git
submodules.cmake: don't use "--depth 1" with old Git

Old Git may not work with "--depth 1" when the referenced commit hash
is far from HEAD.

Newer Git improves the situation. For example:
fb43e31f2b

It's safe to not use "--depth 1" with old Git.

Closes #2049
2022-03-19 09:38:57 +01:00
Marko Mäkelä
feb8004b58 Merge 10.5 into 10.6 2022-02-14 09:16:41 +02:00
Vladislav Vaintroub
91d9e9bd80 MDEV-27813 Windows, compiling : RelWithDebInfo should use /Ob2
Fixed inlining flags. Remove /Ob1 added by CMake for RelWithDebInfo.
(the actual compiler default is /Ob2 if optimizations are enabled)

Allow to define custom /Ob flag with new variable MSVC_INLINE, if desired
2022-02-11 14:27:57 +01:00
Oleksandr Byelkin
f5c5f8e41e Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
Oleksandr Byelkin
cf63eecef4 Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
Sergei Golubchik
fb40a2fabf pass MYSQL_MAINTAINER_MODE down to srpm builds
fixes errors on rpm-*-debug builder
2022-01-31 11:45:30 +01:00
Sergei Golubchik
2d4a0f6079 pass MYSQL_MAINTAINER_MODE down to srpm builds
fixes errors on rpm-*-debug builder
2022-01-30 22:52:59 +01:00
Oleksandr Byelkin
a576a1cea5 Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
Monty
37886a29e5 Updated comment in systemd.cmake
Suggested by serg@mariadb.org
2022-01-27 16:07:02 +02:00
Vladislav Vaintroub
4d74bac8bc new pcre fixup - they renamed static libraries, again. 2022-01-27 10:53:02 +01:00
Oleksandr Byelkin
a73acf6c06 new pcre 10.39 2022-01-27 10:53:02 +01:00
Sergei Golubchik
c9beef4315 don't build with OpenSSL 3.0, it doesn't work before MDEV-25785 2022-01-21 16:02:34 +01:00
Alexey Bychko
746050d02d MDEV-27109 mysql_config mariadb_config lists non existant -lmariadb
added dependency devel->shared and conflict with previous versions
update C/C 3.1 with the corresponding C/C part of the fix
2022-01-14 22:16:39 +01:00
Sergei Golubchik
b5a14f061b /usr/lib64/pkgconfig is not owned by MariaDB-devel 2022-01-14 22:16:39 +01:00
Marko Mäkelä
0261eac57f Merge 10.5 into 10.6 2022-01-12 12:33:19 +02:00
Vladislav Vaintroub
c62bb9c3b4 Silence CMake warning from exteral cmake project (pcre2)
The warning reads:

CMake Deprecation Warning at CMakeLists.txt:101 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
2022-01-09 23:52:24 +01:00
Sergei Golubchik
d821feddac MDEV-14938 make buildbot to include galera into bintars
allow injecting extra files into the bintar
2022-01-07 15:37:00 +01:00
Tuukka Pasanen
25f598f54f MDEV-26317: Add SYSTEMD_READWRITEPATH variable to mariadb.service.in-file
Add SYSTEMD_READWRITEPATH-variable to mariadb{@,}.service.in to make sure that
if one is not building RPM or DEB packages then make sure there is ReadWritePaths
directive is defined in systemd service file.

This ensures that tar-ball installation has permissions to write database default
installation path (default: /usr/local/mysql/data) even if it's located
under /usr. Writing to that location is prevented by 'ProtectSystem=full'
systemd directive by default.

Prefixing the path with "-" in systemd causes there to not be an error if the
path doesn't exist. This may occur if the user has configured a datadir
elsewhere.

Reviewer: Daniel Black
2022-01-07 17:51:20 +11:00
Sergei Golubchik
4daf9d7c3e MDEV-27364 Build from 10.2-10.4 srpm fails on RHEL8 family due to discrepancy in jemalloc requirements
pass jemalloc requirement down to srpm build
2021-12-27 14:48:44 +01:00
Sergei Golubchik
186c1fa250 Merge branch '10.5' into 10.6 2021-12-07 22:11:30 +01:00
Sergei Golubchik
e27b1c3137 require system pcre2 in rpms
now when SLES12.3 is gone, we can enforce it
2021-12-07 21:31:13 +01:00
Sergei Golubchik
de70f921ce Merge branch '10.4' into 10.5 2021-12-07 21:30:27 +01:00
Sergei Golubchik
e8a91c18ea Merge branch '10.3' into 10.4 2021-12-07 09:47:42 +01:00
Sergei Golubchik
153b75b576 Merge branch '10.2' into 10.3 2021-12-06 22:23:07 +01:00
Sergei Golubchik
71027eceac fix srpm builds after fe065f8d90 2021-12-06 18:50:19 +01:00
Marko Mäkelä
51c89849d1 Merge 10.5 into 10.6 2021-11-29 11:39:34 +02:00
Marko Mäkelä
d4cb177603 Merge 10.4 into 10.5 2021-11-29 11:16:20 +02:00
Marko Mäkelä
4da2273876 Merge 10.3 into 10.4 2021-11-29 10:59:22 +02:00
Marko Mäkelä
289721de9a Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
Alexey Bychko
fe065f8d90 MDEV-22522 RPM packages have meaningless summary/description
this patch moves cpack summury and description for optional packages
to the appropriate CMakeLists.txt files
2021-11-23 11:29:24 +07:00
Marko Mäkelä
0a168398a0 Merge 10.5 into 10.6 2021-11-17 15:03:47 +02:00
Marko Mäkelä
5489ce0ae1 Merge 10.4 into 10.5 2021-11-17 14:49:12 +02:00
Marko Mäkelä
70e788b1e5 Merge 10.3 into 10.4 2021-11-17 13:59:42 +02:00
Marko Mäkelä
9962cda527 Merge 10.2 into 10.3 2021-11-17 13:55:54 +02:00
Vladislav Vaintroub
9e9e91b3c2 Windows build - fix signtool search path to take modern SDKs into account 2021-11-16 01:51:22 +01:00
Vladislav Vaintroub
c1e1ca20f4 In case WITH_WSREP is enabled, build wsrep as plugin
If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc
´

Allow static plugins to export symbols (on Unix)
wsrep_info relies on wsrep defined symbols (e.g  LOCK_wsrep_config_state)
exported from mysqld
2021-11-09 17:04:49 +02:00
Vladislav Vaintroub
7acf31783c Add new option NOT_EMBEDDED, for plugins
Means, plugin will not be available in embedded, even if compiled-in
2021-11-09 16:57:27 +02:00
Sergei Krivonos
ff08e948d3 Revert "In case WITH_WSREP is enabled, build wsrep as plugin"
This reverts commit e45f7f485a.
2021-11-09 15:44:07 +02:00
Vladislav Vaintroub
e45f7f485a In case WITH_WSREP is enabled, build wsrep as plugin
If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc
´

Allow static plugins to export symbols (on Unix)
wsrep_info relies on wsrep defined symbols (e.g  LOCK_wsrep_config_state)
exported from mysqld
2021-11-09 12:06:49 +02:00
Marko Mäkelä
25ac047baf Merge 10.5 into 10.6 2021-11-09 09:11:50 +02:00
Marko Mäkelä
9c18b96603 Merge 10.4 into 10.5 2021-11-09 08:50:33 +02:00
Marko Mäkelä
47ab793d71 Merge 10.3 into 10.4 2021-11-09 08:40:14 +02:00
Marko Mäkelä
524b4a89da Merge 10.2 into 10.3 2021-11-09 08:26:59 +02:00
Alexey Bychko
2a3dae115b MDEV-22522 RPM packages have meaningless summary/description
added summary/description per package.
2021-11-08 16:45:23 +07:00
Sergei Golubchik
20f7fc6ef2 Merge branch '10.5' into 10.6 2021-11-05 00:17:06 +01:00
Sergei Golubchik
8d7196cdf1 change pcre2 download url
old ftp.pcre.org is apparently down,
www.pcre.org says to use github as the primary download location
2021-11-05 00:02:34 +01:00
Marko Mäkelä
d4a89b9262 Merge 10.5 into 10.6 2021-10-27 10:06:02 +03:00
Anel Husakovic
395a033237 MDEV-22552: mytop packaging
`mytop` and `my_print_defaults` for RPM

- Add `mytop` to client package
- Add man page of `my_print_defaults` to client package
- Add dependencies for RPMs
- Remove old comment
- Remove dead link

Reviewed by: serg@mariadb.com
2021-10-25 12:15:49 +02:00
Marko Mäkelä
9c5835e067 Merge 10.5 into 10.6 2021-10-18 16:36:24 +03:00
Sergei Krivonos
bd1573b0f3 Xcode compatibility update: pcre, mysql-test-run.pl 2021-10-13 18:43:47 +03:00
Otto Kekäläinen
260649de04 Misc improvements to the Gitlab-CI pipeline for MariaDB
- Add new Ninja and Clang build jobs. This helps to ensure those
  toolchains also work in addition to default CMake/gcc.

- Generate dependencies.dot/png to illustrate the CMake/Make/Ninja
  build dependencies. Viewing this image and identifying bottle necks
  in parallelism can help make the build run faster.

- Enable CUnit tests now as they are fixed on 10.6 (MDEV-25820).

- Limit parallel builds to 2 CPUs (full parallelism needs MDEV-25968) on
  CMake/Make. Now only the Ninja builds run full parallel builds as only
  Ninja is smart enough to prevent builds failing on resource
  over-consumption.

- Enable Gitlab-CI cache for job 'centos8' for ccache so that it builds
  faster. Don't use Gitlab-CI cache for other jobs, as it would too easily
  use up all free tier storage on Gitlab.com and force users to get a paid
  account just for MariaDB builds.

- On other jobs clean away ccache, as it only had a 5% hit rate on single
  builds with no downloaded cache.

- Dump full database contents during the test install so that one can
  use diff to compare the database contents at different stages and thus
  track/debug potential bugs in mariadb-install-db and mariadb-upgrade
  code.

Bugfixes:

- Zero out ccache stats before each run so that 'ccache -s' would actually
  show the stats for the latest run.
2021-09-29 20:39:50 -07:00
Marko Mäkelä
d95361107c Merge 10.5 into 10.6 2021-09-24 14:38:52 +03:00
Marko Mäkelä
7e2b42324c Merge 10.4 into 10.5 2021-09-24 08:42:23 +03:00
Marko Mäkelä
9024498e88 Merge 10.3 into 10.4 2021-09-22 18:26:54 +03:00
Alexey Bychko
7d360060cb MDEV-24629 mariadb-connector-c-config conflicts with MariaDB's MariaDB-common-10.5.8-1.fc32.x86_64.rpm
this fix is adding alternative name to MariaDB-common on Fedora.
the fix is placed outside of IF/ELSEIF blocks to do not overwrite
existing one for Fedora.
2021-09-22 01:15:55 +07:00
Alexey Bychko
25d6bbcd51 MDEV-23506 mariadb-connector-c-devel package from standard RHEL 8 repo conflicts with MariaDB's packages
added alternative name for MariaDB-devel package to replace
mariadb-connector-c-devel from RHEL 8 distribution.
this patch is for 10.3+ on RHEL/Centos 8
2021-09-21 14:44:39 +07:00
Marko Mäkelä
15139964d5 Merge 10.5 into 10.6 2021-09-11 17:55:27 +03:00
Vladislav Vaintroub
7e6b033507 Fix MYSQL_MAINTAINER_MODE=ERR, on Windows, with Ninja , in 10.2
A conversion warning 4267 that we want to disable(prior to 10.3),
was suppressed with  cmake VS generator for C++ and C, despite being set
only for CXX flags.

The fix is to disable the warning in C flags, too. In 10.2, this warning
is noisy, in 10.3 it is fixed.
2021-09-11 15:19:42 +02:00
Vicențiu Ciorbaru
7c33ecb665 Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
Vladislav Vaintroub
f68c6ccd20 MDEV-26579 fixup 2021-09-10 09:38:40 +02:00
Vladislav Vaintroub
ca4bc3e3a9 MDEV-26579 Support minor MSI in Windows installer.
With this patch, 4-component MSI version can be used, e.g by setting
TINY_VERSION variable in CMake, or by adding a string, e.g
MYSQL_VERSION_EXTRA=-2
which sets TINY_VERSION to 2, and also changes the package name.

The 4-component MSI versions do not support MSI major upgrades, only minor
ones, i.e do not reinstall components, just update existing ones based
on versioning rules.

To support these rules, add DefaultVersion for the files that won't
otherwise be versioned - headers, static and import libraries,
pdbs, text - xml, python and perl scripts Also silence WiX warning
that MSI won't store hashes for those files anymore.
2021-09-10 02:20:16 +02:00
Vicențiu Ciorbaru
de7e027d5e Merge remote-tracking branch 'upstream/10.3' into 10.4 2021-09-09 09:23:35 +03:00
Sergei Golubchik
a6383a1954 Merge branch '10.2' into 10.3 2021-09-07 23:24:06 +02:00
Sergei Golubchik
0d3de06eda disable bzip2/lz4/lzo in rpm builds, distro dependent 2021-09-07 21:13:04 +02:00
Sergei Golubchik
ca2f89deac disable bzip2/lz4/lzo in bintar builds, as they always have been 2021-09-07 21:13:04 +02:00
Vicențiu Ciorbaru
b85b8348e7 Merge branch '10.2' into 10.3 2021-09-07 16:32:35 +03:00
Vladislav Vaintroub
999d254cf2 MDEV-26527 speedup appveyor build
Introduce -DFAST_BUILD parameter for a little faster build or test

if set,
- do not compile with /d2OptimizeHugeFunctions, this makes compilation
of bison output much slower on optimized build
- do not use runtime checks on debug build (RTC1). This slows down tests
considerably
2021-09-06 13:55:14 +02:00
Marko Mäkelä
e94172c2a0 Merge 10.5 into 10.6 2021-08-31 11:00:41 +03:00
Sergei Golubchik
1597b3d76b disable bzip2, lzma, and lzo explicitly in debian release builds
we don't build debian release builds with them anyway,
but let's make it explicit, independently on what happens to be
installed on the builder.
2021-08-31 09:50:57 +02:00
Sergei Golubchik
7271cf48d6 bugfix: don't filter out lzma from rpm dependencies
(this was needed only for tokudb that bundled liblzma)
2021-08-28 10:37:37 +02:00
Alexey Bychko
4b6ef03dcd MDEV-26438 cmake < 3.6.0 produced RPMs with invalid names
replaced CPACK_RPM_PACKAGE_VERSION with SERVER_VERSION.
CPACK_* variables are empty and can't be used until INCLUDE(CPack) is
called.
SERVER_VERSION is the safest option because other variables may be
overwritten from submodules
2021-08-27 12:54:42 +07:00
Marko Mäkelä
ded27d2896 Merge 10.5 into 10.6 2021-08-25 08:15:20 +03:00
Marko Mäkelä
1b2acc5b9d Merge 10.4 into 10.5 2021-08-25 07:53:23 +03:00
Marko Mäkelä
e696e9e63f Merge 10.3 into 10.4 2021-08-25 07:30:47 +03:00
Marko Mäkelä
9f8871db2f Merge 10.2 into 10.3 2021-08-25 07:28:04 +03:00
Daniel Black
ece30d47ca MDEV-26109: s390x detected as 32bit in mtr tests
Currently @@version_compile_machine is used by mtr
to determine if the compiled executable is 32 or 64
bits.

We extend that logic by ensuring that if the DEFAUT_MACHINE
name doesn't have "64" in its string, "-64bits" is appended
to ensure these test pass.
2021-08-25 08:18:10 +10:00
Marko Mäkelä
f3fcf5f45c Merge 10.5 to 10.6 2021-08-19 12:25:00 +03:00
Marko Mäkelä
4a25957274 Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
Marko Mäkelä
f84e28c119 Merge 10.3 into 10.4 2021-08-18 16:51:52 +03:00
Marko Mäkelä
cd65845a0e Merge 10.2 into 10.3
MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
2021-08-18 12:26:58 +03:00
Vladislav Vaintroub
f725020ff7 Fix cmake warning caused by 751ebe44fd
CMake Warning (dev) at cmake/plugin.cmake:288 (GET_TARGET_PROPERTY):
  Policy CMP0045 is not set: Error on non-existent target...

Also, fix condition argument in ADD_FEATURE_INFO. It is not a string
but boolean
2021-08-09 18:00:22 +02:00
Vladislav Vaintroub
78c7d50e4f Fix cmake warning caused by 751ebe44fd
CMake Warning (dev) at cmake/plugin.cmake:288 (GET_TARGET_PROPERTY):
  Policy CMP0045 is not set: Error on non-existent target...

Also, fix condition argument in ADD_FEATURE_INFO. It is not a string
but boolean
2021-08-09 11:52:03 +02:00
Oleksandr Byelkin
7ae6ef5236 Merge branch '10.5' into 10.6 2021-08-03 11:21:22 +02:00
Sergei Golubchik
175c9fe1d5 cleanup: specifying plugin dependencies in CMakeLists.txt
1. rename option DEPENDENCIES in MYSQL_ADD_PLUGIN() to DEPENDS
   to be consistent with other cmake commands and macros

2. use this DEPENDS option in plugins

3. add dependencies to the plugin embedded target too

4. plugins don't need to add GenError dependency explicitly,
   all plugins depend on it automatically
2021-08-03 10:10:00 +02:00
Oleksandr Byelkin
42bf65177a update PCRE2 2021-08-02 20:45:40 +02:00
Oleksandr Byelkin
6efb5e9f5e Merge branch '10.5' into 10.6 2021-08-02 10:11:41 +02:00
Oleksandr Byelkin
ae6bdc6769 Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
Oleksandr Byelkin
7841a7eb09 Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00