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
Alessandro Vetere
Revert "MDEV-38814 Skip root in opposite-intention check"

This reverts commit b3a258485a9b87a9c40cdd39f5ef92ead40e4d31.
Aleksey Midenkov
MDEV-38710 Assertion is_lock_owner on error returning from auto-create in mysql_admin_table

Followup commit for 4802bfe4f90.

After returning error from check_vers_constants() the stack
immediately returns error status up to mysql_admin_table() where it
does close_thread_tables(). The latter expects MDL acquired.

The bug discloses the generic problem of fallback mechanism throwing
an error when the upper frame does close_thread_tables().
Thirunarayanan Balathandayuthapani
MDEV-39261 MariaDB crash on startup in presence of indexed virtual columns

Problem:
========
A single InnoDB purge worker thread can process undo logs from different
tables within the same batch. But get_purge_table(), open_purge_table()
incorrectly assumes that a 1:1 relationship between a purge worker thread
and a table within a single batch. Based on this wrong assumtion,
InnoDB attempts to reuse TABLE objects cached in thd->open_tables for
virtual column computation.

1) Purge worker opens Table A and caches the TABLE pointer in thd->open_tables.
2) Same purge worker moves to Table B in the same batch, get_purge_table()
retrieves the cached pointer for Table A instead of opening Table B.
3) Because innobase::open() is ignored for Table B, the virtual column
template is never initialized.
4) virtual column computation for Table B aborts the server

Solution:
========
get_purge_table(): Accept the specific db_name and table_name
associated with the current undo log record. Compare the db_name
and table_name against the existing cached TABLE objects.
If it is match then return the cached table object.
Aleksey Midenkov
MDEV-28619 Server crash and UBSAN null-pointer-use in Window_funcs_sort::setup

Optimization in st_select_lex_unit::prepare() removes ORDER BY for
certain subqueries. That excludes ORDER BY items from being fixed, but
sl->window_funcs still contains window function items and those
related to optimized out ORDER BY are unfixed. The error about missing
window spec is thrown when the item is fixed. Hence we get redundant
processing of window function items without checking window spec
existence.

The fix removes the related window function items when ORDER BY is
optimized out. ORDER accumulates window_funcs at parser stage which
are then removed from SELECT_LEX::window_funcs. The fix also updates
similar optimization in mysql_make_view().
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
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.

The commit has also  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
Marko Mäkelä
MDEV-16926 fixup: GCC 16 -Wmaybe-uninitialized

Year::year_precision(): Make static, so that VYear::VYear
and VYear_op::VYear_op() will avoid invoking this function with
an unnecessary "this" pointer to an uninitialized object.
Alessandro Vetere
MDEV-38814 Skip root in opposite-intention check

btr_cur_need_opposite_intention() checks whether a structural change at
a page (e.g., a page split inserting a node pointer into the parent,
a merge with a sibling removing one, or a boundary change updating
one) could cascade into its parent.  Handling such a structural
change would also require latching sibling pages at that level, which
cannot be safely acquired under SX without risking deadlock with
concurrent readers; hence the index lock must be upgraded from SX to X.
The root has no parent and no siblings, so such cascades are impossible
and no sibling latches are needed; return false early, avoiding
unnecessary upgrades.

A root page split (btr_root_raise_and_insert()) is a special case that
changes the tree height, but it never cascades upward into a parent.

Add a debug assertion in btr_cur_search_to_nth_level() that freshly
acquiring the root page is only permitted under X-lock or when no page
latch is held (brand-new descent).  Under SX with existing page latches,
the root must already be latched in the mtr, retained from the original
search_leaf() descent.

Add debug-only counters (Innodb_btr_need_opposite_intention_root and
Innodb_btr_index_lock_upgrades) to track how often the root early return
is taken and how often SX-to-X upgrades occur, exposed via SHOW GLOBAL
STATUS in debug builds.

Add a test that inserts and updates 1000 rows in a 4K-page table,
verifying that the root early return fires and that index lock upgrades
are reduced.
Alessandro Vetere
MDEV-38814 Enforce reorganization limit

Issue:
In btr_cur_optimistic_update(), DB_OVERFLOW error condition is returned
if the BTR_CUR_PAGE_REORGANIZE_LIMIT is not met, to prevent CPU trashing
due to excessive reorganization attempts in an almost full page.
In btr_cur_pessimistic_update() though, many of these errors were not
properly followed by a page split attempt, and therefore many
pessimistic fallbacks occur for the same page, which has less
than the BTR_CUR_PAGE_REORGANIZE_LIMIT free space.

Fix:
In btr_cur_pessimistic_update(), if the optimistic update error
is DB_OVERFLOW, the page is uncompressed and the
BTR_CUR_PAGE_REORGANIZE_LIMIT is not met, avoid attempting
btr_cur_insert_if_possible() and fallthrough to attempt a page split.

In the index_lock_upgrade.result file, the counters are updated
accordingly: one extra page split is recorded, and both the numbers of
reorganization attempts and index lock upgrades is reduced.
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.

The commit has also  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
Dave Gosselin
MDEV-39209: use iterative cleanup for merged units to avoid stack overflow

Query optimization can merge derived tables (VIEWs being a type of derived
table) into outer queries, leaving behind stranded  st_select_lex_unit objects
("stranded units") for post-query cleanup.

Previously, these were cleaned up recursively. For queries with many merged
derived tables, the deep recursion over the list of stranded units could
exhaust the stack. This change replaces the recursive cleanup with an
iterative loop to prevent stack overflows.
Sergei Golubchik
MDEV-39289 CONNECT REST support on Windows doesn't escape the url

let's use _spawnlp that doesn't need args to be escaped

Reported by Pavel Kohout, Aisle Research
Sergei Golubchik
MDEV-39281 CONNECT OEM tables don't check subtype length

copy the coresponding check from OEMColumns()

Reported by Aisle Research
Mohammad Tafzeel Shams
MDEV-22186: Add innodb_buffer_pool_in_core_dump to exclude InnoDB buffer pool from cores

Problem:
There is no control to include or exclude large InnoDB buffer pool from
core files, which can lead to unnecessarily large core dumps or prevent
capturing useful memory state.

Solution:
Introduce a new global dynamic system variable innodb_buffer_pool_in_core_dump
that allows excluding InnoDB buffer pool from core dumps using MADV_DONTDUMP
where supported. When enabled the server marks relevant memory regions to be
omitted from core files. The madvise state is dynamically updated when the
variable changes.

This variable is only available on Linux & FreeBSD.

Additionally, a test helper script is introduced to inspect
/proc/<pid>/smaps and verify whether large memory regions are marked
for trimming.

- innodb_buffer_pool_in_core_dump
  Global boolean system variable controlling whether InnoDB buffer
  pool should be excluded from core dumps.
  Default: OFF on non-debug builds with MADV_DONTDUMP support,
  ON otherwise.

- innodb_buffer_pool_in_core_dump_update()
  Update hook that sets innodb_buffer_pool_in_core_dump and triggers runtime
  updates of madvise state for the buffer pool.

- buf_pool_t::in_core_dump
  Variable backing @@innodb_buffer_pool_in_core_dump.

- buf_pool_t::core_advise()
  Advises MADV_DONTDUMP or MADV_DODUMP according to latest
  innodb_buffer_pool_in_core_dump value.

- buf_pool_t::create()
  Updates madvise flag to the buffer pool memory based on
  innodb_buffer_pool_in_core_dump.
  Also moves the mutex initialization at the beginiing of function.

- buf_pool_t::resize()
  Updates the madvise flag for buffer pool to keep it in sync with
  the innodb_buffer_pool_in_core_dump.

- check_core_dump_trim.inc
  Test helper that inspects /proc/<pid>/smaps to detect memory regions
  with the dd VmFlag and determine whether the core file is expected
  to be trimmed based on buffer pool and log buffer sizes.
Sergei Golubchik
MDEV-39289 CONNECT REST support on Windows doesn't escape the url

let's use _spawnlp that doesn't need args to be escaped

Reported by Aisle Research
Alessandro Vetere
MDEV-38814 Avoid underflow-after-split in update

Issue:
In btr_cur_optimistic_update(), freshly split pages are subject
to DB_UNDERFLOW due to the new size (after delete+insert) being
less than BTR_CUR_PAGE_COMPRESS_LIMIT(index) target, even if the record
itself is growing.

Fix:
In btr_cur_optimistic_update(), avoid this behavior by gating the
DB_UNDERFLOW error condition behind record shrinkage check.

Nothing is changed if the record is not shrinking.

The counters in the index_lock_upgrade.result file are updated
accordingly.
The new count of DB_UNDERFLOW optimistic update errors during the test
is reduced to 0.
The index lock upgrades are reduced accordingly.
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.

The commit has also  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
Abhishek Bansal
MDEV-38264: Fix failed assertion in json_find_path with trailing commas

The function json_skip_array_and_count() was trapping syntax errors
(e.g., trailing commas) in a local engine copy. Because the error state
wasn't propagated back to the main engine, json_find_path() would
proceed with an inconsistent state, eventually triggering an assertion
failure.

This patch ensures that any error encountered during the lookahead
scan is propagated to the primary engine. This allows the parser to
fail gracefully with a syntax error instead of crashing.
Sergei Golubchik
MDEV-39281 CONNECT OEM tables don't check subtype length

copy the coresponding check from OEMColumns()

Reported by Pavel Kohout, Aisle Research
Sergei Golubchik
MDEV-39288 SHOW CREATE ROUTINE does not apply to roles
Alessandro Vetere
MDEV-38814 Monitor pessimistic update fallbacks

Add 4 debug-only counters:

1. Innodb_btr_cur_n_index_lock_upgrades
2. Innodb_btr_cur_pessimistic_update_calls
3. Innodb_btr_cur_pessimistic_update_optim_err_underflows
4. Innodb_btr_cur_pessimistic_update_optim_err_overflows

to track pessimistic update fallbacks and monitor how often the
exclusive index lock is acquired, exposed via SHOW GLOBAL
STATUS in debug builds.

Add a test that inserts and updates 1000 rows in a 4K-page table,
verifying the current status of the counters.
Marko Mäkelä
Merge 10.11 into 11.4
Daniel Black
MDEV-39015 Debian - columnstore boost deps 1.88+

Columnstore 23.10, the version in MariaDB-server-11.4+
is strictly dependant on a 1.88+ boost version.

As such remove the libboost-[^d]* dependencies of
columnstore until such Debian/Ubuntu version support this.

libboost-dev is still needed for oqgraph

These version are:
* forky/sid
* questing/resolute

The debian/control always contains the version that
would compile on debian/sid. The debian/autobake-deb.sh
adjusts the control file on earlier distros to
remove the dependencies.
ShenLin
MDEV-39041: Execute permissions required to make dh_link execute this to expand $DEB_HOST_MULTIARCH
Aleksey Midenkov
MDEV-38798 Assertion `mdl_key->length() == 3' failed in MDL_map::find_or_insert

Originally two MDL_EXCLUSIVE are used for pure alias of derived table
and its schema which is empty db name. It is concurrency performance
overhead and there is no obvious reason why such MDL should exist.

MDEV-33985 changed pure alias check from `db.str` to `db.length` and
that allowed `empty_c_string` to be pure alias too. It is important
for MDEV-33985 fix with sequences. Now such kind of pure alias skips
MDL initialization and thus derived table fails falsely on BACKUP
namespace as it is default namespace for 0-filled structure (see TODO
comments).

The fix a) keeps MDL_NOT_INITIALIZED for uninitialized MDL and that
was the consequence of MDL_INTENTION_EXCLUSIVE value 0 (see TODO
comment).

And b) does not update MDL type for pure alias when view is
initialized, so it is MDL_NOT_INITIALIZED. `lock_table_names()` code
naturally skips such kind of MDL with (mdl_request.type <
MDL_SHARED_UPGRADABLE) condition when processing tables list.
Michal Schorm
MDEV-18359, MDEV-26905: Fix invalid XML in charsets Index.xml

Summary:
The charset definition files sql/share/charsets/Index.xml and
mysql-test/std_data/ldml/Index.xml contained duplicate "flag" attributes
on single <collation> elements, violating XML well-formedness rules.
Standard XML parsers (xmllint, libxml2, etc.) reject duplicate attributes,
making these files unparseable by any spec-compliant tool.

Root Cause:
When nopad_bin collations were added, their flags were specified as
XML attributes: flag="binary" flag="nopad". The XML specification
(Section 3.1, Well-Formedness Constraint: Unique Att Spec) prohibits
duplicate attribute names on a single element. MariaDB's custom XML
parser in strings/xml.c happened to process both duplicates because
it handles attributes sequentially in a while loop, but this is
non-standard behavior that breaks interoperability with standard
XML tooling.

What the patch does:
Converts all 24 occurrences of duplicate flag attributes from
self-closing elements with duplicate attributes to elements with
child <flag> nodes. This follows the existing pattern already used
by many collations in the same file (e.g., big5_chinese_ci,
latin1_swedish_ci, utf8mb3_general_ci).

Before (invalid XML):
  <collation name="latin2_nopad_bin" id="1101" flag="binary" flag="nopad"/>

After (valid XML):
  <collation name="latin2_nopad_bin" id="1101">
    <flag>binary</flag>
    <flag>nopad</flag>
  </collation>

No C code changes are required. The _CS_FLAG handler in
strings/ctype.c (around line 621) already processes <flag> child
elements using bitwise OR (|=) to accumulate flags, so both "binary"
(MY_CS_BINSORT) and "nopad" (MY_CS_NOPAD) flags are correctly applied.

Files modified:
- sql/share/charsets/Index.xml (23 collations fixed)
- mysql-test/std_data/ldml/Index.xml (1 collation fixed)

Complete list of 24 collations fixed:

sql/share/charsets/Index.xml:
1. latin2_nopad_bin    (id=1101)
2. dec8_nopad_bin      (id=1093)
3. cp850_nopad_bin      (id=1104)
4. hp8_nopad_bin        (id=1096)
5. koi8r_nopad_bin      (id=1098)
6. swe7_nopad_bin      (id=1106)
7. ascii_nopad_bin      (id=1089)
8. cp1251_nopad_bin    (id=1074)
9. hebrew_nopad_bin    (id=1095)
10. latin7_nopad_bin    (id=1103)
11. koi8u_nopad_bin      (id=1099)
12. greek_nopad_bin      (id=1094)
13. cp1250_nopad_bin    (id=1090)
14. cp1257_nopad_bin    (id=1082)
15. latin5_nopad_bin    (id=1102)
16. armscii8_nopad_bin  (id=1088)
17. cp866_nopad_bin      (id=1092)
18. keybcs2_nopad_bin    (id=1097)
19. macce_nopad_bin      (id=1067)
20. macroman_nopad_bin  (id=1077)
21. cp852_nopad_bin      (id=1105)
22. cp1256_nopad_bin    (id=1091)
23. geostd8_nopad_bin    (id=1117)

mysql-test/std_data/ldml/Index.xml:
24. ascii2_nopad_bin    (id=325)

Validation:
- xmllint --noout passes cleanly on both files after the fix
- Zero duplicate flag attributes remain (verified with grep)
- The fix is consistent with the existing pattern used by other
  collations in the same files

Co-Authored-By: Claude AI <[email protected]>
Alessandro Vetere
MDEV-38814 Skip root in opposite-intention check

btr_cur_need_opposite_intention() checks whether a structural change at
a page (e.g., a page split inserting a node pointer into the parent,
a merge with a sibling removing one, or a boundary change updating
one) could cascade into its parent.  Handling such a structural
change would also require latching sibling pages at that level, which
cannot be safely acquired under SX without risking deadlock with
concurrent readers; hence the index lock must be upgraded from SX to X.
The root has no parent and no siblings, so such cascades are impossible
and no sibling latches are needed; return false early, avoiding
unnecessary upgrades.

A root page split (btr_root_raise_and_insert()) is a special case that
changes the tree height, but it never cascades upward into a parent.

Add a debug assertion in btr_cur_search_to_nth_level() that freshly
acquiring the root page is only permitted under X-lock or when no page
latch is held (brand-new descent).  Under SX with existing page latches,
the root must already be latched in the mtr, retained from the original
search_leaf() descent.

Add debug-only counters (Innodb_btr_need_opposite_intention_root and
Innodb_btr_index_lock_upgrades) to track how often the root early return
is taken and how often SX-to-X upgrades occur, exposed via SHOW GLOBAL
STATUS in debug builds.

Add a test that inserts and updates 1000 rows in a 4K-page table,
verifying that the root early return fires and that index lock upgrades
are reduced.
Daniel Black
MDEV-39015 Debian - remove libboost-date-time-dev dependency

In Debian Bullseye + Ubuntu 22.04 the libboost-date-time
library (1.74 boost version) has been a dummy stub.

The header files for boost-date-time are in the libboost-dev
package.
Raghunandan Bhat
MDEV-38562: `mariabackup` exits with success (0) despite "No space left on device" errors

Problem:
  `mariabackup` ignores `my_close()` failures, resulting in false
  success report with a 'completed OK!' message.

Fix:
  Update `local_close()` function in `mariabackup` to check `my_close()`
  failures and enusre errors are reported.
Fariha Shaikh
MDEV-39028 DROP PARTITION, CONVERT OUT require both ALTER and DROP privileges

ALTER TABLE ... DROP PARTITION requires both ALTER and DROP privileges,
which is inconsistent with TRUNCATE PARTITION that only requires DROP.
This prevents fine-grained privilege separation since users who need to
drop partitions must also be granted ALTER, allowing them to perform
any other DDL changes on the table.

Change DROP PARTITION to require only DROP privilege, consistent with
TRUNCATE PARTITION. Users allowed to drop the table should also be
allowed to drop partitions without needing ALTER rights.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Fariha Shaikh
MDEV-34713 Backup and restore mariadb_upgrade_info file

The mariadb_upgrade_info file was not being backed up during
mariadb-backup --backup, causing MariaDB to incorrectly prompt for
upgrade after restore.

Add mariadb_upgrade_info to the list of files backed up from the datadir
during backup operations, ensuring the upgrade state is preserved across
backup and restore cycles.

All new code of the whole pull request, including one or several files
that are that are either new files or modified ones, are contributed
under the BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
drrtuy
Initial version of DuckDB engine for MariaDB based on DuckDB 1.3.2.
Marko Mäkelä
Merge 10.6 into 10.11
forkfun
MDEV-36183 mariadb-dump backup corrupt if stored procedure ends with comment

When a stored procedure, trigger, or event ends with a line comment (#comment
or --comment), mariadb-dump would append the custom delimiter (;;) on the same line.
This caused the comment to "comment out" the delimiter, leading to syntax errors
during restoration.

Fixed by ensuring a newline is inserted before the delimiter in the dump output.
Raghunandan Bhat
MDEV-39721: SIGSEGV in `check_word`|(`extract_date_time`|`extract_oracle_date_time`)

Problem:
  Date and time functions - `STR_TO_DATE` and `TO_DATE` (in Oracle mode)
  both use `check_word` to check if a string token matches a valid
  locale-specific day or month name. Server crashed because of an
  un-initialized typelib member(`type_lengths`) for date locales which
  are not present in `Oracle_date_locale` (e.g: `ar_DZ`).

Fix:
  Initialize `type_lengths` for all supported locales by iterating over
  `my_locales` array instead of `Oracle_date_locale` during server
  startup.
Raghunandan Bhat
MDEV-39721: SIGSEGV in `check_word`|(`extract_date_time`|`extract_oracle_date_time`)

Problem:
  Server crashes in `check_word` because of an un-initialized typelib
  member for locales not present in `Oracle_date_local`.

Fix:
  Initialize `type_lengths` for all supported locales by iterating over
  `my_locales` array instead of `Oracle_date_locale` during server
  startup.
Jan Lindström
MDEV-38917 : Galera test failure on galera.galera_sst_mysqldump

This regression is caused by commit c380e165973 (MDEV-38833 "Suboptimal
or dead code at server startup"). Problem is that there should never
be an expectation that InnoDB bootstrap is crash-safe. Therefore,
after wsrep has initialized wsrep schema force checkpoint. This
ensured that InnoDB has successfully bootstrapped and wsrep chema
is initialized. This checkpoint ensures that wsrep-recover
is successful.

Other changes:
* Splitted galera_sst_mysqldump to two parts wsrep_sst_mysqldump
  and wsrep_sst_mysqldump_debug that is run only on debug builds.
* Changed wserp_schema initialization not to use std::string
  because it is unnecessary.
* Force checkpoint after wsrep_schema has been created.
* Make test wsrep_sst_mysqldump_with_key smaller
* Stabilize test cases
Abhishek Bansal
MDEV-38474: ASAN heap-use-after-free in st_select_lex_unit::cleanup

cleanup_stranded_units() was added at the start of
st_select_lex_unit::cleanup() by 34a8209d6657. This causes a
use-after-free when nested subqueries are merged into their parent
unit. With nested subqueries like:

  SELECT * FROM t1
  WHERE a IN (SELECT b FROM t2
              WHERE a IN (SELECT c FROM t3 WHERE FALSE HAVING c < 0));

the stranded_clean_list chains the units as: Unit1 -> Unit2 -> Unit3.
Because cleanup_stranded_units() was called first, Unit1->cleanup()
would recursively trigger Unit2->cleanup(), which in turn would
trigger Unit3->cleanup(). Unit3's cleanup frees its heap-allocated
join structures. But since Unit3 was merged into Unit2, Unit2 still
holds references to Unit3's structures (e.g., st_join_table). When
control returns to Unit2 for its own local cleanup, it accesses
already-freed memory.

Fix: move cleanup_stranded_units() to the end of cleanup(). This way,
each unit completes its own local cleanup first—clearing its
references to any child structures—before triggering cleanup of its
stranded (child) units. This enforces a parent-first cleanup order.
forkfun
MDEV-32770 mariadb-dump produces not loadable dump due to temporary view structure

When mariadb-dump produces a dump, it first creates a temporary placeholder for views
to satisfy potential dependencies before their actual creation later in the dump file.
Previously, these views were populated with int literals for their columns (1 AS `col_name`).
This could cause syntax or type-resolution errors during restoration if another view depended
on this placeholder view.

This commit changes the placeholder column values from 1 to NULL, as it is more permissive
and allowing the dump to be restored successfully.
Aleksey Midenkov
Compilation: writing to an object of type ‘ORDER’

/home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc: In function ‘ORDER* concat_order_lists(MEM_ROOT*, ORDER*, ORDER*)’:
/home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc:2976:13: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘ORDER’ {aka ‘struct st_order’} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
2976 |      memcpy(copy, cur, sizeof(ORDER));
      |      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/buildbot/amd64-last-N-failed/build/sql/field.h:29,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_class.h:32,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_acl.h:21,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_parse.h:19,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc:18:
/home/buildbot/amd64-last-N-failed/build/sql/table.h:236:16: note: ‘ORDER’ {aka ‘struct st_order’} declared here
  236 | typedef struct st_order {
      |                ^~~~~~~~
/home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc: In member function ‘bool Window_funcs_sort::setup(THD*, SQL_SELECT*, List_iterator<Item_window_func>&, JOIN_TAB*)’:
/home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc:3151:11: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘ORDER’ {aka ‘struct st_order’} with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
3151 |    memset(order, 0, sizeof(*order));
      |    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/buildbot/amd64-last-N-failed/build/sql/field.h:29,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_class.h:32,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_acl.h:21,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_parse.h:19,
                from /home/buildbot/amd64-last-N-failed/build/sql/sql_window.cc:18:
/home/buildbot/amd64-last-N-failed/build/sql/table.h:236:16: note: ‘ORDER’ {aka ‘struct st_order’} declared here
  236 | typedef struct st_order {
      |                ^~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [sql/CMakeFiles/sql.dir/build.make:2640: sql/CMakeFiles/sql.dir/sql_window.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:10639: sql/CMakeFiles/sql.dir/all] Error 2
make: *** [Makefile:166: all] Error 2