Commit graph

192864 commits

Author SHA1 Message Date
Haidong Ji
cc71dc0b61 MDEV-25325 built-in documentation for performance_schema tables
Improve documentation of performance_schema tables by appending COLUMN
comments to tables. Additionally improve test coverage and update corresponding
tests.

This is part of the patch covering newer columns and tables in 10.5.
2021-09-10 17:16:40 +03:00
Vicențiu Ciorbaru
7c33ecb665 Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
Eugene Kosov
4f85eadf71 MDEV-25951 followup
FTS indexes has a prefix_len=1 or prefix_len=0 as stated by comment in
mysql_prepare_create_table().

Thus, a newly added assertion should be relaxed for FTS indexes.
2021-09-10 16:58:21 +06:00
Sergei Golubchik
fdeaad1db9 Merge branch '10.3' into 10.4 2021-09-09 13:07:41 +02:00
Sergei Golubchik
b145fba0a8 post-merge fix 2021-09-09 13:07:36 +02:00
Sergei Golubchik
46cb16388a Merge branch '10.2' into 10.3 2021-09-09 12:15:55 +02:00
Sergei Golubchik
c7184c470e fix main.truncate failures in --embedded 2021-09-09 09:57:39 +02:00
Vicențiu Ciorbaru
de7e027d5e Merge remote-tracking branch 'upstream/10.3' into 10.4 2021-09-09 09:23:35 +03:00
Marko Mäkelä
6e3bd663d0 MDEV-25776 Race conditions in buf_pool.page_hash around buf_pool.watch
Any modification of buf_pool.page_hash is supposed to be protected
by buf_pool.mutex and page_hash_latch::write_lock(). The buffer pool
watch mechanism of the InnoDB change buffer was violating that
ever since commit b1ab211dee (MDEV-15053).

buf_pool_t::watch_set(): Extend the critical section of buf_pool.mutex.

buf_pool_t::watch_unset(): Define non-inline, because
calls are infrequent and this function became larger.
If we have to detach a sentinel from page_hash,
do it while holding both the mutex and the exclusive hash latch.

buf_pool_t::watch_remove(): Assert that the mutex is being held.

buf_page_init_for_read(): Remove some work-arounds for
previously encountered race conditions related to buf_pool.watch.
2021-09-09 09:05:26 +03:00
Eugene Kosov
a4b3970c6e MDEV-25951 MariaDB crash after ALTER TABLE convert to utf8mb4
Bug happens when partially indexed CHAR or VARCHAR field in converted from
utf8mb3 to utf8mb4.

Fixing by relaxing assertions. For some time dict_index_t and dict_table_t
are becoming not synchronized. Namely, dict_index_t has a new prefix_len which
is a multiple of a user-provided length and charset->mbmaxlen. But
the table still have and old mbmaxlen and assertion fails. This happens only
during utf8mb3 -> utf8mb4 conversions and the magic number 4 comes from
utf8mb_4_.

At the end of ALTER TABLE (innobase_rename_or_enlarge_columns_cache())
dict_index_t and dict_table_t became synchronized
again and will stay so at all times. For, example, they will be synchronized
on table load and newly added assertion proves that.
2021-09-08 16:08:32 +06: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
Anel Husakovic
630d722902 MDEV-19227: mysql_plugin doesn't run bootstrap from source
Reviewed by: serg@mariadb.com
             daniel@mariadb.org
2021-09-07 14:25:56 +02:00
Jan Lindström
987903b38e MDEV-26503 : galera_3nodes.galera_wsrep_schema MTR failed: mysql_shutdown failed
Add wait conditions and clean up.
2021-09-07 13:43:51 +03:00
Jan Lindström
56b6c14ee6 MDEV-26502 : galera.galera_applier_ftwrl_table_alter MTR failed : Result content mismatch
Add wait conditions and remove unnecessary sleep.
2021-09-07 09:28:35 +03:00
Marko Mäkelä
eb2f2c1e5f MDEV-26547 fixup: Wait for read completion
buf_load(): Wait for the submitted reads to finish before updating
innodb_buffer_pool_load_status.
2021-09-07 08:55:08 +03:00
Haidong Ji
528abc749e MDEV-25325 built-in documentation for performance_schema tables
Improve documentation of performance_schema tables by appending COLUMN
comments to tables. Additionally improve test coverage and update corresponding
tests.
2021-09-07 08:45:19 +03:00
Vladislav Vaintroub
b729c1a1ec Fix a false positive GCC5 warning. 2021-09-06 19:07:24 +02:00
Rucha Deodhar
edde990e35 MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
failed upon killed TRUNCATE

Note: This is a backport of 1cb4caa66d from
10.3
Analysis: Assertion failure happens because less session memory is set and so
table can't be reopened. So the statement can't be used. This error goes
unreported.
Fix: Return the error state.
2021-09-06 18:12:45 +05:30
Sergei Golubchik
f17537579a disable cmake feature summary after the first run
because the summary is incorrect after the first run anyway
2021-09-06 09:49:53 +02:00
Marko Mäkelä
84c578c795 MDEV-26547 Restoring InnoDB buffer pool dump is single-threaded for no reason
buf_read_page_background(): Remove the parameter "bool sync"
and always actually initiate a page read in the background.

buf_load(): Always submit asynchronous reads. This allows
page checksums to be verified in concurrent threads as
soon as the reads are completed.
2021-09-06 10:14:24 +03:00
Marko Mäkelä
7d351f1aa0 MDEV-26533 fixup: GCC -Wformat 2021-09-06 10:14:17 +03:00
Jan Lindström
472b35c7ef Update wsrep-lib submodule 2021-09-06 08:33:18 +03:00
Daniele Sciascia
c3707691c2 MDEV-25718 Assertion `transaction.is_streaming()' failed
* Update wsrep-lib which contains the fix
* Add deterministic test case that reproduces the assertion

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-09-06 08:16:06 +03:00
Nayuta Yanagisawa
1fda0544b9 MDEV-25684 Crash in THD::find_temporary_table while calling spider_direct_sql UDF without temporary table created
The server crashed when SPIDER_DIRECT_SQL UDF was called with
non-existing temporary table.

The bug has been introduced by 91ffdc8. The commit removed
the check, from THD::open_temporary_table(), which ensure that
the target temporary tables exist.

We can fix the bug by adding the check before the call of
THD::open_temporary_table().
2021-09-06 05:00:22 +00:00
Daniel Black
38648bbbf5 MDEV-12055 binlog.binlog_stm_ctype_ucs postfix
As highlighted in https://bugs.gentoo.org/807995,
people occasionaly run tests in the 20:00->23:59:59 time range.

Fixes 265e3253f1

binlog.binlog_stm_ctype_ucs 'mix'        w1 [ fail ]
        Test ended at 2021-08-11 22:55:35

CURRENT_TEST: binlog.binlog_stm_ctype_ucs
--- /var/tmp/portage/dev-db/mariadb-10.5.11/work/mysql/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result    2021-06-18 18:19:11.000000000 +0800
+++ /var/tmp/portage/dev-db/mariadb-10.5.11/work/mysql/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.reject    2021-08-11 22:55:34.993447479 +0800
@@ -76,21 +76,21 @@
 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 DELIMITER /*!*/;
 # at #
-#YYMMDD HH:MM:SS server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created YYMMDD HH:MM:SS
+#210811 22:55:34 server id #  end_log_pos # CRC32 XXX  Start: binlog v 4, server v #.##.## created 210811 22:55:34
2021-09-05 23:38:25 +00:00
Daniel Black
21d31b9970 MDEV-26529: binlog.binlog_flush_binlogs_delete_domain fails on RISC-V
Per https://bugs.gentoo.org/807995

The test failed with:

CURRENT_TEST: binlog.binlog_flush_binlogs_delete_domain
— /tmp/mariadb-10.5.11/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.result 2021-06-18 18:19:11.000000000 +0800
+++ /tmp/mariadb-10.5.11/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.reject 2021-09-01 22:55:29.406655479 +0800
@@ -85,6 +85,6 @@
ERROR HY000: The value of gtid domain being deleted ('4294967296') exceeds its maximum size of 32 bit unsigned integer
FLUSH BINARY LOGS DELETE_DOMAIN_ID = (4294967295);
Warnings:
-Warning 1076 The gtid domain being deleted ('4294967295') is not in the current binlog state
+Warning 1076 The gtid domain being deleted ('18446744073709551615') is not in the current binlog state
DROP TABLE t;
RESET MASTER;

mysqltest: Result length mismatch

ptr_domain_id is a uint32* so explicitly cast this when printing it out.

Thanks Marek Szuba for the bug report and testing the patch.
2021-09-06 08:47:58 +10:00
Oleksandr Byelkin
391f6b4f1e MDEV-26362: incorrect nest_level value with INTERSECT
Add DBUG_ASSERT (should be kept in merge)
Fix nest_level assignment in LEX::add_unit_in_brackets (should be ignored in merge to 10.4)
2021-09-05 10:38:12 +02:00
Vladislav Vaintroub
a1b0f23586 MDEV-26533 MariaDB 10.5 crashes with key_buffer_size > 4Gb on Windows x64
This is a side-effect of my_large_malloc() introduction,MDEV-18851

It removed a cast to size_t to variable 'blocks' in
multiplication blocks * keycache->key_cache_block_size , creating ulong value
instead of correct size_t.


Replaced a couple of ulongs with appropriate data type, which is size_t.

Also, fixed casts to ulongs in crash handler messages, so that people would
not be confused by that, too.

Interestingly, aria did not expose the same problem even if it contains
copied and pasted code in ma_pagecache, because Aria had some ulongs removed
when fixing a similar problem in MDEV-9256.
2021-09-04 17:51:26 +02:00
Vladislav Vaintroub
e38a05e20a Fix create_background_thd()
Allow the caller to have current_thd. Also do not store
PSI_CALL_get_thread() in the new THD, it is a thread local storage variable
that can become invalid any time, we do not control the lifetime of the
caller's thread.
2021-09-02 19:41:54 +02:00
Jan Lindström
f55477060c MDEV-26518 ; Galera incorrectly handles primary or unique keys with any multi-byte character set
We need to set temporary buffer large enough to fit also multi-byte
characters.
2021-09-02 07:32:19 +03:00
Jan Lindström
99f6a266c8 MDEV-26517 : Galera test failure on galera_fk_cascade_delete_debug
Move --error on --reap where it belongs and take a account that
there could be different return codes.
2021-09-02 07:32:19 +03:00
Vladislav Vaintroub
5613ead49e MDEV-26521 Remove mdev-504.test
This stress tests fails on not sufficiently tweaked windows boxes,due
to rapid succession of connects and disconnects, making Windows run out
of ephemeral ports.

Approved by author of the test (the author is happy to see it removed)
2021-09-01 19:29:44 +02:00
Vladislav Vaintroub
d6b7738dcc Fix potential null pointer access after the allocation error 2021-09-01 18:21:34 +02:00
Vladislav Vaintroub
234ae43d5a Cleanup - remove confusing comment. 2021-09-01 18:21:00 +02:00
Elena Stepanova
a4a4d6a7c8 MDEV-26514 Option to build a separate test zip package on Windows
echo is needed for the tests
2021-09-01 17:02:42 +03:00
Monty
10f08aff15 Added support for CHECK TABLE for S3 tables
Other things:
- Don't allocate an IO_CACHE for scanning tables of type BLOCK
  (It was never used in this case)
- Fixed bug in page cache that cased a hang when trying to read a
  not existing S3 block.
2021-09-01 13:47:26 +03:00
Monty
49ae199604 Added support for ANALYZE TABLE to S3 tables
Other things
- Cleaned up error messages for CHECK, REPAIR and OPTIMIZE
2021-09-01 13:47:02 +03:00
Monty
6bdc03ebcc Added options s3_port and s3_use_http to aria_s3_copy
These options was needed in some cases, like when using minio that require
the port option, to be able to connect to the S3 storage.
The sympthom was that one could get the error
"Table t1.MAI doesn't exist in s3"
even if the table did exits.

Other things:
- Improved error message for non existing S3 files
2021-09-01 13:34:46 +03:00
Elena Stepanova
8382c3260b MDEV-26514 Option to build a separate test zip package on Windows
Add a possibility to run MTR tests on a release zip
2021-08-31 21:13:13 +03:00
Vladislav Vaintroub
1fcd8db776 MDEV-26511 - Do not change purge thread count during bootstrap
Apparently, in bootstrap this could crash when creating new THDs
2021-08-31 12:02:31 +02: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
865e5b6405 MDEV-26487 cpack rpm failed to build packages with cmake < 3.7.0
buggy regexp in old CPackRPM.cmake:

    string(REGEX REPLACE "%[A-Za-z0-9\(\),-]* " "" F_PATH ${F})
    string(REGEX MATCH "%[A-Za-z0-9\(\),-]*" F_PREFIX ${F})

it treats everything after the first space as a path
2021-08-31 09:21:08 +02:00
Marko Mäkelä
e62120cec7 Merge 10.4 into 10.5 2021-08-31 10:04:56 +03:00
Marko Mäkelä
0464761126 Merge 10.3 into 10.4 2021-08-31 09:22:21 +03:00
Marko Mäkelä
e835cc851e Merge 10.2 into 10.3 2021-08-31 08:36:59 +03:00
Vladislav Vaintroub
1a69e1588b MDEV-26511 Only allocate Innodb background purge thd, when it is safe.
Change logic to only allocate purge thds at startup, or
in pre-shutdown (for slow shutdown).
2021-08-30 23:56:15 +02:00
Marko Mäkelä
ceb40ef45b MDEV-26504 THD::copy_db_to() fails to return true if THD::db is null
THD::copy_db_to(): Always return true if the output parameter
was left uninitialized. This fixes a regression that was caused
by commit 7d0d934ca6 (MDEV-16473).

MariaDB Server 10.3 and later were unaffected by this bug
thanks to commit a7e352b54d.

Possibly this bug only affects mysql_list_fields()
in the Embedded Server (libmysqld).

This bug was found by GCC 11.2.0 in CMAKE_BUILD_TYPE=RelWithDebInfo.
2021-08-30 14:26:27 +03:00