Commit graph

184673 commits

Author SHA1 Message Date
Sergey Vojtovich
3503fbbebf Move THD list handling to THD_list
Implemented and integrated THD_list as a replacement for the global
thread list. It uses own mutex instead of LOCK_thread_count for THD
list protection.

Removed unused first_global_thread() and next_global_thread().

delayed_insert_threads is now protected by LOCK_delayed_insert. Although
this patch doesn't fix very wrong synchronization of this variable.

After this patch there are only 2 legitimate uses of LOCK_thread_count
left, both in mysqld.cc: thread_count and ready_to_exit.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
2019-01-28 17:39:07 +04:00
Sergey Vojtovich
891be49a36 Simplified THD::current_linfo locking
LOG_INFO::lock was useless. It could've only protect against concurrent
iterators execution, which was already protected by LOCK_thread_count.

Use LOCK_thd_data instead of LOCK_thread_count as a protection against
THD::current_linfo reset.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
2019-01-28 17:39:07 +04:00
Sergey Vojtovich
c88fd54d17 Execute bootstrap in main thread
Bootstrap in a separate thread was introduced in 746f0b3b7 to workaround
OS/2 small stack size. OS/2 support was discontinued in 2006 and modern
operating systems have default stack size a few times larger than
default thread_stack and it is tunable.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
2019-01-28 17:39:06 +04:00
Sergey Vojtovich
7ad742b265 Simplified code, no functional changes 2019-01-28 17:39:06 +04:00
Monty
4007eaba91 Removed declaration of strconvert() from innodb_priv.h 2019-01-26 19:18:22 +02:00
Monty
c0c62196ca Removed \n from sql_print_error() 2019-01-26 19:18:22 +02:00
Monty
d0bfa4afc4 Fixed failing testcase when blackhole engine is not enabled 2019-01-26 19:18:22 +02:00
Sergei Golubchik
574cde9be4 fix failing openssl_1 test
if ssl_cipher is not specified, it must be NULL, not ""
2019-01-26 10:26:20 +01:00
Sergei Golubchik
9b76e2843b Merge branch '10.3' into 10.4 2019-01-26 01:13:41 +01:00
Aleksey Midenkov
06a37d37a1 MDEV-18122 Assertion 'table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
Closes #1134
2019-01-25 23:30:45 +02:00
Sergei Golubchik
3b1b665fcb Merge branch '10.2' into 10.3 2019-01-25 20:35:40 +01:00
Sergei Golubchik
a4ab66c8f8 Make the PYTHON_SHEBANG value configurable
and gitignore myrocks_hotbackup (as it's now generated)

Closes #1081
2019-01-25 20:00:00 +01:00
Honza Horak
7334f9717d Do not import commands library as it is not used
Closes #1080
2019-01-25 20:00:00 +01:00
Sergei Golubchik
e99e6f29e9 cleanup: trg2bit() helper 2019-01-25 19:59:04 +01:00
Sergei Golubchik
3fb6d2587d Don't run tests that check privileges in --embedded 2019-01-25 19:57:37 +01:00
Sergei Golubchik
d4515d1305 Deb: don't edit control file from inside rules file
It's too late. Might work or not (and on buster it doesn't).
2019-01-25 19:57:37 +01:00
Sergei Golubchik
74f184aff2 Fix tests not to fail with OpenSSL 1.1.1 with TLSv1.3 2019-01-25 19:57:37 +01:00
Eugene Kosov
0e1f7f5c4a MDEV-18057 Assertion `(node->state == 5) || (node->state == 6)' failed in row_upd_sec_step upon DELETE after UPDATE failed due to FK violation
The idea of the fix: reset state from previous query.

row_upd_clust_step(): reset cached index before updating a clustered index

Closes #1133
2019-01-25 16:35:50 +02:00
Marko Mäkelä
9bd80ada6f Merge 10.2 into 10.3 2019-01-25 16:35:13 +02:00
Jan Lindström
e77156d51d
Merge pull request #1135 from codership/10.4-fix-galera_3nodes-ipv6
Fix for galera_3nodes galera_ipv6_mysqldump and galera_ipv6_mariabackup
2019-01-25 15:58:01 +02:00
Eugene Kosov
31d0727a10 MDEV-18235: Changes related to fsync()
Remove fil_node_t::sync_event.

I had a discussion with kernel fellows and they said it's safe to call
fsync() simultaneously at least on VFS and ext4. So initially I wanted
to disable check for recent Linux but than I realized code is buggy.

Consider a case when one thread is inside fsync() and two others are
waiting inside os_event. First thread after fsync() calls os_event_set()
which is a broadcast! So two waiting threads will awake and may call
fsync() at the same time.

One fix is to add a notify_one() functionality to os_event but I decided
to remove incorrect check completely. Note, it works for one waiting
thread but not for more than one.

IMO it's ok to avoid existing bugs but there is not too much sense in
avoiding possible(!) bugs as this code does.

fil_space_t::is_in_rotation_list(), fil_space_t::is_in_unflushed_spaces():
Replace redundant bool fields with member functions.

fil_node_t::needs_flush: Replaces fil_node_t::modification_counter and
fil_node_t::flush_counter. We need to know whether there _are_ some
unflushed writes and we do not need to know _how many_ writes.

fil_system_t::modification_counter: Remove as not needed.
Even if we needed fil_node_t::modification_counter, every file
could have its own counter that would be incremented on each write.

fil_system_t::modification_counter is a global modification counter
for all files. It was incremented on every write. But whether some
file was flushed or not is an internal fil_node_t deal/state and
this makes fil_system_t::modification_counter useless.

Closes #1061
2019-01-25 15:40:04 +02:00
Jan Lindström
f2518f3da9
Merge pull request #1136 from tempesta-tech/sysprg/MDEV-18379
MDEV-18379: Unification of check for IPv6
2019-01-25 14:38:44 +02:00
Julius Goryavsky
a22dc6268b MDEV-18379: Unification of check for IPv6
Currently, the three-node mtr suite for Galera (galera_3nodes)
uses a separate IPv6 availability check using the "have_ipv6.inc"
file. This check duplicates a more accurate check at suite.pm
level, which can be used by including the file "check_ipv6.inc".

This patch removes this discrepancy between suites. In addition,
one of the files in the galera_3nodes suite does not contain the
option "--bind-address=::" which is needed for the test to work
correctly with IPv6 (at least on some systems), since without
it the server will not wait for connections on the IPv6 interface.

https://jira.mariadb.org/browse/MDEV-18379
2019-01-25 12:29:50 +01:00
Marko Mäkelä
d97db40a9f MDEV-18352 Add a regression test for VARCHAR enlarging
Add a simplest regression test. Specifically, I want to be sure that
SYS_COLUMNS.LEN is increased.

Closes #1123
2019-01-25 12:46:23 +02:00
Teemu Ollakka
24807c0aaf Updated wsrep-lib to have more permissive compiler options by default
WSREP_LIB_MAINTAINER_MODE was introduced in wsrep-lib cmake options
to enable -Werror. The maintainer mode is disabled by default in order
not to fail compilation on every compiler warning. The wsrep-lib
maintainer mode can be enabled via -DWSREP_LIB_MAINTAINER_MODE:BOOL=ON.
2019-01-25 11:52:08 +02:00
Teemu Ollakka
fc77fc80d2 Fixed Galera test regressions from 10.3 merge
* Made galera_3nodes.galera_ipv6_mariabackup deterministic with respect
  to donor selection, fixed assert grep definitions to match
  Galera 4 behavior and recorded.
* Removed extra connection setup from galera_3nodes.galera_ipv6_mysqldump
  and recorded.
2019-01-25 11:51:36 +02:00
Oleksandr Byelkin
45c47a04bd MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF error and corrupt index
fix of incorrect 10.3 merge
2019-01-25 08:38:14 +01:00
Marko Mäkelä
a3a89470fd Merge 10.3 into 10.4 2019-01-25 08:08:32 +02:00
Marko Mäkelä
9c72615929 Correct a result 2019-01-25 08:08:31 +02:00
Jan Lindström
2d60e3232d MDEV-18369: Crash at wsrep_handle_SR_rollback(THD*, THD*): Assertion `victim_thd' failed.
Call to wsrep_handle_SR_rollback was missing check that wsrep_on is true.
2019-01-25 08:05:21 +02:00
Marko Mäkelä
e9ba165bcb
Merge pull request #1129 from GeoffMontee/10.3-geoff-MDEV-18372
MDEV-18372: Minor MDEV-17973-related merge issue to 10.3
2019-01-25 08:03:48 +02:00
Geoff Montee
f4ca2445c3 MDEV-18372: Minor MDEV-17973-related merge issue to 10.3 2019-01-24 17:18:26 -05:00
Marko Mäkelä
78829a5780 Merge 10.3 into 10.4 2019-01-24 22:42:35 +02:00
Marko Mäkelä
d6ba849617 Remove unused code 2019-01-24 22:22:56 +02:00
Sergei Golubchik
48fb4504c5 MDEV-18337 Upgrade to 10.4 fails on some Ubuntu's due to dialog.so conflict
Restore changes from 10d347dc6a that were lost in a merge
2019-01-24 16:15:41 +01:00
Sergei Petrunia
f3ce9edaf9 Fix compilation on Windows 2019-01-24 17:16:38 +03:00
Marko Mäkelä
947b6b849d Merge 10.2 into 10.3 2019-01-24 16:14:12 +02:00
Marko Mäkelä
fab531a150 Fix the build after MDEV-17803
Use the same data type 'ulong' to avoid type mismatch on Windows
and on 32-bit systems.

FIXME: The correct data type should probably be 64-bit.
2019-01-24 15:59:00 +02:00
Marko Mäkelä
25161e6219 Merge 10.1 into 10.2 2019-01-24 14:43:29 +02:00
Marko Mäkelä
65350042a4 Merge 10.0 into 10.1 2019-01-24 13:24:13 +02:00
Marko Mäkelä
7930ab7e33 Comment out the statement that triggers MDEV-18366 2019-01-24 12:41:07 +02:00
Marko Mäkelä
46f712c73c MDEV-15114: Fix memory leaks
When innobase_allocate_row_for_vcol() returns true (for failure),
it may already have invoked mem_heap_create(). However, some callers
would fail to invoke mem_heap_free().
2019-01-24 12:32:27 +02:00
Andrei Elkin
ba1ce3aeae MDEV-17803 side effect resulted in table id advance. A test result file is updated. 2019-01-24 12:01:43 +02:00
Sergei Golubchik
edeba0c873 MDEV-17868 mysqltest fails to link with system PCRE libraries
pcre needs symbols from pcreposix
(but this is only an issue when linking with system static libraries)
2019-01-24 10:34:05 +01:00
Jan Lindström
c3a1cd3555 Silence "WSREP: Server initial position ..." message when wsrep-debug=OFF 2019-01-24 10:47:19 +02:00
Thirunarayanan Balathandayuthapani
a0f3b9f94f MDEV-17376 Server fails to set ADD_PK_INDEX, DROP_PK_INDEX if unique index nominated as PK
Problem:
========
Server fails to notify the engine by not setting the ADD_PK_INDEX and
DROP_PK_INDEX When there is a
 i) Change in candidate for primary key.
 ii) New candidate for primary key.

Fix:
====
Server sets the ADD_PK_INDEX and DROP_PK_INDEX while doing alter for the
above problematic case.
2019-01-24 13:52:51 +05:30
Jan Lindström
f7a511fb7a
Merge pull request #1124 from codership/10.4-test-pr
Update wsrep-lib to have OSX compilation fixes
2019-01-24 09:16:17 +02:00
Jan Lindström
501f5c98b2 Move Galera disabled.def files from test directory to correct suite directory. 2019-01-24 09:14:30 +02:00
Marko Mäkelä
b572814baa After-merge fix of a result
I missed this in commit 9a7281a703
2019-01-23 20:57:14 +02:00
Andrei Elkin
b22354680e merge 10.0 -> 10.1 to resolve MDEV-17803 conflicts. 2019-01-23 20:16:21 +02:00