Commit graph

25393 commits

Author SHA1 Message Date
Marko Mäkelä
4434fb4a75 Merge 10.7 into 10.8 2021-12-14 14:29:04 +02:00
Marko Mäkelä
92a4e76a2c Merge 10.6 into 10.7 2021-12-14 14:27:35 +02:00
Thirunarayanan Balathandayuthapani
660cfe4782 MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer
- Addressing the format issue in deferred_dblwr() and changed the
function comment.
2021-12-12 15:09:59 +05:30
Thirunarayanan Balathandayuthapani
18c335a39e MDEV-27111 atomic.rename_table test case fails
InnoDB fails to identify the deferred tablespace after recovery.
Problem is that InnoDB fails to rename the tablespace present
in recovered tablespace. Fix is that InnoDB should try to rename the
recovered tablespace when tablespace is being deferred
2021-12-12 09:58:54 +05:30
Thirunarayanan Balathandayuthapani
be5990d0c8 MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer
This patch reverts the commit cab8f4b552.
InnoDB fails to restore page0 from doublewrite buffer when the
tablespace is being deferred. In that case, InnoDB doesn't find
INIT_PAGE redo log record for page0 and it leads to failure.
InnoDB should recovery page0 from doublewrite buffer for the
deferred tablespace before applying the redo log records.

Added deferred_dblwr() to restore page0 of deferred tablespace
from doublewrite buffer
2021-12-12 09:58:54 +05:30
Marko Mäkelä
ccdf5711a8 Merge 10.7 into 10.8 2021-12-10 13:05:06 +02:00
Marko Mäkelä
979b23d5bf Add forgotten changes to the parent commit 2021-12-10 13:04:46 +02:00
Marko Mäkelä
978116d991 Merge 10.7 into 10.8 2021-12-10 12:29:14 +02:00
Marko Mäkelä
28b27b96d0 Cleanup: Remove some ib::logger in recovery messages 2021-12-10 12:26:26 +02:00
Marko Mäkelä
26fdbd7632 Merge 10.6 into 10.7 2021-12-10 11:32:49 +02:00
Marko Mäkelä
50ed0bd891 MDEV-27219 Some error messages might report table names incorrectly on LLP64
In commit 49e2c8f0a6 (MDEV-25743)
some more use of the printf-style format "%.*s" was added.
The length parameter is of type int, not size_t.
On 64-bit platforms that follow the LLP64 convention (such as
64-bit Microsoft Windows), sizeof(int)==4 and sizeof(size_t)==8.

Let us explicitly cast the lengths to the correct type in order
to avoid any trouble.
2021-12-10 11:29:06 +02:00
Sergei Golubchik
ef77c05126 Merge branch '10.6' into 10.7 2021-12-08 10:33:36 +01:00
Sergei Golubchik
186c1fa250 Merge branch '10.5' into 10.6 2021-12-07 22:11:30 +01:00
Sergei Golubchik
88ac91c7cc ColumnStore and S3 SUMMARY/DESCRIPTION for RPM 2021-12-07 21:31:00 +01:00
Sergei Golubchik
de70f921ce Merge branch '10.4' into 10.5 2021-12-07 21:30:27 +01:00
Marko Mäkelä
cfcfdc65df MDEV-27190 InnoDB upgrade from 10.2, 10.3, 10.4 is not crash-safe
During startup, InnoDB must write a FILE_CHECKPOINT record.
However, before MDEV-12353 (in MariaDB Server 10.2, 10.3, 10.4)
the corresponding record MLOG_CHECKPOINT was encoded in a different way.

When we are upgrading from a logically empty 10.2, 10.3, or 10.4 redo log,
we must not write anything to the old log file, because if the server were
killed during the upgrade, we would end up with a corrupted log file, and
both the old and the new server would refuse to start up.

On upgrade, we must simply create a new logically empty log file
and replace the old ib_logfile0 with that.
2021-12-07 17:00:46 +02:00
Eugene Kosov
890c55177d MDEV-27183 optimize std::map lookup in during crash recovery
This is a low hanging fruit. Before this patch std::map::emplace() was
a ~50% of the whole recv_sys_t::parse() operation in by test.
After the fix it's only ~20%.

recv_sys_t::parse() recv_sys_t::pages is a collection of all pages
to recovery. Often, there are multiple changes for a single page.
Often, they go in a row and for such cases let's avoid
lookup in a std::map. cached_pages_it serves as a cache
of size 1.

recv_sys_t::add(): replace page_id argument with a std::map::iterator
2021-12-07 15:50:00 +06:00
Sergei Golubchik
e8a91c18ea Merge branch '10.3' into 10.4 2021-12-07 09:47:42 +01:00
Eugene Kosov
0064316f19 cleanup: reduce code bloat 2021-12-06 14:06:17 +06:00
Marko Mäkelä
467c7b2b24 Merge 10.7 into 10.8 2021-12-04 13:43:52 +02:00
Marko Mäkelä
182bf9b333 Merge 10.6 into 10.7 2021-12-04 13:23:14 +02:00
Marko Mäkelä
6deaff58a9 MDEV-27058 fixup: GCC 11 -march=i686 -Warray-bounds
page_zip_des_t::clear(): Avoid a bogus GCC warning with
some pointer arithmetics. Yes, storing the unrelated member "fix"
in this object is ugly, but it avoids memory alignment overhead
on 64-bit architectures.
2021-12-04 12:55:26 +02:00
Marko Mäkelä
3f7040fa97 Merge 10.5 into 10.6 2021-12-04 12:42:29 +02:00
Marko Mäkelä
fa1325512b Correct some comments
In commit aae3f921ad
recv_apply_hashed_log_recs() was replaced by recv_sys_t::apply().
2021-12-03 17:01:48 +02:00
Eugene Kosov
5d7da02793 MDEV-27139 32-bit systems fail to use big innodb-log-file-size
log_write_buf(): do not cast to size_t which prevents to write to files
which a bigger that 4G and remove useless assertion
2021-12-03 14:57:23 +06:00
Marko Mäkelä
e384299ec2 Merge 10.7 into 10.8 2021-12-02 17:59:45 +02:00
Marko Mäkelä
1e54a9716d Merge 10.6 into 10.7 2021-12-02 17:22:06 +02:00
Lukas Javorsky
045f5f7b10 MDEV-21108 Add option for setting install paths of groonga
Include gronnga and groonga-normalizer-mysql install path
2021-12-02 16:40:29 +02:00
Marko Mäkelä
f9726ced25 MDEV-12353 fixup: Correct a comment
Several EXTENDED type records have already been implemented.
2021-12-01 13:43:43 +02:00
Thirunarayanan Balathandayuthapani
e0e24b180d MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer
- Replaced the pointer parameter of validate_for_recovery() with uint32_t
2021-12-01 13:37:06 +05:30
Thirunarayanan Balathandayuthapani
cab8f4b552 MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer
InnoDB fails to restore page0 from doublewrite buffer when the
tablespace is being deferred. In that case, InnoDB doesn't find
INIT_PAGE redo log record for page0 and it leads to failure.
InnoDB should recovery page0 from doublewrite buffer.
2021-11-29 21:31:58 +05:30
Marko Mäkelä
897d8c57b6 Merge 10.7 into 10.8 2021-11-29 11:58:15 +02:00
Marko Mäkelä
c22107fd90 Merge 10.6 into 10.7 2021-11-29 11:42:07 +02:00
Marko Mäkelä
51c89849d1 Merge 10.5 into 10.6 2021-11-29 11:39:34 +02:00
Marko Mäkelä
d4cb177603 Merge 10.4 into 10.5 2021-11-29 11:16:20 +02:00
Marko Mäkelä
4da2273876 Merge 10.3 into 10.4 2021-11-29 10:59:22 +02:00
Marko Mäkelä
289721de9a Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
Vladislav Vaintroub
bf8735eb16 Fix MSVC warning C4819 when system codepage is set to UTF-8.
The warning message says the file contains a character which can not be
represented in current codepage (not exactly accurate)
2021-11-28 11:56:43 +01:00
Vladislav Vaintroub
e85089afca Windows : fix clang-cl build.
Disable lock elision, due to buggy intrin.h (_xbegin is misspelled)
Fix warnings.
2021-11-28 11:43:35 +01:00
Sergei Krivonos
73df7a3009 MDEV-27036: resolve duplicated key issues of JSON tracing outputs:
MDEV-27036: repeated "table" key resolve for print_explain_json

MDEV-27036: duplicated keys in best_access_path

MDEV-27036: Explain_aggr_filesort::print_json_members: resolve duplicated "filesort" member in Json object

MDEV-27036: Explain_basic_join::
            print_explain_json_interns fixed start_dups_weedout case for main.explain_json test
2021-11-26 15:11:06 +02:00
Marko Mäkelä
124d74f5eb Merge 10.7 into 10.8 2021-11-25 19:52:52 +02:00
Marko Mäkelä
e8f6b3b20e Restore a DBUG_SUICIDE for binlog.binlog_truncate_multi_engine
This fixes up 4489a89c71
and the test binlog.binlog_truncate_multi_engine
that indirectly invokes the DBUG_SUICIDE.
2021-11-25 18:50:29 +02:00
Marko Mäkelä
c41cbfaf1a Merge 10.7 into 10.8 2021-11-25 08:47:54 +02:00
Marko Mäkelä
5f160b4d86 Merge 10.6 into 10.7 2021-11-25 08:10:02 +02:00
Marko Mäkelä
3cfbfa58de Merge 10.5 into 10.6 2021-11-25 08:08:42 +02:00
Marko Mäkelä
de7db5517d MDEV-26674 follow-up: Bless Linux 5.15.3
In commit 1193a793c4 we
set innodb_use_native_aio=OFF when using io_uring
on a kernel where write requests could potentially be lost.

The last reproducible issue was fixed in Linux 5.16-rc1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.16-rc1&id=d3e3c102d107bb84251455a298cf475f24bab995
and the fix was backported to 5.15.3.

Hence, using a 5.16 or later kernel should be fine.
The Debian kernel 5.15.0-1-amd64 (5.15.3-1) was tested.
On Debian, utsname::release or uname -r does not reflect the
exact minor version while utsname::version and uname -v does.

On Fedora however the utsname::version is rather different:

  $ uname -r
  5.14.20-200.fc34.x86_64
  $ uname -v
  #1 SMP Thu Nov 18 22:03:20 UTC 2021

As such we use the version, but fall back to the release if
there isn't the beginnings of a kernel version in the version.

Thanks to Daniel Black for reporting the Linux kernel bug and
Jens Axboe for actually fixing it.

Co-Authored-By: Daniel Black <daniel@mariadb.org>

Closes: #1953
2021-11-25 09:38:58 +11:00
Robert Bindar
fcc8f480af Fix build failure on mac due to invalid access on private member from rw_lock 2021-11-24 17:52:51 +02:00
Marko Mäkelä
917b421012 MDEV-26682 fixup: GCC -Wunused-variable 2021-11-24 12:05:44 +02:00
Marko Mäkelä
6b2b510839 PFS_events_statements cleanup: Use offsetof
The macro my_offsetof() performs pointer arithmetics that may be
undefined behavior. As reported in MDEV-26272, it may cause
clang -fsanitize=undefined to generate invalid memory references.

struct PFS_events_statements: Convert to std::is_standard_layout
by encapsulating the standard-layout struct PFS_events instead of
deriving from it, so that the standard macro offsetof() can be used.

PFS_events_statements::copy(): Renamed from copy_events_statements().
A cast to void* is now needed in memcpy() to avoid GCC -Wclass-memaccess
"writing to an object ... leaves 64 bytes unchanged".
2021-11-24 12:04:51 +02:00
Alexey Bychko
fe065f8d90 MDEV-22522 RPM packages have meaningless summary/description
this patch moves cpack summury and description for optional packages
to the appropriate CMakeLists.txt files
2021-11-23 11:29:24 +07:00