Commit graph

197588 commits

Author SHA1 Message Date
Marko Mäkelä
8bddaddc6f Merge 10.7 into 10.8 2022-12-16 10:54:33 +02:00
Marko Mäkelä
84774de49a MDEV-30172: Disable galera.galera_parallel_simple 2022-12-16 10:53:40 +02:00
Marko Mäkelä
299280738c Merge 10.6 into 10.7 2022-12-16 10:31:22 +02:00
Marko Mäkelä
9f8fc983d5 MDEV-30242 MTR fails to report stack traces of all threads by default
An unfortunate change to the default behavior of the handling of
core dumps was implemented in
commit e9be5428a2
by making MTR_PRINT_CORE=small the default value, that is, to
only display the stack trace of one thread in crash reports.
Many if not most failures that occur in regression tests are
sporadic and involve race conditions or deadlocks. To be able to
analyze such failures, having the stack traces of all active threads
is a must, because CI environments typically do not save any core dumps.

While the environment variable MTR_PRINT_CORE could be set in CI
environments to compensate for the unfortunate change, it is better
to revert to the old default (dumping all threads) so that
no explicit action will be required from maintainers of independent
CI systems. In that case, if something fails once in a blue moon,
we can have some hope of diagnosing it based on the output.

We fix this regression by defaulting the unset environment variable
MTR_PRINT_CORE to "medium".
2022-12-16 09:59:09 +02:00
musvaage
d0f6d46704 debian typos 2022-12-16 08:51:40 +11:00
Monty
d0cd49497f MDEV-30118 exception in ha_maria::extra
I have not been able to repeat the problem, but the stack trace indicates
that ha_maria::extra() is called with a null file pointer.

This indicates the table has either never been opened or opened and closed,
with file pointer set to NULL, but ha_maria::extra() is still called.

In JOIN::partial_cleanup() we are only checking of table->is_created(),
which will fail if table was created and later closed.

Fixed by clearing table->created if table is dropped.

I added an assert to is_created() to catch the case that the create
flag does not match 'file'.
2022-12-15 19:36:30 +02:00
Marko Mäkelä
0a67daad06 MDEV-30235 InnoDB crash on table-rebuilding DDL when the statistics tables are corrupted
commit_try_rebuild(): Only invoke trx_t::drop_table_statistics()
if both InnoDB statistics tables are accessible (and exclusively
locked by the current transaction). This avoids a crash due to
ut_a(sym_node->table != NULL) in pars_retrieve_table_def().

The crash was repeated on a partial copy of a MariaDB 10.3 data
directory that lacked the *.ibd files for the statistics tables.
2022-12-15 16:18:43 +02:00
Marko Mäkelä
4f6830255c Merge 10.5 into 10.6 2022-12-15 16:18:28 +02:00
Marko Mäkelä
92ff7bb63f MDEV-30227 [ERROR] [FATAL] InnoDB: fdatasync() returned 9
fil_space_t::flush<false>(): If the CLOSING flag is set,
the file may already have been closed, resulting in EBADF
being returned by fdatasync(). In any case, the
thread that had set the flag should take care of invoking
os_file_flush_func().

The crash occurred during the execution of FLUSH TABLES...FOR EXPORT.

Tested by: Matthias Leich
2022-12-15 12:45:26 +02:00
Marko Mäkelä
c562ccf796 MDEV-30233 DROP DATABASE test fails: Directory not empty
Some tests drop the default mtr database "test". This may fail due
to the directory not being empty. InnoDB may not delete all tables
immediately, due to the "background drop table queue" or its
replacement in commit 1bd681c8b3
(the purge of history would clean up after a DDL operation during
which the server was killed).

Let us try to avoid "drop database test" whenever it is easily possible.
Where it is not, SET GLOBAL innodb_max_purge_lag_wait=0 will ensure
that the replacement of the "background drop table queue" will have
completed its job.
2022-12-15 11:14:23 +02:00
Daniel Black
4ca5a0ec98 MDEV-30172: galera mtr disables 2022-12-15 19:05:08 +11:00
Daniel Black
fa01ffb08e Merge branch '10.5' into 10.6 2022-12-15 18:27:11 +11:00
Daniel Black
03fee585c1 mtr: more galera disables - linked in MDEV-30172 2022-12-15 18:19:11 +11:00
Daniel Black
802e26c347 Merge branch '10.10' into 10.11 2022-12-15 10:32:58 +11:00
Daniel Black
fc9d350ab7 Merge branch '10.9' into 10.10 2022-12-15 10:29:42 +11:00
Daniel Black
7df06dcbc3 Merge branch 10.5 into 10.6 2022-12-15 09:32:54 +11:00
Daniel Black
97c6cd9798 Deb: debian-start.inc - do not quote exe variables 2022-12-15 08:48:48 +11:00
Daniel Black
069eb169b3 Merge branch '10.8' into 10.9 2022-12-15 08:39:46 +11:00
Daniel Black
89480340ba Merge commit 10.7 into 10.8 2022-12-15 08:37:57 +11:00
Daniel Black
6524551bcf Merge branch 10.6 into 10.7 2022-12-15 08:33:20 +11:00
Daniel Black
930ee43507 Merge branch '10.5' into 10.6 2022-12-15 08:30:51 +11:00
Daniel Black
0f351b620a rpm: server-post - use mariadb-install-db 2022-12-14 20:52:06 +00:00
Daniel Black
9ee055a27f Deb: mariadb-server.postinst to use mariadb-install-db 2022-12-14 20:52:06 +00:00
Daniel Black
40b62a93c6 mariadb-install-db: use mariadb names
Also refer to the service file for startup.
2022-12-14 20:52:06 +00:00
Daniel Black
952af4a179 Deb: MariaDB names as default for deb scripts
Also include the ftp.mariadb.org script rather than old name.
2022-12-14 20:52:06 +00:00
Vladislav Vaintroub
c1fd082e9c MDEV-25341 post-fix. Don't use DiscardVirtualMemory on Windows.
This turns out to be a too expensive call to use for every freed page,
especially under global buffer pool mutex protection.

Also, the usefulness of proactive shrinking of the buffer pool on Windows
this is seems questionable - there is no OOM killer, and the OS will
shrink working sets itself.
2022-12-14 13:34:11 +01:00
Marko Mäkelä
3faa68d15b Add missing error suppression 2022-12-14 10:18:37 +02:00
Marko Mäkelä
0aca3012a1 Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
Marko Mäkelä
fa389b9098 Merge 10.9 into 10.10 2022-12-14 08:57:39 +02:00
Marko Mäkelä
2f959a6910 Merge 10.8 into 10.9 2022-12-14 08:26:53 +02:00
Marko Mäkelä
757ae11688 Merge 10.7 into 10.8 2022-12-14 08:18:24 +02:00
Marko Mäkelä
98181a7c58 Merge 10.6 into 10.7 2022-12-14 06:57:04 +02:00
Marko Mäkelä
9be5973edd After-merge fix
This fixes up 25b91c3f13
2022-12-14 06:56:51 +02:00
Marko Mäkelä
f97f6955bd Merge 10.3 into 10.4 2022-12-14 06:20:04 +02:00
Daniel Black
4b2e7616f8 Merge branch '10.5' into 10.6 2022-12-14 12:25:57 +11:00
Daniel Black
687657c270 MDEV-30172 re-disable galera tests
galera_sr.GCF-1060 'innodb'              w2 [ fail ]  timeout after 900 seconds

galera_3nodes.galera_ssl_reload At line 50: mysql_shutdown failed
galera_3nodes.galera_ssl_reload : MDEV-30172 At line 50: mysql_shutdown failed
galera_3nodes.GCF-354 : mysqltest: At line 39: query 'DROP TABLE test.t1' failed: 1047: WSREP has not yet prepared node for application use
galera_3nodes.GCF-354 : mysqltest: At line 30: query 'INSERT INTO test.t1 values (1)' failed: 1180: Got error 6 "No such device or address"

galera_wan : [ERROR] WSREP: /home/buildbot/buildbot/build/gcs/src/gcs_state_msg.cpp:gcs_state_msg_get_quorum():947: Failed to establish quorum.
2022-12-14 11:25:47 +11:00
Daniel Black
697dbd15e0 MDEV-21187: log_slow_filter="" logs queries not using indexes
Consistent with MDEV-4206 and empty log_slow_filter still means
no explict filtering. Since 21518ab2e4 however the
log_queries_not_using_indexes became stored in the same variable.

As we need to test for the absense of log_queries_not_using_indexes
the SERVER_QUERY_NO_INDEX USED part of log_slow_statement, the empty
criteria resulted in an always true to log queries not using indexes if
log_slow_filter was set to empty.

Adjusted the log_slow.test for MDEV-4206 as slow_log_query has been
global and session for a while and it was relying on the MDEV-21187
buggy behavior to detect a slow query.

Reviewer: Monty
2022-12-14 10:15:32 +11:00
Marko Mäkelä
b7914f562d Merge 10.8 into 10.9 2022-12-13 18:24:51 +02:00
Marko Mäkelä
d7a4ce3c80 Merge 10.7 into 10.8 2022-12-13 18:11:24 +02:00
Marko Mäkelä
25b91c3f13 Merge 10.6 into 10.7 2022-12-13 18:01:49 +02:00
Marko Mäkelä
a8a5c8a1b8 Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
Daniel Black
acfaa04587
MDEV-18591: mysql_install_db - pass --log-error to mysqld in install ()
Previously we parsed it out in mysql_install_db for use in the error
message, but failed to pass it to mysqld in the bootstrap.

Also match log_error as it might appear in the .cnf files.

Thanks Michal Schorm for the test case.

Reviewed by: Faustin Lammler
2022-12-13 15:17:44 +01:00
Marko Mäkelä
1dc2f35598 Merge 10.4 into 10.5 2022-12-13 14:39:18 +02:00
Sergei Golubchik
da5d349935 fix error on reading 5.5 tables with generated columns 2022-12-13 14:38:48 +02:00
Sergei Petrunia
87eccd78a7 MDEV-30218: Incorrect optimization for rowid_filtering
(Patch from Monty, slightly amended)

Fix rowid filtering optimization in best_access_path():

== Ref access + rowid filtering ==
The cost computations compare #records and index-only scan cost
(keyread_tmp) to find out the per-record advantage one will get if
they skip reading full table record.

The computations produce wrong result when:

- the #records are "clipped down" with s->worst_seeks or
  thd->variables.max_seeks_for_key. keyread_tmp is not clipped
  this way so the numbers are not comparable.

- access_factor is negative. This means index_only read is
  cheaper than non-index-only read.

This patch makes the optimizer not to consider Rowid Filtering in
such cases.
The decision is logged in the Optimizer Trace using
"rowid_filter_skipped" name.

== Range access + rowid filtering ==
when considering to use Rowid Filter with range access, do multiply
keyread_tmp by record_count. That way, it is comparable with the
range access's estimate, which is multiplied by record_count.
2022-12-13 13:45:54 +02:00
Marko Mäkelä
fdf43b5c78 Merge 10.3 into 10.4 2022-12-13 11:37:33 +02:00
Daniel Black
04efe13501 Merge branch '10.5' into 10.6
Merge Jan's bb-10.6-merge-jan branch:

MDEV-30172 Galera test case cleanup

    * Delete tests that are not supported and not going to be supported
      any time soon
    * Fix result set on tests that are not run on bb
    * Fix tests that fail because of auto increment offset
    * Make sure that disabled tests have open bug report
2022-12-13 13:00:30 +11:00
Jan Lindström
cc78cd7d15 MDEV-30172 galera 10.5 test cleanup
galera.galera_bf_abort_at_after_statement disabled by Daniel Black
2022-12-13 12:49:13 +11:00
Daniel Black
3b249a6e56 Merge branch '10.5' into 10.6
Adjust galera/galera_3nodes disabled tests.
2022-12-13 11:12:24 +11:00
Daniel Black
58fecbebce mtr: galera/galera_3node disable failed tests 2022-12-13 11:09:32 +11:00