Commit graph

188038 commits

Author SHA1 Message Date
Monty
cebf43e166 Fixed wrong assert (found by clang) 2020-03-11 22:04:06 +02:00
Eugene Kosov
7f36300df5 MDEV-21918 improve page_zip_verify_checksum()
actually, page_zip_verify_checksum() generally allows all-zeroes
checksums because our CRC32 checksum is something like
crc_1 ^ crc_2 ^ crc_3

Also, all zeroes page is considered correct.

As a side effect fix nasty reinterpret_cast<> UB

Also, since c0f47a4a58 innodb_checksum_algorithm=full_crc32
exists which computes CRC32 in one go (without bitwise arithmetic)
2020-03-11 18:02:12 +03:00
Oleksandr Byelkin
b7362d5fbc Merge branch '10.3' into 10.4 2020-03-11 14:28:24 +01:00
Eugene Kosov
df88e7cefa fix typedef-related warning and cleanup using namespace std 2020-03-11 16:27:37 +03:00
Oleksandr Byelkin
3c9bc0ce19 Merge branch '10.2' into 10.3 2020-03-11 14:05:41 +01:00
Marko Mäkelä
3ab33c6c92 Cleanup: clang-10 -Wmisleading-indentation
Also, remove some trailing white space and add missing static
qualifier to free_annotate_event().
2020-03-11 14:37:35 +02:00
Oleksandr Byelkin
b8c0e49670 Merge commit '10.3' into 10.4 2020-03-11 13:27:10 +01:00
Sergei Petrunia
b30446c85d Fix compile warning:
It was:
implicit conversion from 'ha_rows' (aka 'unsigned long long') to 'double'
changes value from 18446744073709551615 to 18446744073709551616

Follow what JOIN::get_examined_rows() does for similar code.
2020-03-11 13:46:57 +03:00
Jan Lindström
069bad5e6b Add galera debug sync to galera_slave_replay test. 2020-03-11 12:10:49 +02: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
Monty
5c6c4b1395 Fixes for previous not-complete-push 2020-03-09 14:53:35 +02:00
Monty
c037cdadf4 Added keyread_time() to HEAP
The default keyread_time() was optimized for blocks and not suitable for
HEAP. The effect was the HEAP prefered table scans over ranges for btree
indexes.
Fixed also get_sweep_read_cost() for HEAP tables.
2020-03-09 13:53:34 +02:00
Monty
a24d0926b9 Second stage of optimizer_trace optimizations
- Move testing of my_writer to inline functions to avoid calls
- Made more functions inline. Especially thd->thread_started()
  is now very optimized!
- Moved Opt_trace_stmt classe to opt_trace_context.h to get critical
  functions inline
2020-03-09 13:52:40 +02:00
Monty
940fcbe73b Improved speed of optimizer trace
- Added unlikely() to optimize for not having optimizer trace enabled
- Made THD::trace_started() inline
- Added 'if (trace_enabled())' around some potentially expensive code
  (not many found)
- Added ASSERT's to ensure we don't call expensive optimizer trace calls
  if optimizer trace is not enabled
- Added length to Json_writer functions to speed up buffer writes
  when optimizer trace is enabled.
- Changed LEX_CSTRING argument handling to not send full struct to writer
  function on_add_str() functions now trusts length arguments
2020-03-09 13:49:06 +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
mkaruza
d87c16be79 MDEV-20616: MariaDB-Galera 10.4.8 | Transaction aborted | Sig 6 Shutdown
When connections go to same node and deadlock happens, BF abort should
not happen for victim thread. Fixed by guarding
`wsrep_handle_SR_rollback()` so that is called only for SR transactions.

Co-authored-by: Seppo Jaakola <seppo.jaakola@iki.fi>
Co-authored-by: Daniele Sciascia <daniele.sciascia@galeracluster.com>
2020-03-03 10:29:45 +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
Roman Nozdrin
1ad8693a6f MDEV-21841 CONV() function doesn't truncate its output to 21 when uses default charset. 2020-02-29 11:34:49 +00: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
Marko Mäkelä
e837a358b6 MDEV-21693: Fix clang -Winconsistent-missing-override
ha_partition: Remove redundant 'virtual' keywords and add
missing 'override'.

FIXME: handler::table_type() is not declared virtual, yet ha_partition
and ha_sequence are seemingly trying to override it.
2020-02-28 14:13:52 +02:00
Thirunarayanan Balathandayuthapani
f56dd0a12d MDEV-21693 ALGORITHM=INSTANT does not work for partitioned tables
- Flag ALTER_STORED_COLUMN_TYPE set while doing varchar extension
for partition table. Basically all partition supports
can_be_converted_by_engine() then it should be set to
ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE.
2020-02-28 14:29:05 +05:30
Oleksandr Byelkin
a17a327f11 MDEV-21684: mysqld crash with signal 11 when renaming table+max_statement_time
Main select should be pushed first in case of SET STATEMENT.
2020-02-26 13:58:08 +01: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
Sergei Petrunia
e637355156 MDEV-21610 Different query results from 10.4.11 to 10.4.12
Part#2: cleanup:

In the part 1 of the fix, DS-MRR implementation would peek into
the JOIN_TAB to get the rowid filter from

  table->reginfo.join_tab->rowid_filter

This doesn't look good from code isolation standpoint (why should a
storage engine assume it is used through a JOIN_TAB?).

Fixed this by storing the 'un-pushed' rowid_filter in the DsMrr_impl
structure. The filter survives across multi_range_read_init() calls.

It is discarded when somebody calls index_end() or rnd_end() and cleans
up the DsMrr_impl.
2020-02-20 13:35:19 +03:00