Commit graph

186516 commits

Author SHA1 Message Date
Olivier Bertrand
45b9fa4a8a Fix compile error in tabcmg.cpp 2020-03-12 23:25:18 +01:00
Olivier Bertrand
4a8b55330c Resolved ha_connect.cc and CMakeLists.txt 2020-03-12 19:36:54 +01:00
Olivier Bertrand
d26b4eb4c0 Pull new version from origin 2020-03-12 19:16:36 +01:00
Olivier Bertrand
4ba36cfa0c - Fix https://stackoverflow.com/questions/60625778/import-complex-xml-from-multiple-files-in-mariadb/60637429#60637429
Import complex XML from multiple files in MariaDB
  Some row results are missing and replaced by the last file one.
  Thats because Nx and Sx column members are not reset when changing file.
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h
2020-03-12 19:06:03 +01:00
Jan Lindström
51e9381dcc Add galera debug sync to galera_slave_replay test. 2020-03-12 08:59:06 +02:00
Monty
cebf43e166 Fixed wrong assert (found by clang) 2020-03-11 22:04:06 +02:00
Oleksandr Byelkin
3c9bc0ce19 Merge branch '10.2' into 10.3 2020-03-11 14:05:41 +01:00
Aleksey Midenkov
8fa1b6bb88 MDEV-15724 - Possible crash in parser
Parser: uninitialized Lex->create_last_non_select_table under
mysql_unpack_partition() fix.

Tested with main, parts suites.
2020-03-11 08:40:37 +02:00
Marko Mäkelä
02343c4a54 MDEV-19740: Correct a type mismatch WITH_INNODB_EXTRA_DEBUG 2020-03-10 15:47:52 +02:00
Eugene Kosov
2b8b85bd0a fix use-after-free 2020-03-10 15:14:53 +03:00
Marko Mäkelä
69e4c74e07 Make main.mysql_client_test non-great again
Re-enable main.mysql_client_test on all builders, because
at the moment we do not run any --big-test on buildbot
due to resource constraints.

A number of tests were declared big in
commit eeee1832d7
in an attempt to save resources on buildbot.
2020-03-10 13:32:49 +02:00
Marko Mäkelä
8cd6cee876 Merge 10.1 into 10.2 2020-03-10 13:29:10 +02:00
Marko Mäkelä
1c40cb6877 Do not bother to disable non-existing tests 2020-03-10 13:27:05 +02:00
Marko Mäkelä
7a52b6fd25 Minor cleanup of main.partition_innodb
Stop masking the Data_free values, because innodb_file_per_table=1
is the default.

Also, do mask Update_time after updating tables, even though for
some reason it does appear to matter.
2020-03-09 13:00:33 +02:00
Jan Lindström
2bf4e574ad MDEV-21758 : Events switched randomly to SLAVESIDE_DISABLED
Change events only on Galera environment where idea is that
event is enabled only on one node of the cluster and nodes
are identified by server_id.
2020-03-09 12:19:11 +02:00
Vicențiu Ciorbaru
fd2dc9c3fd Correctly link mysqlclient.pc to mariadb.pc under multi-arch support 2020-03-08 16:19:43 +02:00
Vicențiu Ciorbaru
1d99e4d674 Merge branch '10.2' into 10.3 2020-03-08 11:02:55 +02:00
Vicențiu Ciorbaru
d7f74150e5 Check for CPU_COUNT macro within my_getncpus
* Small refactor of my_getncpus function to compile for very old glibc < 2.6.
* Cleanup code to eliminate duplication.
2020-03-08 10:48:09 +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
Oleksandr Byelkin
75d286c2cc Merge branch '10.1' into 10.2 2020-03-06 15:42:45 +01:00
Stepan Patryshev
91aae18cc4 Enable galera.galera_ist_mariabackup and galera.mysql-wsrep#33. 2020-03-06 13:46:19 +02:00
Oleksandr Byelkin
345aaca14c Merge branch '5.5' into 10.1 2020-03-06 11:06:48 +01:00
Vicențiu Ciorbaru
c5c1027c6e MDEV-19208 mariadb.pc: install into libdir
The .pc file installed by mariadb mentions archful directories and
therefore must be archful itself.

This fixes MDEV-14340.
2020-03-05 10:53:16 +02:00
Vicențiu Ciorbaru
da10c6f448 Merge branch '10.1' into 10.2 2020-03-05 10:52:43 +02:00
Anel Husakovic
f8ab5ca374 MDEV-20382: SHOW PRIVILEGES displays "Delete versioning rows" rather than "Delete History" 2020-03-05 09:14:47 +01:00
Vladislav Vaintroub
f0d2542a37 MDEV-21857 - Fix sporadic failure of mdev375
status threads_connected can temporarily be bigger than max_connections+1

If SHOW STATUS LIKE "Threads_connected" comes after
ER_CON_COUNT_ERROR is sent to the client, but before the counter is
decremented, Threads_connected can differ from the expected value.
2020-03-02 16:35:57 +01:00
Vicențiu Ciorbaru
395f23a10d Remove unneded extra context line from test file to make it version independent 2020-02-28 19:54:08 +02:00
Ben Boeckel
f21592c675 mariadb.pc: remove unnecessary include directory
When installing, no headers are installed into the parent directory of
`${includedir}`.
2020-02-26 13:18:51 +02: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
Alexey Bychko
42b29d4133 MENT-645 Undefined symbols for architecture x86_64: _pam_syslog
added cmake checks for pam_ext.h and pam_appl.h headers
added check for pam_syslog()
added pam_syslog() if doesn't exist
all cmake checks performed from inside the plugin
2020-02-25 18:52:27 +01:00
Sergei Petrunia
a662cb9b43 Better comments 2020-02-25 14:55:15 +03:00
Igor Babaev
cfa0506f8a MDEV-21554 Crash in JOIN_CACHE_BKAH::skip_index_tuple when mrr=on and
join_cache_level=6+

The patch fixes two similar bugs in the commit 8eeb689e9f
that added multi_range_read support to partitions. The commit opened
a possibility to join a partition table using BKA+MRR. However in some
cases it could lead to wrong results or even crashes.

This could happened when
- index condition pushdown was used to join the table or
- the joined table was an inner table of an outer join and 'not exist'
  optimization was applied or
- the join table was the inner table of a semi-join and the first match
  optimization was applied

The bugs were in the code of the call-back functions
- partition_multi_range_key_skip_record() and
- partition_multi_range_key_skip_index_tuple().
Each of this function consist only of an invocation of another function.
Yet a wrong parameter was passed at this invocation.

The fix was suggested by Sergey Petrunia and it is apparently in line
with original design.
The corresponding comprehensive test cases demonstrating the problems
caused by the bugs were constructed by me.
2020-02-25 00:50:23 -08: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
Daniel Black
cd5d864fef mariadb{,@}.service comment typo open-file-limit -> open-files-limit 2020-02-25 07:39:31 +01:00
seppo
4618c974e4
MDEV-21723 Async slave thread BF abort and replaying fixes (#1448)
If async replication slave thread conflicts with cluster replication,
then the async slave transaction should be BF aborted, and depending on the
state of async slave transaction execution, potentially also replayed.
There were problems in such BF abort implementation and the replaying was not
started.
This pull request contains fixes which make sure that if async slave thread is
marked to abort and replay, it will complete carry out the rollback and
release all locks and resources before starting the replaying. After replaying,
async slave transactions is treated as successful, so the slave thread will
continue as usual, handling next replication event.

There is also new mtr test: galera.galera_slave_replay, which stresses both a
certification failure for async slave thread and a successful BF abort
followed by replaying.
2020-02-23 10:29:42 +02:00
Anel Husakovic
b9689712e0 MDEV-21374: When "--help --verbose" prints out configuration file paths, the --defaults-file option is not considered
* `--defaults-file` option is showed only in `--help --verbose` if
applied
* `--default-extra-file` is showing correctly now in `--help --verbose`,
previously it was treated as a directory with appended `my.cnf`
2020-02-22 22:46:58 +01:00
Thirunarayanan Balathandayuthapani
3ce49a0a52 MDEV-21563 FTS thread aborts during shutdown
- Add warning suppression in misc_debug2 test.
2020-02-20 14:04:27 +05:30
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
Sergei Petrunia
affe7fabc7 MDEV-21628: Index condition pushdown condition ... not used with BKA
(Backport to 10.3)
Partitioning storage now supports MRR but doesn't support Index Condition
Pushdown (aka ICP). This causes counter-intuitive query plans for queries
that use BKA and conditions that depend on index fields:
- If the condition refers to other tables, BKA's variant of ICP is used
   to handle it.
- If the condition depends on this table only, the optimizer will try to
  use regular ICP for it, which will fail because the storage engine
  doesn't support ICP.

Make the optimizer be smarter in the second case: if we were not able to
use regular ICP, use BKA's variant of ICP..
2020-02-19 21:29:49 +03:00
Jan Lindström
959fc0c0cc MDEV-21591 : galera.galera_rsu_add_pk MTR failed: Result content mismatch
Add missing wait condition before we check the end database state.
2020-02-17 14:01:16 +02:00
Jan Lindström
93dc3e2652 MDEV-21488 : Galera test sporadic failure on galera.galera_var_notify_cmd
Add wait condition and cleanup.
2020-02-14 08:49:18 +02:00
Otto Kekäläinen
85d4a45d15 Deb: Run 'wrap-and-sort -a' so comparison across releases is easier
No functional changes.

Apply this in 10.3 so eventually it is merged to 10.4 and 10.5, which
in turn will have separate wrap-and-sort runs but only for new lines,
and not affecting badly next merges from 10.3 to 10.4 to 10.5.

Also remove a duplicate line that was found thanks to wrap-and-sort.
2020-02-13 20:47:23 +02:00
Otto Kekäläinen
1f0e72f874 Deb: Remove unnecessary manual libzstd1 dependency from RocksDB plugin
The Debian build tools add all run-time dependencies automatically. For the
mariadb-rocksdb-plugin the "${misc:Depends}, ${shlibs:Depends}" will become
(based on the build dependencies at build time):

  Depends: mariadb-server-10.4 (= 1:10.4.12-1), rocksdb-tools,
  libc6 (>= 2.29), liblz4-1 (>= 0.0~r130), libsnappy1v5 (>= 1.1.8),
  libstdc++6 (>= 7), libzstd1 (>= 1.3.3), zlib1g (>= 1:1.1.4)

There is no need to manually add run-time build dependencies. Only external
dependencies need to be defined, for example rocksdb-tools could come in
question for mariadb-plugin-rocksdb, and it will be eventually added when
downstream official Debian packaging is merged upstream in a later commit.
2020-02-13 20:47:23 +02:00
Jan Lindström
ed10a8cd97 MDEV-21515 : Galera test sporadic failure on galera.galera_wsrep_new_cluster: Result content mismatch
Use correct configuration and wait for nodes to reach correct state
with wait conditions.
2020-02-13 12:51:50 +02:00
Jan Lindström
6c1e0c0493 MDEV-21421 : Galera test sporadic failure on galera.galera_as_slave_gtid_myisam: Result length mismatch
In Galera 3 nodes 2 and 3 are galera nodes and node_1 should be
    non galera.
2020-02-13 10:30:40 +02:00
Oleksandr Byelkin
be77fa914c MDEV-21646: Failure to compile my_addr_resolve.c with binutils-2.34
Emulate older API
2020-02-12 15:39:36 +01:00
Jan Lindström
a6b92690e6 MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatch
Add proper wait condition instead of sleeps.
2020-02-12 10:32:30 +02:00