Commit Graph

3251 Commits

Author SHA1 Message Date
Otto Kekäläinen
5879c85f50 Fix misc spelling in MariaDB Server repository
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
This is a combined patch of various spelling fixes originally done in
Debian.

* Fix misc typos in MariaDB Server

* Fix spelling of 'allows one to'

  Fix the following Lintian nags introduced in commit
  c8d040938a:

  I: mariadb-backup: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-backup]
  I: mariadb-server-core: spelling-error-in-binary "allows to" "allows one to" [usr/sbin/mariadbd]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-client-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/mariadb-test-embedded]
  I: mariadb-test: spelling-error-in-binary "allows to" "allows one to" [usr/bin/test-connect-t]
2025-12-10 18:08:12 +04:00
Oleksandr Byelkin
4af88ced48 Merge branch '11.8' into bb-12.1-release 2025-10-28 15:26:26 +01:00
Oleksandr Byelkin
6d0be016fa Merge branch '11.4' into bb-11.8-release 2025-10-24 12:25:01 +02:00
Oleksandr Byelkin
029d6a0b2e Merge branch '10.11' into bb-11.4-release 2025-10-22 10:21:16 +02:00
ParadoxV5
b81aef5ec2 MDEV-37908: Replace perror link with GitBook
Replace the KB link in `extra/perror` (from
MDEV-34168) with a computed GitBook docs link

Reviewed-by: Daniel Black <daniel@mariadb.org>
2025-10-21 15:47:00 -06:00
Yuchen Pei
4586b96c29
Merge branch '10.11' into 11.4 2025-10-15 19:29:55 +11:00
Thirunarayanan Balathandayuthapani
9f8716ab61 MDEV-37138: Innochecksum fails to handle doublewrite buffer and
multiple file tablespace

Problem:
=======
- innochecksum was incorrectly interpreting doublewrite buffer
pages as index pages, causing confusion about stale tables
in the system tablespace.

- innochecksum fails to parse the multi-file system tablespace

Solution:
========
1. Rewrite checksum of doublewrite buffer pages
are skipped.

2. Introduced the option --tablespace-flags which can be used
to initialize page size. This option can handle the ibdata2,
ibdata3 etc without parsing ibdata1.
2025-10-13 13:04:53 +05:30
Oleksandr Byelkin
c976b527db Merge branch '11.8' into bb-12.1-release 2025-10-08 09:05:38 +02:00
Marko Mäkelä
5a74bfa054 MDEV-35049 fixup: Fix SUX_LOCK_GENERIC
xtrabackup_backup_func(): Invoke btr_search_sys_create(), because
innodb_shutdown() assumes that it will have been called.

srv_boot(): Invoke btr_search_sys_create(). This fixes assertion failures
in the test innodb.temporary_table.

btr_sea::create(): Do not invoke enable().

buf_pool_t::create(): Instead of invoking btr_sea::create(),
invoke btr_sea::enable() when needed.
2025-09-30 10:11:56 +03:00
Marko Mäkelä
643d365ced Merge 11.4 into 11.8 2025-09-30 09:28:08 +03:00
Aleksey Midenkov
ff33f49d9a Merge 11.4 into 11.8
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
2025-09-29 18:25:09 +03:00
Marko Mäkelä
4369a382a1 MDEV-37152: Remove many calls to _current_thd()
mtr_t::trx: New public const data member. If it is nullptr,
per-connection statistics will not be updated. The transaction is
not necessarily in active state. We may merely use it as an "anchor"
for buffering updates of buf_pool.stat.n_page_gets in
trx_t::pages_accessed.

As part of this, we try to create mtr_t less often, reusing one object
in multiple places. Some read operations will
invoke mtr_t::rollback_to_savepoint() to release their own page latches
within a larger mini-transactions.

Reviewed by: Vladislav Lesin
Tested by: Saahil Alam
2025-09-29 14:35:02 +03:00
Oleksandr Byelkin
15b1426c3a Merge branch '10.11' into bb-11.4-release
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
2025-09-15 16:17:33 +02:00
Monty
fd39c63b41 MDEV-37520 Failure to detect corruption during backups of Aria table
Fixed the following issues:
- aria_read_index() and aria_read_data(), used by mariabackup, checked
  the wrong status from maria_page_crc_check().
- Both functions did infinite retries if crc did not match.
- Wrong usage of ma_check_if_zero() in maria_page_crc_check()

Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
2025-09-04 18:08:39 +03:00
Monty
f33367f2ab Fixed a LOT of memory leaks in mariabackup
This was generally good to get done but also needed to be able to run
mariabackup test under asan.

Things freed:
- Allocated variables (mysql_tmpdir_list, opt_passwd etc)
- InnoDB variables
- Results from SQL queries (A lot of sql queries did not free their result)
- Allocated sys_vars
- Server variables (mysql_server_end())
- Memory allocated by plugins (encryption)
- Free variables allocated by my_default. (Old code had a bug that caused
  these to not be freed)

Other things:
- Moved freeing of mysql_tmpdir_list to main, as the old code did not
  free the last mysqltmp_dir allocation.  Now we also initialize the
  variable only once.
- Fixed a serious, potentially 'crashing at end' bug where we called
  free_defaults() with wrong pointers.
- Fixed a bug related to update_malloc_size() where we did not take
  into account the it was not changed.
- Fixed a bug in Sys_var_charptr_base where we did not allocate
  default values. This could lead to trying to free not allocated values
  in xtrabackup.
- Added sf_have_memory_leak() to be able to easily check if there was
  a memory leak when using safemalloc()
- sf_report_leaked_memory() now returns 1 if a memory leak was found.
2025-09-04 18:08:39 +03:00
Marko Mäkelä
257f4b30ef Merge 10.11 into 11.4
Some checks are pending
Build on Windows ARM64 / build (push) Waiting to run
2025-09-03 10:32:56 +03:00
Marko Mäkelä
cc277a7d24 MDEV-36024: Redesign innodb_encrypt_log=ON
The innodb_encrypt_log=ON subformat of FORMAT_10_8 is inefficient,
because a new encryption or decryption context is being set up for
every log record payload snippet.

An in-place conversion between the old and new innodb_encrypt_log=ON
format is technically possible. No such conversion has been
implemented, though. There is some overhead with respect to the
unencrypted format (innodb_encrypt_log=OFF): At the end of each
mini-transaction, right before the CRC-32C, additional 8 bytes will be
reserved for a nonce (really, log_sys.get_flushed_lsn()), which forms
a part of an initialization vector.

log_t::FORMAT_ENC_11: The new format identifier, a UTF-8 encoding of
🗝 U+1F5DD OLD KEY (encryption). In this format, everything except the
types and lengths of log records will be encrypted. Thus, unlike in
FORMAT_10_8, also page identifiers and FILE_ records will be encrypted.
The initialization vector (IV) consists of the 8-byte nonce as well as
the type and length byte(s) of the first record of the mini-transaction.
Page identifiers will no longer form any part of the IV.

The old log_t::FORMAT_ENC_10_8 (innodb_encrypt_log=ON) will be supported
both by mariadb-backup and by crash recovery. Downgrade from the new
format will only be possible if the new server has been running or
restarted with innodb_encrypt_log=OFF. If innodb_encrypt_log=ON,
only the new log_t::FORMAT_ENC_11 will be written.

log_t::is_recoverable(): A new predicate, which holds for all 3
formats.

recv_sys_t::tmp_buf: A heap-allocated buffer for decrypting a
mini-transaction, or for making the wrap-around of a memory-mapped
log file contiguous.

recv_sys_t::start_lsn: The start of the mini-transaction.
Updated at the start of parse_tail().

log_decrypt_mtr(): Decrypt a mini-transaction in recv_sys.tmp_buf.
Theoretically, when reading the log via pread() rather than a read-only
memory mapping, we could modify the contents of log_sys.buf in place.
If we did that, we would have to re-read the last log block into
log_sys.buf before resuming writes, because otherwise that block could be
re-written as a mix of old decrypted data and new encrypted data, which
would cause a subsequent recovery failure unless the log checkpoint had
been advanced beyond this point.

log_decrypt_legacy(): Decrypt a log_t::FORMAT_ENC_10_8 record snippet
on stack. Replaces recv_buf::copy_if_needed().

recv_sys_t::get_backup_parser(): Return a recv_sys_t::parser, that is,
a pointer to an instantiation of parse_mmap or parse_mtr for the current
log format.

recv_sys_t::parse_mtr(), recv_sys_t::parse_mmap(): Add a parameter
template<uint32_t> for the current log_sys.format.

log_parse_start(): Validate the CRC-32C of a mini-transaction.
This has been split from the recv_sys_t::parse() template to
reduce code duplication. These two are the lowest-level functions
that will be instantiated for both recv_buf and recv_ring.

recv_sys_t::parse(): Split into ::log_parse_start() and parse_tail().
Add a parameter template<uint32_t format> to specialize for
log_sys.format at compilation time.

recv_sys_t::parse_tail(): Operate on pointers to contiguous
mini-transaction data. Use a parameter template<bool ENC_10_8>
for special handling of the old innodb_encrypt_log=ON format.
The former recv_buf::get_buf() is being inlined here.
Much of the logic is split into non-inline functions, to avoid
duplicating a lot of code for every template expansion.

log_crypt: Encrypt or decrypt a mini-transaction in place in the
new innodb_encrypt_log=ON format. We will use temporary buffers
so that encryption_ctx_update() can be invoked on integer multiples
of MY_AES_BLOCK_SIZE, except for the last bytes of the encrypted
payload, which will be encrypted or decrypted in place thanks to
ENCRYPTION_FLAG_NOPAD.

log_crypt::append(): Invoke encryption_ctx_update() in MY_AES_BLOCK_SIZE
(16-byte) blocks and scatter/gather shorter data blocks as needed.

log_crypt::finish(), Handle the last (possibly incomplete) block as a
special case, with ENCRYPTION_FLAG_NOPAD.

mtr_t::parse_length(): Parse the length of a log record.

mtr_t::encrypt(): Use log_crypt instead of the old log_encrypt_buf().

recv_buf::crc32c(): Add a parameter for the initial CRC-32C value.

recv_sys_t::rewind(): Operate on pointers to the start of the
mini-transaction and to the first skipped record.

recv_sys_t::trim(): Declare as ATTRIBUTE_COLD so that this rarely
invoked function will not be expanded inline in parse_tail().

recv_sys_t::parse_init(): Handle INIT_PAGE or FREE_PAGE while scanning
to the end of the log.

recv_sys_t::parse_page0(): Handle WRITE to FSP_SPACE_SIZE and
FSP_SPACE_FLAGS.

recv_sys_t::parse_store_if_exists(), recv_sys_t::parse_store(),
recv_sys_t::parse_oom(): Handle page-level log records.

mlog_decode_varint_length(): Make use of __builtin_clz() to avoid a loop
when possible.

mlog_decode_varint(): Define only on const byte*, as
ATTRIBUTE_NOINLINE static because it is a rather large function.

recv_buf::decode_varint(): Trivial wrapper for mlog_decode_varint().

recv_ring::decode_varint(): Special implementation.

log_page_modify(): Note that a page will be modified in recovery.
Split from recv_sys_t::parse_tail().

log_parse_file(): Handle non-page log records.

log_record_corrupted(), log_unknown(), log_page_id_corrupted():
Common error reporting functions.
2025-09-02 13:28:34 +03:00
Marko Mäkelä
3ee1991645 MDEV-36159 mariabackup failed after upgrade
Ever since commit 685d958e38
(MDEV-14425) mariadb-backup --backup had some trouble to keep up
with write workloads of the mariadbd server.

Debarun Banerjee found out that mariadb-backup --backup was
copying the log in the wrong way and not pausing when it made
sense to do so. This change includes his fix as well as some
dead code removal from xtrabackup_copy_mmap_logfile().

Some earlier changes to the default behaviour of mariadb-backup --backup
will be reverted, by making the configuration parameters OFF by default.
These parameters were basically working around this bug:

* commit 652f33e0a4 (MDEV-30000)
introduced --innodb-log-checkpoint-now and made it ON by default.
Making the server execute a log checkpoint can be really I/O intensive.
* commit 6acada713a (MDEV-34062)
introduced --innodb-log-file-mmap and made it ON by default on
Linux and FreeBSD. There are no documented semantics what should
happen to a memory mapping when there are concurrent pwrite(2)
operations by other processes. While it appears to work, it is safer
to default to clearly documented semantics.

xtrabackup_copy_logfile(): Add a parameter early_exit.
Always read a log snippet to the start of recv_sys.buf and assign
recv_sys.len to the read length. We used to shift recv_sys.buf
with memmove(). However, on recv_sys_t::PREMATURE_EOF we cannot know
which part of the mini-transaction was correctly read, because that
part of the ib_logfile0 may be concurrently modified by the server.
So, we will reread everything from the start of the mini-transaction.

xtrabackup_backup_func(): Invoke xtrabackup_copy_logfile(true),
allowing it to stop on every recv_sys_t::PREMATURE_EOF.
This will also avoid repeated "Retry" messages when there is no
more redo log to copy.

get_current_lsn(): Execute FLUSH ENGINE LOGS to ensure that
InnoDB will complete any buffered writes to the ib_logfile0
and ensure that everything up to the current LSN has been
written.

backup_wait_for_commit_lsn(): Wait for as much as is really needed.
This avoids an extra 5-second wait at the end of the backup.

xtrabackup_copy_mmap_logfile(): Remove some dead code, and add
debug assertions to demonstrate that the parser can only return
recv_sys_t::OK or recv_sys_t::GOT_EOF.
2025-08-20 15:30:49 +03:00
Sergei Golubchik
6e8dbb9693 Merge branch '12.0' into 12.1
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
wsrep.wsrep_off: update the result file after c4cad8d50c
2025-08-03 15:01:09 +02:00
Sergei Golubchik
aab83aecdc Merge branch '11.8' into 12.0
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
main/statistics_json.result is updated for f8ba5ced55 (MDEV-36099)

The test uses 'delete from t1' in many places and then populates
the table again. The natural order of rows in a MyISAM table is well
defined and the test was implicitly relying on that.

before f8ba5ced55 delete was deleting rows one by one, using
ha_myisam::delete_row() because the connection was stuck in rbr mode.
This caused rows to be shown in the reverse insertion order (because of
the delete link list).

MDEV-36099 fixes this bug and the server now correctly uses
ha_myisam::delete_all_rows(). This makes rows to be shown in the
insertion order as expected.
2025-07-31 20:55:47 +02:00
Sergei Golubchik
b565b3e7e0 Merge branch '11.4' into 11.8
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
2025-07-28 21:29:29 +02:00
Sergei Golubchik
c4ed889b74 Merge branch '10.11' into 11.4
Some checks failed
Build on Windows ARM64 / build (push) Has been cancelled
2025-07-28 19:40:10 +02:00
Sergei Golubchik
053f9bcb5b Merge branch '10.6' into 10.11 2025-07-28 18:06:31 +02:00
Sergei Golubchik
f49a5beb30 mariadb-backup: read --tables-file in the text mode on Windows 2025-07-25 19:15:09 +02:00
Vladislav Vaintroub
145afe7d79 Workaround WolfSSL issue #9004 to fix the build on Windows. 2025-07-25 12:28:30 +02:00
Sergei Golubchik
a3c3db7693 update WolfSSL to 5.8.0-stable 2025-07-25 12:28:30 +02:00
Thirunarayanan Balathandayuthapani
626d5bf832 MDEV-36287 mariabackup ignores tables-file
Problem:
========
- Mariabackup ignores tables-file option because it fails to
register the new entry in database hash cells. This issue was
caused by the commit 3c312d247c (MDEV-35190).
xb_register_filter_entry() fails to stop when it encounters the
empty list.

Solution:
=========
xb_register_filter_entry(): If there is no next member to
deference then it return pointer to existing element.
2025-07-16 15:50:50 +03:00
Thirunarayanan Balathandayuthapani
3bcfc2ed0a MDEV-22250 InnoDB: Failing assertion: opt_no_lock during mariabackup --backup
backup_file_op_fail(): Ignore the FTS internal table if it is being
created in late phase of backup. mariabackup --prepare should be
handle intermediate table and orphaned fts internal table.

check_if_fts_table(): Determine whether the space name belongs to
internal FTS table
2025-07-14 16:30:06 +03:00
Monty
0b7b5cc1b3 MDEV-24 Segmented key cache for Aria
Added option 'aria-pagecache-segments', default 1.

For values > 1, this split the aria-pagecache-buffer into the given
number of segments, each independent from each other.  Having multiple
pagecaches improve performance when multiple connections runs queries
concurrently using different tables.

Each pagecache will use aria-pageache-buffer/segments amount of
memory, however at least 128K.

Each opened table has its index and data file use the segments in a
a round-robin fashion.

Internal changes:
- All programs allocating the maria pagecache themselves should now
  call multi_init_pagecache() instead of init_pagecache().
- pagecache statistics is now stored in 'pagecache_stats' instead of
  maria_pagecache. One must call multi_update_pagecache_stats() to
  update the statistics.
- Added into PAGECACHE_FILE a pointer to files pagecache. This was
  done to ensure that index and data file are using the same
  pagecache and simplified the checkpoint code.
  I kept pagecache in TABLE_SHARE to minimize the changes.
- really_execute_checkpoint() was update to handle a dynamic number of
  pagecaches.
- pagecache_collect_changed_blocks_with_lsn() was slight changed to
  allow it to be called for each pagecache.
- undefined not used functions maria_assign_pagecache() and
  maria_change_pagecache()
- ma_pagecaches.c is totally rewritten. It now contains all
  multi_pagecache functions.

Errors found be QA that are fixed:
MDEV-36872 UBSAN errors in ma_checkpoint.c
MDEV-36874 Behavior upon too small aria_pagecache_buffer_size in case of
           multiple segments is not very user-friendly
MDEV-36914 ma_checkpoint.c(285,9): conversion from '__int64' to 'uint'
           treated as an error
MDEV-36912 sys_vars.sysvars_server_embedded and
           sys_vars.sysvars_server_notembedded fail on x86
2025-06-25 17:59:45 +03:00
Thirunarayanan Balathandayuthapani
b1829ff821 MDEV-22250 InnoDB: Failing assertion: opt_no_lock during mariabackup --backup
backup_file_op_fail(): Ignore the FTS internal table if it is being
created in late phase of backup. mariabackup --prepare should be
handle intermediate table and orphaned fts internal table.

check_if_fts_table(): Modified the code to check for fts auxiliary
table and fts common tables.

Revised some error message during backup stage commands.
2025-07-15 15:54:05 +05:30
Marko Mäkelä
a87bb96ecb MDEV-36234: Add innodb_linux_aio
This controls which linux implementation to use for
innodb_use_native_aio=ON.

innodb_linux_aio=auto is equivalent to innodb_linux_aio=io_uring when
it is available, and falling back to innodb_linux_aio=aio when not.

Debian packaging is no longer aio exclusive or uring, so
for those older Debian or Ubuntu releases, its a remove_uring directive.
For more recent releases, add mandatory liburing for consistent packaging.

WITH_LIBAIO is now an independent option from WITH_URING.

LINUX_NATIVE_AIO preprocessor constant is renamed to HAVE_LIBAIO,
analogous to existing HAVE_URING.

tpool::is_aio_supported(): A common feature check.

is_linux_native_aio_supported(): Remove. This had originally been added in
mysql/mysql-server@0da310b69d in 2012
to fix an issue where io_submit() on CentOS 5.5 would return EINVAL
for a /tmp/#sql*.ibd file associated with CREATE TEMPORARY TABLE.
But, starting with commit 2e814d4702 InnoDB
temporary tables will be written to innodb_temp_data_file_path.
The 2012 commit said that the error could occur on "old kernels".
Any GNU/Linux distribution that we currently support should be based
on a newer Linux kernel; for example, Red Hat Enterprise Linux 7
was released in 2014.

tpool::create_linux_aio(): Wraps the Linux implementations:
create_libaio() and create_liburing(), each defined in separate
compilation units (aio_linux.cc, aio_libaio.cc, aio_liburing.cc).

The CMake definitions are simplified using target_sources() and
target_compile_definitions(), all available since CMake 2.8.12.
With this change, there is no need to include ${CMAKE_SOURCE_DIR}/tpool
or add TPOOL_DEFINES flags anymore, target_link_libraries(lib tpool)
does all that.

This is joint work with Daniel Black and Vladislav Vaintroub.
2025-06-23 13:51:52 +03:00
Marko Mäkelä
32128ab656 MDEV-37049 my_assume_aligned assertion in mariabackup
log_hdr_buf: Align to an 8-byte boundary, because we will actually
assume at least 4-byte alignment in log_crypt_write_header().

This fixes a regression that had been introduced in
commit 685d958e38 (MDEV-14425)
where a 512-byte alignment requirement was relaxed too much.
2025-06-23 08:38:56 +03:00
Thirunarayanan Balathandayuthapani
2d1e019f4f MDEV-36871 mariadb-backup incremental segfault querying mariadb_backup_history
Problem:
=========
(1) Mariabackup tries to read the history data from
mysql.mariadb_backup_history and fails with segfault. Reason is that
mariabackup does force innodb_log_checkpoint_now from commit 652f33e0a44661d6093993d49d3e83d770904413(MDEV-30000).
Mariabackup sends the "innodb_log_checkpoint_now=1" query to server and
reads the result set for the query later in the code because the query
may trigger the page thread to flush the pages. But before reading the
query result for innodb_log_checkpoint_now=1, mariabackup does execute
the select query for the history table (mysql.mariadb_backup_history)
and wrongly reads the query result of innodb_log_checkpoint_now. This leads
to assertion in mariabackup.

(2) The recording of incremental backups has the format as "tar"
when mbstream was used. The xb_stream_fmt_t only had XB_STREAM_FMT_NONE
and XB_STREAM_FMT_XBSTREAM and hence in the mysql.mariadb_backup_history
table the format was recorded as "tar" for the "mbstream" due to the
offset in the xb_stream_name array within mariadb-backup.

(3) Also under Windows the full path of mariabackup was recorded in the the
history.

(4) select_incremental_lsn_from_history(): Name of the backup and UUID
of the history record variable could lead to buffer overflow while
copying the variable value from global variable.

Solution:
=========
(1) Move the reading of history data from mysql.mariadb_backup_history
after reading the result of innodb_log_checkpoint_now=1 query

(2) We've removed the "tar" element from the xb_stream_name. As the
"xbstream" was never used, the format name is changed to mbstream.
As the table needs alteration the "mbstream" appended instead of
the unused xbstream in the table. "tar" is left in the enum as
the previous recordings are still possible.

(3) The Windows path separator is used to store just the executable
name as the tool in the mariadb_backup_history table.

(4) select_incremental_lsn_from_history(): Check and validate
the length of incremental history name and incremental history uuid
before copying into temporary buffer

Thanks to Daniel black for contributing the code for solution (2) and (3)
2025-06-23 10:26:43 +10:00
Oleksandr Byelkin
dfcb5c91e0 Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
Oleksandr Byelkin
a65f7dc71d Merge branch '11.4' into 11.8 2025-06-18 07:43:24 +02:00
Oleksandr Byelkin
89c7e2b9c7 Merge branch '10.11' into 11.4 2025-06-17 09:50:22 +02:00
Daniel Black
3944655357 MDEV-37019 MSAN_STAT_WORKAROUND macro remove
MSAN has been updated since 2022 when this macro was added
and as such the working around MSAN's deficient understanding
of the fstat/stat syscall behaviour at the time is no longer
required.

As an effective no-op a straight removal is sufficient.
2025-06-18 16:46:21 +10:00
Kazuhiko Shiozaki
39ef6c0dc8 MDEV-34425 mroonga files are not copied by mariabackup
Backing up with mariabackup a datadir containing
ENGINE=Mroonga tables leaves behind the corresponding
*.mrn* files. Those tables are therefore broken once
such backup is restored.

minor style/mtr changes by Daniel Black
2025-06-18 10:23:47 +10:00
Vladislav Vaintroub
dd2982dc33 MDEV-30831 Cannot compile AWS KMS Plugin
Fix AWS SDK build, it has changed substantionally since the plugin was
introduced. There is now a bunch of intermediate C libraries, aws-cpp-crt
and others, and for static linking, the link dependency must be declared.

Also support AWS C++ SDK in vcpkg package manager.
2025-06-10 15:18:28 +02:00
Oleksandr Byelkin
28d6530571 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
Daniel Black
df414933f1 MDEV-36316/MDEV-36327/MDEV-36328 Debug msan
Clang ~16+ on MSAN became quite strict with uninitalized
data being passed and returned from functions. Non-debug builds
have a basic optimization that hides these from those builds

Two innodb cases violate the assumptions, however once inlined
with a basic optimization those that existed for uninitialized
values are removed.

(MDEV-36316) rec_set_bit_field_2 calling mach_read_from_2 hits a read of
bits it wasn't actually changing.

(MDEV-36327) The function dict_process_sys_columns_rec left
nth_v_col uninitialized unless it was a virtual column. This was
ok as the function i_s_sys_columns_fill_table also didn't read
this value unless it was a virtual column.
2025-05-28 16:28:34 +10:00
Vladislav Vaintroub
bcd02c79f3 Merge branch '10.6' into 10.11 2025-05-26 16:59:32 +02:00
Vladislav Vaintroub
aba04c562b Compiling - fix warnings with MSVC 17.14
New warnings come from 3 places

1. Warning C5287: Warning comes from json_lib.c from code like
  compile_time_assert((int) JSON_VALUE_NULL == (int) JSV_NULL);
2. Warning C5287: Similar warning come from wc_static_assert() from code
  in wolfSSL's header file
3. Warning C5286 in WolfSSL code, -enum_value

   (i.e multiplying enum with -1)is used

To fix:
- Disable warnings in WolfSSL code, using /wd<num> flag.
- workaround warning for users of WolfSSL, disable
  wc_static_assert() with -DWC_NO_STATIC_ASSERT compile flag
- Rewrite some compile_time_assert in json_lib.c to avoid warning.
- add target_link_libraries(vio ${SSL_LIBRARIES}) so that
  vio picks up -DWC_NO_STATIC_ASSERT
2025-05-26 16:58:21 +02:00
Monty
8bc1643148 MDEV-36860 exec_REDO_LOGREC_REDO_REPAIR_TABLE: Assertion `maria_tmpdir' failed
The problem was that aria_backup_client code did not intialize
maria_tmpdir, which is used during recovery if repair table is needed to
reconstruct indexes.
2025-05-25 16:38:21 +03:00
Oleksandr Byelkin
f1102da37a Merge branch '11.8' into 12.0 2025-05-22 09:22:55 +02:00
Marko Mäkelä
1c7209e828 Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
Marko Mäkelä
82d7419e06 MDEV-34388: Stack overflow on Alpine Linux
page_is_corrupted(): Do not allocate the buffers from stack,
but from the heap, in xb_fil_cur_open().

row_quiesce_write_cfg(): Issue one type of message when we
fail to create the .cfg file.

update_statistics_for_table(), read_statistics_for_table(),
delete_statistics_for_table(), rename_table_in_stat_tables():
Use a common stack buffer for Index_stat, Column_stat, Table_stat.

ha_connect::FileExists(): Invoke push_warning_printf() so that
we can avoid allocating a buffer for snprintf().

translog_init_with_table(): Do not duplicate TRANSLOG_PAGE_SIZE_BUFF.

Let us also globally enable the GCC 4.4 and clang 3.0 option
-Wframe-larger-than=16384 to reduce the possibility of introducing
such stack overflow in the future.  For RocksDB and Mroonga we relax
these limits.

Reviewed by: Vladislav Lesin
2025-05-20 17:27:05 +03:00
Vasilii Lakhin
40c5b62531 Fix remaining typos 2025-04-29 11:18:00 +10:00
Monty
d9cd4e1f75 MDEV-22250 InnoDB: Failing assertion: opt_no_lock during mariabackup --backup
Ensure that backup_reset_alter_copy_lock() is called in case of rollback
or error in mysql_inplace_alter_table() or copy_data_between_tables().

Other things:
- Improved error from mariabackup when unexpected DDL operation is
  encountered.
- Added assert if backup_ddl_log() is called in the wrong context.
2025-04-28 12:38:01 +03:00
Sergei Golubchik
237e24497b Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg 2025-04-27 19:40:00 +02:00