Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Raghunandan Bhat
MDEV-35717: UBSAN: runtime errors: applying [zero|non-zero] offset to null pointer

Problem:
  UBSAN reports runtime errors in string comparision functions where
  pointer arithmetic is done without checking NULL.

Fix:
  Check pointers are not NULL before doing pointer arithmetic.
Yuchen Pei
MDEV-39207 Fix plugin name passed to find_bookmark in test_plugin_options

Should be lowercase, just like in construct_options(). Without this
fix all plugin session vars have test_load always
false (static_unloaded).
Alexander Barkov
MDEV-38162 Refactoring: Change sp_type_def_composite2::m_def from Spvar_definition* to Spvar_definition

- Changing sp_type_def_composite2::m_def from  Spvar_definition* to Spvar_definition.
- Encapsulating it.

Retionale:

1. sp_type_def_composite2 was allocated in two steps:
  a. An sp_type_def_composite2 instance itself was allocated
  b. Two instances of Spvar_definition were allocated immediately after,
      and assigned to m_def[0] and m_def[1] respectively.
  Such two step allocation was not really needed.
  So this change moves the two instances of Spvar_definition right
  inside sp_type_def_composite2, so now it gets allocated in a single "new"
  instead of three "new" calls.

2. In the upcoming REF CURSOR change, sp_type_def_ref has an
  Spvar_definition member inside it (not a pointer to it).
  It's better to have sp_type_def_composite2 and sp_type_def_ref
  look closer to each other.
Alexander Barkov
MDEV-38436 Remove Type_handler::Column_definition_fix_attributes()

The method Type_handler::Column_definition_fix_attributes() was an
addition for Type_handler::Column_definition_set_attributes().

The code in virtual implementations of Column_definition_fix_attributes()
has now been joined to corresponding virtual implementations of
Column_definition_set_attributes().

After this change everything is done in Column_definition_set_attributes().

This makes the code clearer. Previous implementation was rather confusing.
For example, for temporal data types:
(1) After Column_definition_set_attributes():
  - Column_definition::length meant the fractional precision
  - Column_definition::decimals was set to 0
(2) After Column_definition_fix_attributes():
  - Column_definition::length means the full character length
  - Column_definition::decimals means the fractional precision

Now everything gets set to (2) right in Column_definition_set_attributes().
Rucha Deodhar
MDEV-39212: JSON_MERGE_PATCH depth crash

Analysis:
The crash happens because we run out of stack space

Fix:
Add a stack overflow check.
Marko Mäkelä
MDEV-34482 merge fixup: unstable test case

This fixes up the merge 7c5cac0d515b629df4e17833eac8d258eecd3900
that included b09ce6268aaa63cfe28e2df4905f9bbab7e345c4
whose test is occasionally failing when a non-existing event
is being dropped.

This is as backport of e47db94aea7f0d6e0177e948486fc8860331f05f
PranavKTiwari
MDEV-39184-Rework MDL enum constants values
Alexander Barkov
MDEV-38871 Variable declarations accept unexpected data type attributes (lengh,dec,srid)

Some data types:
- RECORD
- assoc arrays
- SYS_REFCURSOR

erroneously accepted non-relevant attributes:
- length
- scale
- character set / collation
- REF_SYSTEM_ID

Fixing to raise an error.

Details:

- Overriding get_column_attributes() in Type_handler_row,
  Type_handler_sys_refcursor, Type_handler_assoc_array.

- Moving a piece of the old code into a new method
  Type_handler::check_data_type_attributes(), to reuse it
  for testing attributes for both plugin types and TYPE-def types.

- Reusing check_data_type_attributes() in methods
  * LEX::set_field_type_udt_or_typedef()
  * LEX::set_field_type_udt()

- Adding opt_binary into the rule field_type_all_with_typedefs,
  into the grammar branch for the plugin types, as XMLTYPE needs it.
Alexander Barkov
MDEV-38109 Refactor sp_add_instr_fetch_cursor to get the target list argument

This is a preparatory refactoring patch to make MDEV-10152 simpler.
Under terms of MDEV-10152 we'll need LEX::sp_add_instr_fetch_cursor()
to get the target list as a parameter, to be able to rewrite it correctly
(to the data type of the REF CURSOR .. RETURN clause, instead of setting
it post-factum with help of the
method sp_instr_fetch_cursor::set_fetch_target_list().

Changes:
- Changing the result type of sp_add_instr_fetch_cursor() from
  sp_instr_fetch_cursor to bool
- Renaming sp_add_instr_fetch_cursor() to sp_add_fetch_cursor()
  to avoid problems during merge (the opposite return value in bool context)
- Adding a new parameter to sp_add_fetch_cursor(), so it looks like this:

    bool sp_add_fetch_cursor(THD *thd,
                          const Lex_ident_sys_st &name,
                          const List<sp_fetch_target> &list);

- Adding a new target list parameter to constructors sp_instr_fetch_cursor,
  sp_instr_cfetch, sp_instr_cfetch_by_ref,
- Remove the methods sp_instr_fetch_cursor::set_fetch_target_list(),
  sp_instr_fetch_cursor::add_to_fetch_target_list(), as they aren't needed
  any more.
- Removing from sql_yacc.yy the grammar rule sp_proc_stmt_fetch_head and
  adding instead a new rule fetch_statement_source.
- Changing the grammar rule sp_proc_stmt_fetch to the following to
  use the new rule fetch_statement_source.
- Adding a new helper constructor List(const T &a, MEM_ROOT *mem_root)
  to create lists consisting of a single element.
- Reusing the new List constructor in a few places.
Raghunandan Bhat
MDEV-34951: InnoDB index corruption when renaming key name with same letter to upper case.

Problem:
  InnoDB index corruption occurs when an index is renamed to a name that
  differs only in case (e.g., 'b' to 'B'). The SQL layer uses
  case-insensitive comparison and fails to recognize the change.

Fix:
  Use case-sensitive comparison when matching index names during
  ALTER TABLE to correctly identify and handle case changes.
Thirunarayanan Balathandayuthapani
MDEV-37294  segv in flst::remove_complete(buf_block_t*, unsigned short, unsigned char*, mtr_t*)

Problem:
=======
During system tablespace defragmentation, extent movement occurs
in two phases: prepare and complete.
1) prepare phase validates involved pages and acquires necessary
resources.
2) complete phase performs the actual data copy.

Prepare phase fails to check whether allocating a page will
make the extent FULL. When an extent has exactly (extent_size - 1)
pages used, the prepare phase returns early without latching
the prev/next extent descriptors needed for list manipulation.

Complete phase then allocates the final page, making the
extent full, and attempts to move it from
FSEG_NOT_FULL/FSP_FREE_FRAG to FSEG_FULL/FSP_FULL_FRAG list.
This fails with an assertion because the required blocks were
never latched, causing a crash in flst::remove_complete().

Solution:
========
alloc_from_fseg_prepare(), alloc_from_free_frag_prepare():
call these function only if the extent will be full after
allocation. This makes the
prepare phase to acquire the necessary pages for FSP list manipulation

find_new_extents(): Print more revised information about moving
of extent data and destination extent also.

defragment_level(): Move get_child_pages(new_block) before committing
changes to enable proper rollback on failure. Well, this failure
is theoretically impossible (new block is exact copy of
validated old block).
Alexander Barkov
MDEV-38161 Refactor Type_extra_attributes: change void* for generic attributes to a better type

The first key point of this commit is changing Type_extra_attributes in the way
that the pointer to a generic attribute is now "Type_generic_attributes*" -
a pointer to a new class with vitrual method type_handler().

Before this change the pointer to a generic attribute was
"void *m_attr_const_void_ptr", which was error prone, as allowed
to pass a pointer to a wrong structure without control.

Another key point is that the SET/ENUM data type related structures
are now attributed by the changed class Type_typelib_attributes,
which now looks as follows:

  class Type_typelib_attributes: public Sql_alloc,
                                public Type_generic_attributes,
                                public TYPELIB

(with virtual method type_handler()), instead of being attributed by
TYPELIB directly.

Details:

- Using Column_definition's method typelib() where the member m_typelib
  was used directly. The related lines change anyway, because the member
  is renamed m_typelib_attr.

- Adding a new class Type_generic_attributes.
  Deriving the following classes from it:
  * Type_typelib_attributes
  * sp_type_def

- sp_type_def does not derive from Type_handler_hybrid_field_type any more,
  because the method type_handler() is now implemented virtually.

- Removing Type_extra_attributes::m_attr_const_void_ptr and
  adding Type_extra_attributes::m_attr_const_generic_attributes_ptr instead -
  a pointer to the new class Type_generic_attributes.
  Renaming methods to set and read it according to the new data type name.

- Type_typelib_attributes now derives from TYPELIB instead of having
  a pointer to TYPELIB.

- Adding a new class Type_typelib_ptr_attributes. It's a replacement for
  the old implementation of Type_typelib_attributes.

  Instead of deriving from Type_typelib_attributes, Field_enum now derives
  from Type_typelib_ptr_attributes. The latter can store/read itself into/from
  Type_extra_attributes. It's a bridge between the new Type_typelib_attributes
  and Type_extra_attributes.

- Changing parameter data type in a few methods in Field_enum from
  a pointer to TYPELIB to a pointer to Type_typelib_attributes.

- Removing typelib related methods from Type_extra_attributes.
  Moving this functionality into Type_typelib_ptr_attributes and
  Column_definition_attributes.
  This turns Type_extra_attributes into a data structure independent
  from any data type specific structures/methods.

- Adding methods:
  Column_definition_attributes::typelib_attr() - Column_definition derives it
  Column_definition_attributes::typelib()      - Column_definition derives it
  Type_typelib_ptr_attributes::typelib_attr()  - Field_enum derives it
  Type_typelib_ptr_attributes::typelib()      - Field_enum derives it

- Renaming the member Create_field::save_interval into
  Create_field::save_typelib_attr.
  Changing its data type from a pointer to TYPELIB into a pointer
  to Type_typelib_attributes pointer.

- Removing the method Type_typelib_attributes::store().
  Adding Type_typelib_ptr_attributes::save_in_type_extra_attributes() instead.
  The new method name makes the code more readable.
Alexander Barkov
MDEV-10152 Add support for TYPE .. IS REF CURSOR

Adding support for the strict cursor data types:

Example 1a:
  TYPE rec0_t IS RECORD (a INT, VARCHAR(10));
  TYPE cur0_t IS REF CURSOR RETURN rec0_t;

Example 1b:
  TYPE rec0_t IS RECORD (a t1.a%TYPE, b t1.b%TYPE);
  TYPE cur0_t IS REF CURSOR RETURN rec0_t;

Example 1c:
  TYPE rec0_t IS RECORD (a INT, VARCHAR(10));
  r0 rec0_t;
  TYPE cur0_t IS REF CURSOR RETURN r0%TYPE;

Example 1d:
  TYPE rec0_t IS RECORD (a t1.a%TYPE, b t1.b%TYPE);
  r0 rec0_t;
  TYPE cur0_t IS REF CURSOR RETURN r0%TYPE;

Example2a:
  TYPE cur0_t IS REF CURSOR RETURN t1%ROWTYPE; -- t1 is a table

Example 2b:
  r0 t1%ROWTYPE;
  TYPE cur0_t IS REF CURSOR RETURN r0%TYPE;

Example3a:
  CURSOR cursor_sample IS SELECT a,b FROM t1;
  TYPE cur0_t IS REF CURSOR RETURN cursor_sample%ROWTYPE;

Example3b:
  CURSOR cursor_sample IS SELECT a,b FROM t1;
  r0 cursor_sample%ROWTYPE;
  TYPE cur0_t IS REF CURSOR RETURN r0%TYPE;

If a cursor variable is declared with a RETURN clause then:
1. At OPEN type the data type of the SELECT list row is compared
  for compatibility with the cursor RETURN data type.
  The SELECT list row must be assignable to the RETURN type row.
  If case if assignability is not meet, an error is raised
  Assignability means:
  - The arity of the SELECT list must be equal to the arity
    of the RETURN clause
  - Every n-th field of the SELECT list must be assignable to the
    n-th field of the RETURN Clause

2. At FETCH time, the data is fetched in two steps:
  a. On the first step the data is fetched into a virtual table
    with the row type described in the RETURN clause
  b. On the second step the data is copied from the virtual table
    to the target fetch list. Data type conversion can happen
    on this step.

Change details:

Adding new methods:
- sp_cursor::check_assignability_to
- Virtual_tmp_table::check_assignability_from
- Virtual_tmp_table::sp_set_from_select_list
- Virtual_tmp_table::sp_save_in_vtable
- Virtual_tmp_table::sp_save_in_target_list
- LEX::check_ref_cursor_components
- LEX::make_sp_instr_copy_struct_for_last_context_variables
- LEX::declare_type_ref_cursor
- sp_cursor::Select_fetch_into_spvars::send_data_with_return_type

Adding new members:
- sp_instr_copen_by_ref::m_cursor_name
- Select_fetch_into_spvars::m_return_type
- Select_materialize::m_cursor_name
- Select_materialize::m_return_type

Adding new virtual methods:
- Item::resolve_spvar_cursor_rowtype
- Type_handler::Spvar_definition_resolve_type_refs
- Server_side_cursor::check_assignability_to
- Overriding Select_materialize::prepare to raise an error when the cursor
  returned data type is not compatible with the RETURN clause

Making these methods virtual:
- Field::check_assignability_from

Adding new classes:
- sp_type_def_ref
- RowTypeBuffer

Adding new constructors to:
- Spvar_definition

Adding new helper methods (e.g. to reuse the code)
- Field::store_field_maybe_null
- ChanBuffer::append_ulonglong
- sp_pcontext::set_type_for_last_context_variables

Minor changes:
- Making TABLE::export_structure const
- Overriding Item_splocal::type_extra_attributes. It was forgotten in earlier changes.

Adding new error messages
- ER_CANNOT_CAST_ON_IDENT1_ASSIGNMENT_FOR_OPERATION
- ER_CANNOT_CAST_ON_IDENT2_ASSIGNMENT_FOR_OPERATION
Sergei Golubchik
MDEV-39279 ASAN error on malformed WKB

Discovered by Riley Scott Jacob
Sergei Golubchik
enable connect odbc/jdbc tests that were never run for years

* enable connect.jdbc
* enable connect.odbc_sqlite3 test and fix it to pass
* disable connect.odbc_sqlite3_grant - too broken and obsolete
Sergei Golubchik
MDEV-38892 not all SRCDEF sprintfs were removed

fix as in 2925d0f2ee98

Discovered by: Aakash Adhikari
Michal Schorm
MDEV-14373: Reject incompatible PLUGIN_xxx build mode at configure time

When a user sets -DPLUGIN_PARTITION=DYNAMIC or
-DPLUGIN_PERFSCHEMA=DYNAMIC, these plugins are declared
STATIC_ONLY in their CMakeLists.txt. Previously, the
MYSQL_ADD_PLUGIN macro would silently skip building such
plugins: the STATIC branch wouldn't match (because the user
requested DYNAMIC), and the DYNAMIC branch would be blocked
by ARG_STATIC_ONLY. The plugin was simply not built.

This caused confusing downstream compile errors in other
plugins that depended on the missing one:

  - PLUGIN_PARTITION=DYNAMIC -> CONNECT fails:
    'struct TABLE_SHARE' has no member named
    'partition_info_str_len'
    'struct TABLE' has no member named 'part_info'

  - PLUGIN_PERFSCHEMA=DYNAMIC -> MariaBackup fails:
    'MY_WME' was not declared in this scope
    'my_read' was not declared in this scope
    'MY_FILE_ERROR' was not declared in this scope

  - PLUGIN_ARIA=DYNAMIC -> Spider fails:
    'MARIA_COLUMNDEF' has not been declared
    (Note: Aria is now MANDATORY and already overrides
    user input; this was likely reproducible in older
    versions where Aria was DEFAULT)

Root cause: The MYSQL_ADD_PLUGIN macro in
cmake/plugin.cmake did not validate that the
user-requested build mode (STATIC or DYNAMIC) was
compatible with the plugin's declared capabilities
(STATIC_ONLY or MODULE_ONLY).

Fix: Add validation immediately after the existing
PLUGIN_xxx value check. If DYNAMIC is requested for a
STATIC_ONLY plugin, or STATIC is requested for a
MODULE_ONLY plugin, emit a FATAL_ERROR with a clear
message telling the user which option to use instead.

Non-MANDATORY plugins with STATIC_ONLY (the new check
catches -DPLUGIN_xxx=DYNAMIC for these):
  - partition (sql/CMakeLists.txt)
  - perfschema (storage/perfschema/CMakeLists.txt)
  - thread_pool_info (sql/CMakeLists.txt)

Conditionally STATIC_ONLY (platform/config-dependent):
  - feedback (only on Windows)

The MANDATORY + STATIC_ONLY plugin sql_sequence is
unaffected: the MANDATORY flag overrides user input to
YES before the new check runs.

MODULE_ONLY plugins (the new check catches
-DPLUGIN_xxx=STATIC for these) include all dynamically-
loaded plugins: federated, spider, rocksdb, mroonga,
oqgraph, example, and ~25 others under plugin/ and
storage/.

The YES and AUTO modes are unaffected since they already
gracefully fall through to whichever mode the plugin
supports.

Co-Authored-By: Claude AI <[email protected]>
Daniel Black
oqgraph: remove openquery.com refs and broken LP links

As requested by Arjen, openquery.com former OQ owner,
the domain is no longer existing and neither is the
launchpad project. There isn't a company that does
support/engineering, so remove those references too.
Sergei Golubchik
MDEV-38806 Non-debug assertion failure in btr_pcur_t::restore_position upon HANDLER operations

amend the fix from MDEV-37832 to include HANDLER
and CHECKSUM/ANALYZE to work as before, even if they aren't "updating"
commands.
Marko Mäkelä
squash! 8f402eb43a0c8b7997b3830016c84e3fc1f8b7ed

log_t::archive_create(): Tolerate a larger than zero-sized file.

log_t::set_recovered_lsn(): Invoke unstash_archive_file() in case there was
a garbage (pre-allocated) file at the end which was not parsed at all.

log_file_is_zero(): Check if a log file starts with NUL bytes
(is a preallocated file).

recv_sys_t::find_checkpoint(): Open the last non-preallocated log file in
read/write mode.

recv_sys_t::archive_map: Make the elements const.
Yuchen Pei
MDEV-38752 [wip][demo] check supertype

done for Type_handler_general_purpose_int only
Alexey Botchkov
MDEV-37262 XMLTYPE: validation.
Brandon Nesterenko
MDEV-38830: SIGSEGV and UBSAN null-pointer-use in TABLE::evaluate_update_default_function on UPDATE

MDEV-38716 fixes were incomplete. It still allowed a table's
default_fields to be left un-restored after an ALTER table finished its
copy_data_between_fields().

This patch actually matches the original conception of MDEV-38716. It
was later changed after finding a test failure in maria.alter, where I
thought the patch broke that test. But actually, maria.alter itself
relies on somewhat broken/inconsistent server behavior.

It is the MDEV-19055 extension of the test which broke. To summarize the
broken part of the test, first, it creates a temporary table t2, adds a
new column of type DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, and adds
a constraint check on that new type:

CREATE TEMPORARY TABLE t2 (a TIME) ENGINE=Aria;
ALTER TABLE t2 ADD b DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE t2 ADD CHECK (b = 4);

The next part results in inconsistent behavior:

INSERT IGNORE INTO t2 () VALUES (),(),(),();

What is not defined is "what should this do"?

Prior to this patch / MDEV-38716, this would create 4 new rows, each
with a zeroed out timestamp for `b`. This is due to a the default_field
not resetting after the ALTER TABLE, thus the DEFAULT CURRENT_TIMESTAMP
clause is lost after the ALTER TABLE ADD CHECK.

With this patch, because the default_field is restored after the ALTER,
there is no affect of the INSERT IGNORE INTO t2. I.e., t2 is empty after
this insert.

This change in results further changes how an ALTER TABLE behaves later
in the test:

SET SQL_MODE= 'STRICT_ALL_TABLES';
SELECT count(a),sum(a) FROM t2;
--error ER_TRUNCATED_WRONG_VALUE
ALTER TABLE t2 CHANGE IF EXISTS d c INT;

Without this patch, there are rows in t2, and so this ALTER TABLE
results in an error. With this patch, t2 is empty, and therefore there
is no data that was truncated to warn about.

Also note, the result of

INSERT IGNORE INTO t2 () VALUES (),(),(),();

is very inconsistent overall. For example, if t2 is a regular table
(rather than a temporary table), the pre-patch result is also NULL.
However, if values are explicitly provided (in any case), the result is
truncated and rows are added to the table. E.g.

INSERT IGNORE INTO t2 (b) VALUES (1),(2),(3),(5);

will result in 4 rows with truncated timestamps in any case.

See also MDEV-30115 for more problems with INSERT IGNORE and CHECK.

Reviewed-by: Monty <[email protected]>
Signed-off-by: Brandon Nesterenko <[email protected]>
PranavKTiwari
MDEV-39184-Rework MDL enum constants values
Yuchen Pei
MDEV-39207 Fix plugin name passed to find_bookmark in test_plugin_options

Should be lowercase, just like in construct_options(). Without this
fix all plugin session vars have test_load always
false (static_unloaded).
Sergei Golubchik
MDEV-39281 CONNECT OEM tables don't check subtype length

copy the coresponding check from OEMColumns()
Alexander Barkov
MDEV-38768 RECORD in routine parameters and function RETURN

- Allowing types declared by the TYPE declarations in the grammar
  for stored routine parameters and stored function RETURN clause.

- Overriding Type_handler_row::Column_definition_prepare_stage1()
  to copy the record structure from get_attr_const_generic_ptr(0)
  into Spvar_definition::m_row_field_definition.
  This makes TYPE..IS RECORD types work as routine parameters and RETURN.

- Raising an error when type==COLUMN_DEFINITION_ROUTINE_PARAM or
  type==COLUMN_DEFINITION_FUNCTION_RETURN is passed to
  Type_handler_assoc_array::Column_definition_set_attributes().
  The underlying assoc array code is not ready to support
  parameters and RETURN. It will be done separately.

- Adding tests

- Some changes has changed the error from ER_NOT_ALLOWED_IN_THIS_CONTEXT
  to ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION. This is ok, as the latter
  is more informative.
Thirunarayanan Balathandayuthapani
MDEV-39081 InnoDB: tried to purge non-delete-marked record, assertion fails in row_purge_del_mark_error

Reason:
=======
Following the changes in MDEV-38734, the server no longer marks
all indexed virtual columns during an UPDATE operation.
Consequently, ha_innobase::update() populates the upd_t vector
with old_vrow but omits the actual data for these virtual columns.

Despite this omission, trx_undo_page_report_modify() continues to
write metadata for indexed virtual columns into the undo log. Because
the actual values are missing from the update vector, the undo log
entry is recorded without the historical data for these columns.

When the purge thread processes the undo log to reconstruct a
previous record state for MVCC, it identifies an indexed virtual
column but finds no associated data.

The purge thread incorrectly interprets this missing data as a NULL
value, rather than a "missing/unrecorded" value. The historical
record is reconstructed with an incorrect NULL for the virtual column.
This causes the purge thread to incorrectly identify and purge
records that are not actually delete-marked, leading to abort
of server.

Solution:
=========
ha_innobase::column_bitmaps_signal(): Revert the column-marking
logic to the state prior to commit a4e4a56720c, ensuring all
indexed virtual columns are unconditionally marked during an UPDATE.

The previous "optimization" attempted to manually detect indexed
column changes before marking virtual columns. The manual check
for indexed column modifications is redundant. InnoDB already
provides the UPD_NODE_NO_ORD_CHANGE flag within row_upd_step().
This flag is being used in trx_undo_page_report_modify() and
trx_undo_read_undo_rec() should log or read virtual column values.

Refactored column_bitmaps_signal() to accept a mark_for_update
parameter that controls when indexed virtual columns are marked.
TABLE::mark_columns_needed_for_update() is the only place that needs
mark_for_update=true because only UPDATE operations need to mark
indexed virtual columns for InnoDB's undo logging mechanism.

INSERT operation is already handled by
TABLE::mark_virtual_columns_for_write(insert_fl=true).
Even the commit a4e4a56720c974b547d4e469a8c54510318bc2c9 changes are
going to affect TABLE::mark_virtual_column_for_write(false) and
It is called during UPDATE operation, and that's when
column_bitmaps_signal() needs to mark  indexed virtual columns.

Online DDL has separate code path which is handled by
row_log_mark_virtual_cols() for all DML operations
sjaakola
MDEV-38243 Write binlog row events for changes done by cascading FK operations

Added two mtr tests for testing rpl_use_binlog_events_for_fk_cascade feature
rpl.rpl_fk_cascade_binlog_row and rpl.rpl_fk_set_null_binlog_row
sjaakola
MDEV-38243 Write binlog row events for changes done by cascading FK operations

This commit implements a feature which changes the handling of cascading foreign
key operations to write the changes of cascading operations into binlog.
The applying of such transaction, in the slave node, will apply just the binlog
events, and does not execute the actual foreign key cascade operation.
This will simplify the slave side replication applying and make it more predictable
in terms of potential interference with other parallel applying happning
in the node.

This feature can be turned ON/OFF by new variable:
rpl_use_binlog_events_for_fk_cascade, with default value OFF

The actual implementation is largely by windsurf.
Thirunarayanan Balathandayuthapani
MDEV-37294  segv in flst::remove_complete(buf_block_t*, unsigned short, unsigned char*, mtr_t*)

Problem:
=======
During system tablespace defragmentation, extent movement occurs
in two phases: prepare and complete.
1) prepare phase validates involved pages and acquires necessary
resources.
2) complete phase performs the actual data copy.

Prepare phase fails to check whether allocating a page will
make the extent FULL. When an extent has exactly (extent_size - 1)
pages used, the prepare phase returns early without latching
the prev/next extent descriptors needed for list manipulation.

Complete phase then allocates the final page, making the
extent full, and attempts to move it from
FSEG_NOT_FULL/FSP_FREE_FRAG to FSEG_FULL/FSP_FULL_FRAG list.
This fails with an assertion because the required blocks were
never latched, causing a crash in flst::remove_complete().

Solution:
========
alloc_from_fseg_prepare(), alloc_from_free_frag_prepare():
call these function only if the extent will be full after
allocation. This makes the
prepare phase to acquire the necessary pages for FSP list manipulation

find_new_extents(): Print more revised information about moving
of extent data and destination extent also.

defragment_level(): Move get_child_pages(new_block) before committing
changes to enable proper rollback on failure. Well, this failure
is theoretically impossible (new block is exact copy of
validated old block).