Commit graph

2009 commits

Author SHA1 Message Date
Sergei Golubchik
99a433ed1c Merge branch '10.6' into 10.7 2022-05-18 10:34:38 +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
Sergei Golubchik
443c2a715d Merge branch '10.7' into 10.8 2022-05-11 12:21:36 +02:00
Sergei Golubchik
fd132be117 Merge branch '10.6' into 10.7 2022-05-11 11:25:33 +02:00
Julius Goryavsky
404984980f MDEV-28500: Hashicorp: Debian packaging is broken
This commit fixes a documentation installation
issue (for debian packaging) and generally brings
the installation control files up to date (as for
the rest of the components).
2022-05-10 08:22:21 +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
Daniel Black
7ae46ced37 Merge branch 10.8 into 10.9
Closes #2084
2022-04-06 14:33:27 +10:00
Daniel Black
7b06bc9a94 Merge branch 10.7 into 10.8
Closes #2083
2022-04-06 14:23:20 +10:00
Daniel Black
32ab64c390 MDBF-348: libfmt=system, custom include path
With testing the system libfmt, use the
LIBFMT_INCLUDE_DIR in case the system
include path isn't sufficient.
2022-04-01 20:53:22 +11:00
Marko Mäkelä
8680eedb26 Merge 10.8 into 10.9 2022-03-30 09:41:14 +03:00
Marko Mäkelä
5c69e93630 Merge 10.7 into 10.8 2022-03-30 09:34:07 +03:00
Marko Mäkelä
a4d753758f Merge 10.6 into 10.7 2022-03-30 08:52:05 +03: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
Jan Lindström
7878eae95e Small fixes
Add new requirement for pv tool for debian and rpm
  Fix one test result difference.
  Set message about missing progress reporting tool pv as info.
2022-03-18 20:50:10 +01:00
Marko Mäkelä
3553cfd025 Merge 10.7 into 10.8 2022-02-14 09:43:29 +02:00
Marko Mäkelä
33fd136c61 Merge 10.6 into 10.7 2022-02-14 09:26:18 +02: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
Sergei Golubchik
6009f9b859 make zstd in C/C optional and disable it for now in RPM/DEB 2022-02-05 02:03:04 +01:00
Oleksandr Byelkin
64e358821e 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.
2022-02-04 14:52:03 +01:00
Oleksandr Byelkin
4fb2cb1a30 Merge branch '10.7' into 10.8 2022-02-04 14:50:25 +01:00
Oleksandr Byelkin
9ed8deb656 Merge branch '10.6' into 10.7 2022-02-04 14:11:46 +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
Sergei Golubchik
baef53a70c MDEV-27540 Different OpenSSL versions mix up in build depending on cmake options
list ${OPENSSL_ROOT_DIR}/lib64 explicitly, because
cmake below version 3.23.0 won't search there.
2022-01-20 16:01:10 +01:00
Vladislav Vaintroub
d42c2efbaa 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
2022-01-20 16:01:10 +01:00
Vladislav Vaintroub
e222e44d1b Merge branch 'preview-10.8-MDEV-26713-Windows-i18-support' into 10.8 2022-01-18 21:37:52 +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ä
a23f3ee84e Merge 10.6 into 10.7 2022-01-12 13:14:58 +02: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
Vladislav Vaintroub
ba9d231b5a MDEV-26713 Set activeCodePage=UTF8 for windows programs
- Use corresponding entry in the manifest, as described in
https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

- If if ANSI codepage is UTF8 (i.e for Windows 1903 and later)
  Use UTF8 as default client charset
  Set console codepage(s) to UTF8, in case process is using console

- Allow some previously disabled MTR tests, that used Unicode for in "exec",
  for the recent Windows versions
2021-12-15 19:13:57 +01:00
Vladislav Vaintroub
ea0a5cb0a4 MDEV-27092 Windows - services that have non-ASCII characters do not work with activeCodePage=UTF8
CreateServiceA, OpenServiceA, and couple of other functions do not work
correctly with non-ASCII character, in the special case where application
has defined activeCodePage=UTF8.

Workaround by redefining affected ANSI functions to own wrapper, which
works by converting narrow(ANSI) to wide, then calling wide function.

Deprecate original ANSI service functions, via declspec, so that we can catch
their use.
2021-12-15 19:13:57 +01:00
Sergei Golubchik
ef77c05126 Merge branch '10.6' into 10.7 2021-12-08 10:33:36 +01:00
Sergei Golubchik
60d565e66a cmake: detect lz4 version, require >= 1.6 2021-12-08 10:31:00 +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ä
c22107fd90 Merge 10.6 into 10.7 2021-11-29 11:42:07 +02: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ä
7e8a13d9d7 Merge 10.6 into 10.7 2021-11-19 17:45:52 +02: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ä
06988bdcaa Merge 10.6 into 10.7 2021-11-09 09:40:29 +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
db8248d0cd Merge branch '10.6' into 10.7 2021-11-05 00:21:23 +01: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
Sergei Golubchik
0a17a526c1 workaround for gcc bug 7302
it's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
fixed in 2011
affects fmtlib: https://github.com/fmtlib/fmt/issues/1936
2021-10-30 11:08:57 +02:00
Kartik Soneji
bf8b699f64 MDEV-12933 sort out the compression library chaos
bzip2/lz4/lzma/lzo/snappy compression is now provided via *services*

they're almost like normal services, but in include/providers/
and they're supposed to provide exactly the same interface
as original compression libraries (but not everything,
only enough of if for the code to compile).

the services are implemented via dummy functions that return
corresponding error values (LZMA_PROG_ERROR, LZO_E_INTERNAL_ERROR, etc).

the actual compression libraries are linked into corresponding
provider plugins. Providers are daemon plugins that when loaded
replace service pointers to point to actual compression functions.

That is, run-time dependency on compression libraries is now on plugins,
and the server doesn't need any compression libraries to run, but
will automatically support the compression when a plugin is loaded.

InnoDB and Mroonga use compression plugins now. RocksDB doesn't,
because it comes with standalone utility binaries that cannot
load plugins.
2021-10-27 15:55:14 +02:00
Kartik Soneji
c356714d77 Change Find*.cmake modules to match conventions 2021-10-27 15:55:14 +02:00
Marko Mäkelä
da46c37bc7 Merge 10.6 into 10.7 2021-10-27 10:24:08 +03:00
Marko Mäkelä
d4a89b9262 Merge 10.5 into 10.6 2021-10-27 10:06:02 +03:00
Sergei Golubchik
2897ef099c libfmt fix for cmake <3.0
this is CentOOOOOOS 7
2021-10-25 21:37:16 +02: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ä
71d4ecf182 Merge 10.6 into 10.7 2021-10-22 14:41:47 +03: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
Sergei Golubchik
ba7287df61 disallow old <7.0 fmt
libfmt 6.1 is in Ubuntu focal repositories.
it's easy to compile with 6.1 by doing
#define detail internal

but 6.1 also produces different results in main.func_sformat
and we want MariaDB to behave identically everywhere.
2021-10-12 13:28:10 +02:00
Sergei Golubchik
fe65ca0176 don't build bundled libfmt, we use it in header-only mode anyway 2021-10-12 13:28:10 +02:00
Alan Cueva
e214e60201 MDEV-25015 Custom formatting of strings in MariaDB queries
SFORMAT() SQL function that uses fmtlib (https://fmt.dev/)
for python-like (also Rust, C++20, etc) string formatting

Only fmtlib 7.0.0+ is supported, older fmtlib
produces different results in the test.

No native support for temporal and decimal values,
* TIME_RESULT is handled as STRING_RESULT
* DECIMAL_RESULT as REAL_RESULT
2021-10-12 13:27:36 +02: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
Sergei Golubchik
07674e6a74 MDEV-26165 Failed to upgrade from 10.4 to 10.6
It shouldn't be possible to install an old MariaDB-common
with a new MariaDB-server or vice versa.
2021-07-30 07:51:58 +02:00
Marko Mäkelä
b50ea90063 Merge 10.2 into 10.3 2021-07-22 18:57:54 +03:00
Sergei Golubchik
6190a02f35 Merge branch '10.2' into 10.3 2021-07-21 20:11:07 +02:00
Heinz Wiesinger
751ebe44fd Add feature summary at the end of cmake.
This gives a short overview over found/missing dependencies as well
as enabled/disabled features.

Initial author Heinz Wiesinger <heinz@m2mobi.com>
Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org>
* Report all plugins enabled via MYSQL_ADD_PLUGIN
* Simplify code. Eliminate duplication by making use of WITH_xxx
  variable values to set feature "ON" / "OFF" state.

Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
2021-07-21 10:22:56 +03:00
Robert Bindar
b082716892 MDEV-21206 Can't link zlib library during DBD::mysql installation
mysql_config should never return -lzlib as linking flag.
Clients trying to link against mariadb that use the output of
mysql_config experience linking error because we return -lzlib
when we don't ship any libzlib.a in our binary tarballs, bundled
zlib static library is already linked.
2021-07-12 12:42:30 +03:00
Marko Mäkelä
0ad8a825a8 Merge 10.5 into 10.6 2021-07-02 17:00:05 +03:00
Marko Mäkelä
8c029d426a Merge 10.4 into 10.5 2021-07-02 16:19:25 +03:00
Marko Mäkelä
372ea88264 Merge 10.3 into 10.4 2021-07-02 14:55:52 +03:00
Marko Mäkelä
f9194d02da Merge 10.2 into 10.3 2021-07-02 14:41:41 +03:00
Eugene Kosov
ffe744e77d submodules.cmake: add missing --depth=1 2021-07-02 13:25:20 +03:00
Marko Mäkelä
15dcb8bd3e Merge 10.4 into 10.5 2021-07-02 13:02:26 +03:00
Sergei Petrunia
eebe2090c8 Merge 10.3 -> 10.4 2021-06-30 18:41:46 +03:00
Sergei Petrunia
586870f9ef Merge 10.2->10.3 2021-06-30 15:06:54 +03:00
Alexey Bychko
aaaed9baa0 MDEV-25960 yum update overwrites customized logrotation config (/etc/logrotate.d/mysql)
added %config directive to /etc/logrotate.d/mysql and put it to server
package. if file is edited by customer and defaults are changed - new
.rpmnew file with defaults will be created next to old one.
2021-06-22 18:57:01 +07:00
Marko Mäkelä
4dfec8b230 Merge 10.5 into 10.6 2021-06-21 17:49:33 +03:00
Marko Mäkelä
a42c80bd48 Merge 10.4 into 10.5 2021-06-21 14:22:22 +03:00
Marko Mäkelä
d3e4fae797 Merge 10.3 into 10.4 2021-06-21 12:38:25 +03:00
Marko Mäkelä
c9a85fb1b1 Merge 10.2 into 10.3 2021-06-21 09:07:40 +03:00
Otto Kekäläinen
b7d87bf0a9 MDEV-20392: Skip ABI check if 'diff' is not found
Not all environments have 'diff' installed. Most notably CentOS 8
does not have diff out-of-the-box. Thus users running 'cmake .' and
'make' would fail to build MariaDB, and they would think the error
was in ABI incompatibilities due to the error message emitted by CMake
when in reality simply 'diff' was missing.

This fixes it and makes the developer experience better by simply skipping
the diffing if 'diff' is not found.

## Proof

Running in a clean CentOS 8 container.

### Before

```
$ cmake .
...
-- Looking for cpuid.h
-- Looking for cpuid.h - found
-- Looking for x86intrin.h
-- Looking for x86intrin.h - found
-- Looking for event.h
-- Looking for event.h - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /build

$ make
Scanning dependencies of target abi_check
CMake Error at cmake/do_abi_check.cmake:82 (MESSAGE):
  ABI check found difference between /build/include/mysql/plugin_audit.h.pp
  and /build/abi_check.out

make[2]: *** [CMakeFiles/abi_check.dir/build.make:57: CMakeFiles/abi_check] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/abi_check.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

$ yum install -y diffutils
...
Installed:
  diffutils-3.6-6.el8.x86_64
Complete!

$ make
[  0%] Built target abi_check
Scanning dependencies of target INFO_BIN
[  0%] Built target INFO_BIN
Scanning dependencies of target INFO_SRC
[  0%] Built target INFO_SRC
Scanning dependencies of target wsrep_api_v26
[  0%] Building C object wsrep-lib/wsrep-API/CMakeFiles/wsrep_api_v26.dir/v26/wsrep_dummy.c.o
[  0%] Building C object wsrep-lib/wsrep-API/CMakeFiles/wsrep_api_v26.dir/v26/wsrep_gtid.c.o
[  0%] Building C object wsrep-lib/wsrep-API/CMakeFiles/wsrep_api_v26.dir/v26/wsrep_loader.c.o
[  0%] Building C object wsrep-lib/wsrep-API/CMakeFiles/wsrep_api_v26.dir/v26/wsrep_uuid.c.o
[  0%] Linking C static library libwsrep_api_v26.a
[  0%] Built target wsrep_api_v26
```

### After

```
$ make
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_audit.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_ftparser.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/psi/psi_abi_v1.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/psi/psi_abi_v2.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/client_plugin.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_auth.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_password_validation.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_encryption.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_data_type.h skipped.
Command 'diff' not found. ABI check for /build/server/include/mysql/plugin_function.h skipped.
[  0%] Built target abi_check
[  0%] Built target INFO_SRC
[  0%] Built target INFO_BIN
[  0%] Built target wsrep_api_v26
[  0%] Building CXX object wsrep-lib/src/CMakeFiles/wsrep-lib.dir/server_state.cpp.o
```

If diff is installed, those warnings are simply not shown. Builds pass
without the need to install 'diff'.
2021-06-18 08:18:13 +10:00
Daniel Black
be243ed9e3 cmake OpenBSD copyright notice correction
Brad Smith made this OpenBSD file based of the
FreeBSD cmake directives in commit ab58904367
by the Monty Program Ab.

As such the Oracle Copyright header isn't really applicable.
2021-06-15 12:42:10 +10:00
Brad Smith
4352c77c5a Link with libexecinfo on OpenBSD for stacktrace functionality. 2021-06-11 10:31:26 +10:00
Otto Kekäläinen
152c83d49c MDEV-20392: Skip ABI check if 'diff' is not found
Not all environments have 'diff' installed. Most notably CentOS 8
does not have diff out-of-the-box. Thus users running 'cmake .' and
'make' would fail to build MariaDB, and they would think the error
was in ABI incompatibilities due to the error message emitted by CMake
when in reality simply 'diff' was missing.

This fixes it and makes the developer experience better by simply
skipping the diffing if 'diff' is not found.

Closes #1846
2021-06-10 12:47:01 +02:00
Sergei Golubchik
bafec28e43 rpm packaging: account for fedora > 31
RocksDB failed to package on fedora 32 and 33 with

*** ERROR: ambiguous python shebang in /usr/bin/myrocks_hotbackup: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
2021-06-09 18:36:43 +02:00
Marko Mäkelä
f4425d3a3d Merge 10.4 into 10.5 2021-06-08 16:03:53 +03:00
Marko Mäkelä
72b2489621 Merge 10.3 into 10.4 2021-06-08 15:02:40 +03:00
Marko Mäkelä
6e9642beb2 Merge 10.2 into 10.3 2021-06-08 14:33:07 +03:00
Vladislav Vaintroub
5ba4c4200c MDEV-25870 Windows - fix ARM64 cross-compilation 2021-06-07 23:15:36 +02:00
Vladislav Vaintroub
3d6eb7afcf MDEV-25602 get rid of __WIN__ in favor of standard _WIN32
This fixed the MySQL bug# 20338 about misuse of double underscore
prefix __WIN__, which was old MySQL's idea of identifying Windows
Replace it by _WIN32 standard symbol for targeting Windows OS
(both 32 and 64 bit)

Not that connect storage engine is not fixed in this patch (must be
fixed in "upstream" branch)
2021-06-06 13:21:03 +02:00
Anel Husakovic
7eed97ed9f MDEV-25777: JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with out of source configuration and Ninja generator
- As solution `PLUGIN_CONNECT=NO` use early check to disable plugin:
  Solution suggested by wlad@mariadb.com
- `JNI_FOUND` is a internal result variable and should be set with
cached library and header variables (like `JAVA_INCLUDE_PATH`) defined.
  * Note: wrapper cmake/FindJNI.cmake runs first time and cmake native Find<module> returns only cached variable, like `JAVA_INCLUDE_PATH`, results variable are not cached).

Reviewed by: serg@mariadb.com
2021-06-04 10:52:18 +02:00
Marko Mäkelä
a722ee88f3 Merge 10.5 into 10.6 2021-06-01 11:39:38 +03:00
Daniel Black
90adf2aa59 perfschema: use glibc gettid if available 2021-06-01 13:51:39 +10:00
Anel Husakovic
904edfd24b MDEV-25777: JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with out of source configuration and Ninja generator
- As solution `PLUGIN_CONNECT=NO` use early check to disable plugin:
  Solution suggested by wlad@mariadb.com
- `JNI_FOUND` is a internal result variable and should be set with
cached library and header variables (like `JAVA_INCLUDE_PATH`) defined.
  * Note: wrapper cmake/FindJNI.cmake runs first time and cmake native Find<module> returns only cached variable, like `JAVA_INCLUDE_PATH`, results variable are not cached).

Reviewed by: serg@mariadb.com
2021-05-28 21:03:48 +02:00
Sergei Golubchik
4777097fee followup: rename generated files to have distinct names 2021-05-27 00:40:23 +02:00
Marko Mäkelä
860e754349 Merge 10.5 into 10.6 2021-05-26 11:22:40 +03:00
Marko Mäkelä
365cd08345 Merge 10.4 into 10.5 2021-05-26 09:47:28 +03:00
Marko Mäkelä
1dea7f7977 Merge 10.3 into 10.4 2021-05-25 15:38:57 +03:00
Marko Mäkelä
1864a8ea93 Merge 10.2 into 10.3 2021-05-24 09:38:49 +03:00
Sergei Golubchik
f70b11c8c9 cmake: fewer Build-Depends in SRPM
don't require tar/gtar, git, getconf, groff/nroff, and ruby.
2021-05-22 21:56:51 +02:00
Sergei Golubchik
9d0fde3ba1 cmake: silence repeated git searches too 2021-05-22 21:56:51 +02:00
Sergei Golubchik
f9f8cae9fe cmake: fix FindJava/FindJNI wrappers for cmake re-runs
when cmake is re-run and include(FindJAVA) is skipped,
JAVA_FOUND should still be set. Same for JNI.
2021-05-22 21:56:51 +02:00
Sergei Golubchik
681918a849 MDEV-24996 file conflict in rpm packages 2021-05-22 21:56:51 +02:00
Sergei Golubchik
ecd6588454 show pmem detection in cmake 2021-05-19 22:58:34 +02:00
Monty
f2e3f0db6d Added comment to create_inital_db.cmake of how to run it 2021-05-19 22:54:11 +02:00
Sergei Golubchik
9bbedcdd59 don't require jemalloc for 10.5 official packages
it was only for TokuDB, and TokuDB isn't packaged in 10.5
2021-05-19 16:10:13 +02:00
Marko Mäkelä
f8665314d4 Merge 10.5 into 10.6 2021-05-10 11:42:04 +03:00
Marko Mäkelä
0e1437e147 Merge 10.4 into 10.5 2021-05-10 10:01:15 +03:00
Marko Mäkelä
8c73fab7f7 Merge 10.3 into 10.4 2021-05-10 09:52:01 +03:00
Marko Mäkelä
98e6159892 Merge 10.2 into 10.3 2021-05-10 09:09:50 +03:00
Vladislav Vaintroub
bc64a03c3a Windows - Fix CMAKE_INTERPROCEDURAL_OPTIMIZATION build with MSVC
If IPO is enabled, MSVC compiles with /GL  which is not
compatible with cmake's WINDOWS_EXPORT_ALL_SYMBOLS.

Since server.dll can't autoexport symbols from /GL compiled objects,
IPO must be disabled for dbug, string,mysys, and sql targets (in case we
build "plugin" DLLs that need server.dll's symbols)
2021-05-09 23:51:18 +02:00
Sergei Golubchik
e1bf1aea5c force jemalloc to be used in release rpm/deb builds
unless explicitly overruled with -DWITH_JEMALLOC=no
2021-05-08 18:02:34 +02:00
Marko Mäkelä
916b237b3f Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
Nikita Malyavin
3f55c56951 Merge branch bb-10.4-release into bb-10.5-release 2021-05-05 23:57:11 +03:00
Nikita Malyavin
509e4990af Merge branch bb-10.3-release into bb-10.4-release 2021-05-05 23:03:01 +03:00
Oleksandr Byelkin
4f143a88bc Fix of ppc64 by Wlad 2021-05-05 17:21:05 +02:00
Marko Mäkelä
ed4b2b3f95 Merge 10.5 into 10.6 2021-04-26 08:40:36 +03:00
Sergei Golubchik
a40f29ab19 MYSQL_MAINTAINER_MODE fixes
* MSVC check was lost in a bad merge
* add a comment
* move AIX check where it belongs and where it would still
  allow -Werror, if desired
2021-04-22 17:52:08 +02:00
Marko Mäkelä
4930f9c94b Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
Marko Mäkelä
80ed136e6d Merge 10.4 into 10.5 2021-04-21 09:01:01 +03:00
Monty
031f11717d Fix all warnings given by UBSAN
The easiest way to compile and test the server with UBSAN is to run:
./BUILD/compile-pentium64-ubsan
and then run mysql-test-run.
After this commit, one should be able to run this without any UBSAN
warnings. There is still a few compiler warnings that should be fixed
at some point, but these do not expose any real bugs.

The 'special' cases where we disable, suppress or circumvent UBSAN are:
- ref10 source (as here we intentionally do some shifts that UBSAN
  complains about.
- x86 version of optimized int#korr() methods. UBSAN do not like unaligned
  memory access of integers.  Fixed by using byte_order_generic.h when
  compiling with UBSAN
- We use smaller thread stack with ASAN and UBSAN, which forced me to
  disable a few tests that prints the thread stack size.
- Verifying class types does not work for shared libraries. I added
  suppression in mysql-test-run.pl for this case.
- Added '#ifdef WITH_UBSAN' when using integer arithmetic where it is
  safe to have overflows (two cases, in item_func.cc).

Things fixed:
- Don't left shift signed values
  (byte_order_generic.h, mysqltest.c, item_sum.cc and many more)
- Don't assign not non existing values to enum variables.
- Ensure that bool and enum values are properly initialized in
  constructors.  This was needed as UBSAN checks that these types has
  correct values when one copies an object.
  (gcalc_tools.h, ha_partition.cc, item_sum.cc, partition_element.h ...)
- Ensure we do not called handler functions on unallocated objects or
  deleted objects.
  (events.cc, sql_acl.cc).
- Fixed bugs in Item_sp::Item_sp() where we did not call constructor
  on Query_arena object.
- Fixed several cast of objects to an incompatible class!
  (Item.cc, Item_buff.cc, item_timefunc.cc, opt_subselect.cc, sql_acl.cc,
   sql_select.cc ...)
- Ensure we do not do integer arithmetic that causes over or underflows.
  This includes also ++ and -- of integers.
  (Item_func.cc, Item_strfunc.cc, item_timefunc.cc, sql_base.cc ...)
- Added JSON_VALUE_UNITIALIZED to json_value_types and ensure that
  value_type is initialized to this instead of to -1, which is not a valid
  enum value for json_value_types.
- Ensure we do not call memcpy() when second argument could be null.
- Fixed that Item_func_str::make_empty_result() creates an empty string
  instead of a null string (safer as it ensures we do not do arithmetic
  on null strings).

Other things:

- Changed struct st_position to an OBJECT and added an initialization
  function to it to ensure that we do not copy or use uninitialized
  members. The change to a class was also motived that we used "struct
  st_position" and POSITION randomly trough the code which was
  confusing.
- Notably big rewrite in sql_acl.cc to avoid using deleted objects.
- Changed in sql_partition to use '^' instead of '-'. This is safe as
  the operator is either 0 or 0x8000000000000000ULL.
- Added check for select_nr < INT_MAX in JOIN::build_explain() to
  avoid bug when get_select() could return NULL.
- Reordered elements in POSITION for better alignment.
- Changed sql_test.cc::print_plan() to use pointers instead of objects.
- Fixed bug in find_set() where could could execute '1 << -1'.
- Added variable have_sanitizer, used by mtr.  (This variable was before
  only in 10.5 and up).  It can now have one of two values:
  ASAN or UBSAN.
- Moved ~Archive_share() from ha_archive.cc to ha_archive.h and marked
  it virtual. This was an effort to get UBSAN to work with loaded storage
  engines. I kept the change as the new place is better.
- Added in CONNECT engine COLBLK::SetName(), to get around a wrong cast
  in tabutil.cpp.
- Added HAVE_REPLICATION around usage of rgi_slave, to get embedded
  server to compile with UBSAN. (Patch from Marko).
- Added #ifdef for powerpc64 to avoid a bug in old gcc versions related
  to integer arithmetic.

Changes that should not be needed but had to be done to suppress warnings
from UBSAN:

- Added static_cast<<uint16_t>> around shift to get rid of a LOT of
  compiler warnings when using UBSAN.
- Had to change some '/' of 2 base integers to shift to get rid of
  some compile time warnings.

Reviewed by:
- Json changes: Alexey Botchkov
- Charset changes in ctype-uca.c: Alexander Barkov
- InnoDB changes & Embedded server: Marko Mäkelä
- sql_acl.cc changes: Vicențiu Ciorbaru
- build_explain() changes: Sergey Petrunia
2021-04-20 12:30:09 +03:00
Marko Mäkelä
6729dd894c Merge 10.5 into 10.6 2021-04-14 13:39:28 +03:00
Marko Mäkelä
d2e2d32933 Merge 10.5 into 10.6 2021-04-14 12:32:27 +03:00
David CARLIER
9a3cbc0541 mysqld: print status display subset of memory usage.
leveling up to some degree with linux's mallinfo* api for
 the memory usage display with debug build with malloc_zone
 Darwin api.

Closes: #1803
2021-04-14 19:21:35 +10:00
Marko Mäkelä
6c3e860cbf Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
Marko Mäkelä
5008171b05 Merge 10.3 into 10.4 2021-04-14 10:33:59 +03:00
Marko Mäkelä
ef26a30486 Merge 10.2 into 10.3 2021-04-14 07:54:43 +03:00