Commit graph

177635 commits

Author SHA1 Message Date
Elena Stepanova
4d07e6c12d Disabled storage engine tests using LOCK with MERGE engine
Tests fail due to MDEV-17145
2018-10-13 18:47:16 +03:00
Marko Mäkelä
0f178e7cae Fix typo in 5936d43afb 2018-10-12 13:51:37 +03:00
Vladislav Vaintroub
b7918a6d38 fix test suite after MDEV-15438 2018-10-12 08:22:10 +02:00
Daniel Black
5936d43afb threadpool_size can contribute to the wanted_files 2018-10-12 08:22:10 +02:00
Jan Lindström
8b92c64298 Fix tests affected by new configuration variable on Galera. 2018-10-10 18:30:42 +03:00
Julius Goryavsky
1eb364f8b3 MDEV-17421: mtr does not restart the server whose parameters were changed
If a mtr test runs multiple servers and only some of them get
restarted on whatever reason with new command-line parameters,
then subsequent mtr test may fail, because no cleanup is performed.
Replication and Galera test suites are affected.

In the mtr script, there is a server_need_restart function
that decides whether we need to start a new mysqld process before
the new (next) test. If the mysqld parameters were changed in the
previous test - not necessarily the parameters of the primary mysqld
server, maybe even the secondary server parameters - this function
decides to start a new mysqld process. But since it does not remove
the old (changed) parameters, the new process starts with the
parameters changed by the *previous* test.

To correct this error, we must delete the modified process
parameters after checking that they have been changed during
the previous test.

This patch also simplifies and makes more stable the
galera_drop_database test, during debugging of which this
problem was detected.

https://jira.mariadb.org/browse/MDEV-17421
2018-10-10 17:16:34 +02:00
Jan Lindström
48924ae9c5 Add missing file. 2018-10-10 14:28:42 +03:00
Vasil Dimov
f500399421 Bump WSREP_PATCH_VERSION 2018-10-10 13:36:05 +03:00
Vasil Dimov
8524c81254 Make config knob wsrep_certification_rules dynamic
There is no reason for it to be readonly at runtime and it is dynamic in
5.6+ already.
2018-10-10 13:33:07 +03:00
Jan Lindström
b47a2182f6 MariaDB adjustments. 2018-10-10 13:30:56 +03:00
Vasil Dimov
508e715cb8 Fix compilation error in row0ins.c
row0ins.c:1437:6: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
^
2018-10-10 13:14:50 +03:00
Vasil Dimov
27dcef3900 Add a new config variable wsrep_certification_rules
This is used for controlling whether to use a new/optimized
certification rules or the old/classic ones that could cause more
certification failures - when foreign keys are used and two INSERTs are
done concurrently to the child table from different nodes.

(cherry picked from commit 815d73e6af8daace6262ab63ca6c043ffc4204b3)
2018-10-10 13:14:36 +03:00
Vasil Dimov
6aa578ec5a Generalize "bool shared/exclusive" argument to enum
wsrep_append_foreign_key() and wsrep_append_key() used to take a boolean
argument denoting whether the relevant certification key type is shared
(assuming it is exclusive if the argument is false). Change that
argument to the enum wsrep_key_type from wsrep_api.h, so that eventually
other types can also be passed (like WSREP_KEY_SEMI).

This is a non-functional change.

(cherry picked from commit 360bf36dbb9378b36ef57921c725a9505e19e0d9)
2018-10-10 13:02:25 +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
Jan Lindström
3c3c4ae225 MDEV-17403: Test failure on galera.galera_enum
Add wait on second node.
2018-10-10 09:17:10 +03:00
Vladislav Vaintroub
5b0b6660f6 MDEV-17413 - Don't crash in my_malloc_size_cb_func()
if thread specific memory is requested and current_thd is NULL.

Leave DBUG_ASSERT() in place, to check in DBUG version.
2018-10-09 18:44:10 +01:00
Vladislav Vaintroub
00ddc8bc7c MDEV-17413 Crash in my_malloc_size_cb_func() during shutdown with
forceful connection close.

Fix is to ensure that when close_connection() is called from shutdown
thread, current_thd is set. This that allocation callback for THD specific
memory won't assert(in debug version), or crash (in 10.1 and later)

close_connection() allocates THD specific memory e.g when it writes
the final error packet, and compression is ON for the connection.
2018-10-09 18:08:12 +01:00
Andrei Elkin
f517d8c742 MDEV-17346 parallel slave start and stop races to workers disappeared
The bug appears as a slave SQL thread hanging in
rpl_parallel_thread_pool::get_thread() while there are no slave worker
threads to awake it.

The reason of the hang is that at the parallel slave worker pool
activation the being stared SQL thread could read the worker pool size
concurrently with pool deactivation. At reading the SQL thread did not
employ necessary protection from a race.

Fixed with making the SQL thread at the pool activation first
to grab the same lock as potential deactivator also does prior
to access the pool size.
2018-10-08 19:46:34 +03:00
Igor Babaev
1eca49577e MDEV-17382 Hash join algorithm should not be used to join materialized
derived table / view by equality

Now rows of a materialized derived table are always put into a
temporary table before join operation. If BNLH is used to join this
table with the result of a partial join then both operands of the
join are actually put into main memory. In most cases this is not
efficient.
We could avoid this by sending the rows of the derived table directly
to the join operation. However this kind of data flow is not supported
yet.
Fixed by not allowing usage of hash join algorithm to join a materialized
derived table if it's joined by an equality predicate of the form
f=e where f is a field of the derived table.
2018-10-07 14:42:22 -07:00
Igor Babaev
bd21904357 MDEV-17382 Hash join algorithm should not be used to join materialized
derived table / view by equality

Now rows of a materialized derived table are always put into a
temporary table before join operation. If BNLH is used to join this
table with the result of a partial join then both operands of the
join are actually put into main memory. In most cases this is not
efficient.
We could avoid this by sending the rows of the derived table directly
to the join operation. However this kind of data flow is not supported
yet.
Fixed by not allowing usage of hash join algorithm to join a materialized
derived table if it's joined by an equality predicate of the form
f=e where f is a field of the derived table.
2018-10-07 13:12:27 -07:00
Igor Babaev
0b7339eb45 MDEV-17382 Hash join algorithm should not be used to join materialized
derived table / view by equality

Now rows of a materialized derived table are always put into a
temporary table before join operation. If BNLH is used to join this
table with the result of a partial join then both operands of the
join are actually put into main memory. In most cases this is not
efficient.
We could avoid this by sending the rows of the derived table directly
to the join operation. However this kind of data flow is not supported
yet.
Fixed by not allowing usage of hash join algorithm to join a materialized
derived table if it's joined by an equality predicate of the form
f=e where f is a field of the derived table.
2018-10-07 10:19:19 -07:00
Kristian Nielsen
2f4a0c5be2 Fix accumulation of old rows in mysql.gtid_slave_pos
This would happen especially in optimistic parallel replication, where there
is a good chance that a transaction will be rolled back (due to conflicts)
after it has executed record_gtid(). If the transaction did any deletions of
old rows as part of record_gtid(), those deletions will be undone as well.
And the code did not properly ensure that the deletions would be re-tried.

This patch makes record_gtid() remember the list of deletions done as part
of a transaction. Then in rpl_slave_state::update() when the changes have
been committed, we discard the list. However, in case of error and rollback,
in cleanup_context() we will instead put the list back into
rpl_global_gtid_slave_state so that the deletions will be re-tried later.

Probably fixes part of the cause of MDEV-12147 as well.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2018-10-07 18:59:52 +02:00
Marko Mäkelä
079d0a8724
Merge pull request #876 from tempesta-tech/tt-10.1-MDEV-17313-counter-race
MDEV-17313 Data race in ib_counter_t
2018-10-05 17:40:06 +03:00
Sergey Vojtovich
1655053ac1 MDEV-17200 - pthread_detach called for already detached threads
pthread_detach_this_thread() was intended to be defined to something
meaningful only on some ancient unixes, which don't have
pthread_attr_setdetachstate() defined. Otherwise, on normal unixes,
threads are created detached in the first place.

This was broken in 0f01bf2676 so that
we started calling pthread_detach() for already detached threads.
Intention was to detach aria checkpoint thread.

However in 87007dc2f7 aria service threads
were made joinable with appropriate handling, which makes breaking
revision unneccessary.

Revert remnants of 0f01bf2676, so that
pthread_detach_this_thread() is meaningful only on some ancient unixes
again.
2018-10-05 14:37:15 +04:00
Jan Lindström
e855912733 Test by reverting MDEV-16656: DROP DATABASE crashes the Galera Cluster 2018-10-04 13:29:29 +03:00
Jan Lindström
6c29544c20 Enable for staging tree. 2018-10-04 08:05:50 +03:00
Jan Lindström
391b7f5bd1 Fix typo. 2018-10-04 08:04:55 +03:00
Jan Lindström
e2a1c58582 Fix test failure on wsrep.variables
SLES11 can't build currently latest Galera library version.
2018-10-04 07:13:30 +03:00
Jan Lindström
84a24d36d8 MDEV-17357: Test failure on galera.galera_pc_ignore_sb
Add wait until cluster has correct number of nodes.
2018-10-04 07:13:07 +03:00
Eugene Kosov
15803fce92 MDEV-17313 Data race in ib_counter_t
ib_counter_t: make all reads/writes to m_counter relaxed atomical
2018-10-02 13:34:11 +03:00
Marko Mäkelä
a660a5ed42 Correct a typo in a comment 2018-10-01 14:33:48 +03:00
Jan Lindström
649451ae0d
Merge pull request #875 from tempesta-tech/sysprg/MDEV-16656
MDEV-16656: DROP DATABASE crashes the Galera Cluster
2018-10-01 12:47:35 +03:00
Sachin
865237e5af Fix rpl_parallel_optimistic_nobinlog failure on binlog 2018-10-01 15:15:34 +05:30
Julius Goryavsky
c62e49d0cf MDEV-16656: DROP DATABASE crashes the Galera Cluster
When converting table identifiers to a new format,
some tables can be renamed twice, which subsequently
leads to the appearance of "false" auxiliary tables
belonging to another main (parent) table (which does
not actually have auxiliary tables).

This is because the table number is repeatedly added
to the aux_tables_to_rename vector inside the function
fts_check_and_drop_orphaned_tables.

To correct this error, we must add a check for the
occurrence of the table number in the aux_tables_to_rename
vector before adding a new element.

https://jira.mariadb.org/browse/MDEV-16656
2018-10-01 09:53:37 +02:00
Sergei Golubchik
1fc5a6f30c Merge branch '10.0' into 10.1 2018-09-23 12:58:11 +02:00
Jan Lindström
87dc4e98dd MDEV-17276: Adjust Galera tests after Galera library 25.3.24 2018-09-23 13:53:57 +03:00
Jan Lindström
eefaf4fdc9 Adjust disabled Galera tests. 2018-09-23 13:26:25 +03:00
Jan Lindström
428669fa83 MDEV-15805: Test failure on galera.query_cache
Reset query cache after every test case and add wait after
load infile.
2018-09-23 13:26:10 +03:00
Sergei Golubchik
1144acbcbd tokudb: create and destroy TOKUDB_SHARE::_open_tables_mutex dynamically
to guarantee that it's destroyed when plugin deinit is called, not after
2018-09-22 20:18:17 +02:00
Sergei Golubchik
3a9276bad3 sanitize tokudb locking macros 2018-09-22 15:19:40 +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
27329aac33 mtr: no warning when an environment variable isn't set
e.g. "No option named 'FILE_KEY_MANAGEMENT_SO' in group 'ENV' at lib/My/ConfigFactory.pm line 370."
when a test has `plugin-load-add=@ENV.FILE_KEY_MANAGEMENT_SO`
2018-09-22 00:22:09 +02:00
Sergei Golubchik
a265f0ff24 MDEV-9137 MariaDB Crash on Query Using Aria Engine
more tests
2018-09-22 00:22:09 +02:00
Sergei Golubchik
fb324e3f8f MDEV-9137 MariaDB Crash on Query Using Aria Engine
fix for 2-level ft indexes and boolean search in Aria
2018-09-22 00:22:09 +02:00
Sergei Golubchik
7438667fa9 MDEV-9137 MariaDB Crash on Query Using Aria Engine
update the code to match semantics of `key` -
it's not a (char*) pointer to the buffer as in MyISAM.
2018-09-22 00:22:09 +02:00
Sergei Golubchik
3d65d0db16 MDEV-9137 MariaDB Crash on Query Using Aria Engine
Two bugs in Aria, related to 2-level fulltext indexes:

* REPAIR calculated the key number incorrectly

* CHECK copied the key into last_key too early and
  checking the second-level btree was overwriting it
2018-09-22 00:22:09 +02:00
Alexander Barkov
a4131c51f5 Merge remote-tracking branch 'origin/5.5' into bb-10.0-bar 2018-09-21 18:17:32 +04:00
Alexander Barkov
fc70f21e0a Fixing the comment not to mention the removed class Item_copy_int. 2018-09-21 18:04:56 +04:00
Alexander Barkov
b514a5f9e8 A cleanup for MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
Unary minus operation for the smallest possible signed long long value
(LONLONG_MIN) is undefined in C++. Because of this, func_time.test
failed on ppc64 buildbot machines.

Fixing the code to avod using undefined operations.

This is fix is similar to "MDEV-7973 bigint fail with gcc 5.0"
2018-09-21 18:03:23 +04:00
Marko Mäkelä
acc97298e5 Merge 5.5 into 10.0 2018-09-21 14:41:11 +03:00