maria:bb-11-midenok

Last commit made on 2023-11-15
Get this branch:
git clone -b bb-11-midenok https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11-midenok
Repository:
lp:maria

Recent commits

de83e83... by midenok

MDEV-22164 without validation for exchange partition/convert in

1. WITHOUT/WITH VALIDATION may be added to EXCHANGE PARTITION or CONVERT TABLE:

  alter table tp exchange partition p1 with table t with validation;
  alter table tp exchange partition p1 with table t; -- same as with validation
  alter table tp exchange partition p1 with table t without validation;

2. Optional THAN keyword for RANGE partitioning. Normally you type:

  create table tp (a int primary key) partition by range (a) (
    partition p0 values less than (100),
    partition p1 values less than maxvalue);

  Now you may type (PARTITION keyword is also optional):

  create table tp (a int primary key) partition by range (a) (
    p0 values less (100),
    p1 values less maxvalue);

9e457cb... by Daniel Black

MDEV-32439 INSERT IGNORE on constraints result in ERROR rather than warning

INSERT IGNORE had a pecular undocumented case that when one row was
inserted, there was an error rather than a warning.

As LOAD DATA IGNORE, UPDATE IGNORE, INSERT IGNORE SELECT, and INSERT
IGNORE VALUES (single row, for foreign key violation) all behave the same
way with a warning lets keep the behaviour normalized.

In compatibility, previously a error was generated, now a warning is
generated.

This behaviour is now consistent with MySQL-8.0 too.

b0379ea... by Alexander Barkov

Cleanup: Adding "const" to the member Spvar_definition::m_column_type_ref

and to related methods and their parameters:
- The return value of Spvar_definition::m_column_type_ref()
- The parameter of Spvar_definition::set_column_type_ref()
- The method Qualified_column_ident::resolve_type_ref()
- The parameter of LEX::sp_variable_declarations_column_type_finalize()

b8f9f79... by Kristian Nielsen

MDEV-31273: Precompute binlog checksums

Compute binlog checksums (when enabled) already when writing events
into the statement or transaction caches, where before it was done
when the caches are copied to the real binlog file. This moves the
checksum computation outside of holding LOCK_log, improving
scalabitily.

At stmt/trx cache write time, the final end_log_pos values are not
known, so with this patch these will be set to 0. Events that are
written directly to the binlog file (not through stmt/trx cache) keep
the correct end_log_pos value. The GTID and COMMIT/XID events at the
start and end of event groups are written directly, so the zero
end_log_pos is only for events in the middle of event groups, which
do not negatively affect replication.

An option --binlog-legacy-event-pos, off by default, is provided to
disable this behavior to provide backwards compatibility with any
external applications that might rely on end_log_pos in events in the
middle of event groups.

Checksums cannot be pre-computed when binlog encryption is enabled, as
encryption relies on correct end_log_pos to provide part of the
nonce/IV.

Checksum pre-computation is also disabled for WSREP/Galera, as it uses
events differently in its write-sets and so on. Extending pre-computation of
checksums to Galera where it makes sense could be added in a future patch.

The current --binlog-checksum configuration is saved in
binlog_cache_data at transaction start and used to pre-compute
checksums in cache, if applicable. When the cache is later copied to
the binlog, a check is made if the saved value still matches the
configured global value; if so, the events are block-copied directly
into the binlog file. If --binlog-checksum was changed during the
transaction, events are re-written to the binlog file one-by-one and
the checksums recomputed/discarded as appropriate.

Reviewed-by: Monty <email address hidden>
Signed-off-by: Kristian Nielsen <email address hidden>

24c923d... by Kristian Nielsen

MDEV-31273: Refactor MYSQL_BIN_LOG::write_cache()

Preparatory patch for pre-computing binlog checksums outside of holding
LOCK_log.

The existing code for MYSQL_BIN_LOG::write_cache() was needlessly complex
and very hard to understand and modify for handling the new case where
pre-computed checksums are already present in the IO_CACHE.

Greatly simplify the logic by replacing the (implicit) state machine with
direct code that pulls the events one by one from the IO_CACHE. This removes
a lot of state flags and avoids duplicate code for handling full vs. split
headers.

This also removes the need for the CacheWriter class. As a bonus, this fixes
the bug that CacheWriter::write() was completely ignoring write errors. No
other functional changes are done with this patch, only code cleanup.

Reviewed-by: Monty <email address hidden>
Signed-off-by: Kristian Nielsen <email address hidden>

8eee980... by Kristian Nielsen

MDEV-31273: Eliminate Log_event::checksum_alg

This is a preparatory commit for pre-computing checksums outside of
holding LOCK_log, no functional changes.

Which checksum algorithm is used (if any) when writing an event does not
belong in the event, it is a property of the log being written to.

Instead decide the checksum algorithm when constructing the
Log_event_writer object, and store it there.

Introduce a client-only Log_event::read_checksum_alg to be able to
print the checksum read, and a
Format_description_log_event::source_checksum_alg which is the
checksum algorithm (if any) to use when reading events from a log.

Also eliminate some redundant `enum` keywords on the enum_binlog_checksum_alg
type.

Reviewed-by: Monty <email address hidden>
Signed-off-by: Kristian Nielsen <email address hidden>

77bd1be... by Kristian Nielsen

MDEV-31273: Replace Log_event::writer with function parameter

This is a preparatory patch for precomputing binlog checksums outside
of holding LOCK_log, no functional changes.

Replace Log_event::writer with just passing the writer object as a
function parameter to Log_event::write().

This is mainly for code clarity. Having to set ev->writer before every
call to ev->write() is error-prone (what if it's forgotten in some
code place?), while passing it as parameter as usual makes it explicit
how the dataflow is.

As a minor point, it also improves the code, as the compiler now can
save the function parameter in a register across nested calls (when it
is a class member, compiler needs to reload across nested calls in
case the object would be modified during the call).

Reviewed-by: Monty <email address hidden>
Signed-off-by: Kristian Nielsen <email address hidden>

d8dda7c... by Sergei Golubchik

11.4 branch

5fc19e7... by VladislavVaintroub

MDEV-32252 addendum - refactor CPackWixConfig.cmake

Refactor CPackWixConfig.cmake so that it complains about unknown CPack
components.

This would prevent missing components,or discrepancy between MSI and ZIP
content, whenever new components are added or renamed.

Also, remove some old stuff, and use macros add_component_group() and
add_component() to reduce the verbosity.

2407243... by Otto Kekalainen <email address hidden>

Deb: Include type_test.so and others in mariadb-test package

Move files to the mariadb-test package that are created during the build
but were not included in the package yet.