Commit graph

202,137 commits

Author SHA1 Message Date
Sergei Golubchik
b930eef317 MDEV-37326 Assertion failure upon update on versioned partitioned table with long unique under READ COMMITTED
if ha_partition::position() is asked for a position of a closed partition,
don't ask the underlying engine, just set the partition number.

in fact, the partition is open and can be perfectly used, the assert
is over-zealous. but in the future it might be actually closed.
2026-01-26 10:01:31 +01:00
Sergei Golubchik
387fe5ecc3 MDEV-36787 Error 153: No savepoint with that name upon ROLLBACK TO SAVEPOINT, assertion failure
1. InnoDB should return HA_ERR_ROLLBACK if it aborts a transaction internally
2. the server should recognize it and perform an automatic rollback
2026-01-26 10:01:31 +01:00
Sergei Golubchik
d08fd6343e MDEV-38506 fix the test
followup for 11f228cbb2
2026-01-26 10:01:31 +01:00
Daniel Black
5688678ff4 MDEV-37615: Clang based static analysis false postive reports on UNINIT_VAR
Clang upstream bug https://github.com/llvm/llvm-project/issues/173210
shows that a "int x=x" construct will in the intermediate representation
have code to read from x. With this generated sanitizer=undefined and
static analyzers will all see the uninitialized read and write.

Because clang has a stronger implementation of following paths to
uninitialized variables, "#define UNINIT_VAR(x) x" is the which
is what our release binaries use is the ideal path for this compiler.

Clang based compilers with error during compilation if any
uninitialized behaviour is detected at compile time because of
0c80ddb519.

Corrects MDEV-36542 - 6fd57f478f.
2026-01-25 12:59:56 +11:00
Sergey Vojtovich
4b81180589 MDEV-38076 - main.mdev375 fails sporadically
Test was affected by incompletely closed preceding connections.

Wait for preceding connections to decrement Threads_connected
before testing ER_CON_COUNT_ERROR condition.
2026-01-23 23:36:56 +04:00
Sergey Vojtovich
b5dbf22657 MDEV-38471 - funcs_1.processlist_val_no_prot fails sporadically
Test output was affected by incompletely closed preceding connections.

Wait for connections to leave I_S.PROCESSLIST before issuing
SHOW PROCESSLIST.

Also fixes similar failures in funcs_1.processlist_val_ps.
2026-01-23 20:49:53 +04:00
Aleksey Midenkov
b68f878fdc MDEV-36876 Crash during the Item_subselect::init - outer_select is NULL
Comparison between vector and scalar is invalid (ER_OPERAND_COLUMNS)
and handled by the parser. The problem is outer_context is missing
because relink_hack() cannot recover it due to
!builtin_select.first_inner_unit() condition. This condition was set
by previous relink hack called for previous expression some(select 1).

Since there can be arbitrary number of such expressions there seems to
be no point in such a limitation. MTR test do not fail without that
condition, so the fix proposes to remove it.
2026-01-23 14:48:57 +03:00
Aleksey Midenkov
6fcd87ba4d MDEV-33985 Server crashes at Item_func_nextval::val_int
Pure aliases are not handled properly by Item_func_nextval::val_int().

add_table_to_list() does not create MDL request for pure aliases,
i.e. when there is no table_list->db set or TL_OPTION_ALIAS was
set. When the expression is not inside CTE the case with empty db is
handled by:

  else if (!lex->with_cte_resolution && lex->copy_db_to(&db))
    DBUG_RETURN(0);

So, table_list gets current database name and the query is failed with
ER_NO_SUCH_TABLE error.

The fix adds the case of is_pure_alias() for
Item_func_nextval::val_int() and fails it with ER_NOT_SEQUENCE2 error.

Note: semantics for TL_OPTION_ALIAS cannot be based on empty db, only
parser can set TL_OPTION_ALIAS as resolve_references_to_cte() relies
on TL_OPTION_ALIAS after copy_db_to().
2026-01-23 14:48:24 +03:00
Aleksey Midenkov
5597f877fe MDEV-33289 INTERVAL partitioning by system time does not work close to the end of timestamp range
1. Fix empty part_elem->id in prep_alter_part_table().

   On auto-create newly added partition has id 0. It came from
   set_up_default_partitions() for new part_info
   (thd->work_part_info). vers_update_el_ids() can work only with
   unassigned ids (UINT_MAX32), so we assign it explicitly on pushing
   into tab_part_info.

2. If range value is out of TIMESTAMP_MAX_VALUE set it to
   TIMESTAMP_MAX_VALUE, but only if the history partition is the last
   one, otherwise push ER_DATA_OUT_OF_RANGE. Error is to create
   multiple out-of-range partitions (e.g. with PARTITIONS clause in
   CREATE TABLE).
2026-01-23 14:42:25 +03:00
Aleksey Midenkov
3b07a44a23 MDEV-32724 Segmentation fault due to Deep Recursion in table.cc and sql_lex.cc
Recursive CTE wrongly detected anchor because inner non-recursive CTE
wrongly assigned with-element table to itself due to inner-outer name
clash.
2026-01-23 14:40:42 +03:00
Aleksey Midenkov
7a88776dc1 MDEV-28650 Server crashes in Item_func_nextval::val_int after select from view
default_used was missing as view is parsed on its own
lex. extend_table_list() decides maybe_need_prelocking based on
default_used and prelocking_strategy->handle_table() was skipped for
view, so internal_tables was not updated (they could be stale from
previous statement).
2026-01-23 14:25:06 +03:00
Rex Johnston
b061b5ab1f MDEV-31632 Unresolvable outer reference causes null pointer exception
SELECT 1 union select 2 UNION SELECT 1 from a JOIN a b ON
  (SELECT 1 FROM dual WHERE AAA)

Crashes during fix_outer_field while resolving field item AAA

In our resolver, once we have determined that a field item isn't
local to our select, we call Item::fix_outer_field(), which
iterates outwards towards the top level select, looking for where
our Item_field might be resolvable.

In our example here, the item isn't resolvable and we expose
fragility in the loop, which i will detail here.

After we initialize the variable 'outer_context' (to a context
containing /* select#3 */ select 1 AS `1` from (a join a b on
((subquery#4))) ) we enter a loop

│     5927   for (;
│     5928        outer_context;
│     5929        outer_context= outer_context->outer_context)
│     5930   {
│     5931     select= outer_context->select_lex;
│     5932     Item_subselect *prev_subselect_item=
│     5933       last_checked_context->select_lex->master_unit()->item;
│     5934     last_checked_context= outer_context;

here 'last_checked_context' is the context inner to the current
'outer_context', and we initialize prev_subselect_item to the
Item enclosing the unit containing this inner select.

So for the first iteration of the loop,
  select: select #3
  last_checked_context: from select #4 to select #3.
  prev_subselect_item: item enclosing select #4 (where
    field item AAA is defined)

The rest of the loop calls find_field_in_tables() /
resolve_ref_in_select_and_group() in an attempt to
resolve this item with this 'outer_context'.

After the item fails resolution, we move to an outer context
  select: select #4294967295 (fake_select_lex)
  last_checked_context: from select #3 to the fake select lex
    containing the union (i.e. outermost)
  prev_subselect_item: null, there is no Item that contains this,
    it is the outermost select.

We still need to execute the rest of the loop to determine whether
AAA is resolvable here, but executing

│     5937     place= prev_subselect_item->parsing_place;

We are now following a null pointer.  We introduce a test for this
null pointer, indicating that we are now evaluating the outermost
select and we are not to try accessing the enclosing subselect item.

Approved by: Oleksandr "Sanja" Byelkin (sanja@mariadb.com)
2026-01-23 07:48:16 +13:00
bsrikanth-mariadb
251f76d39e MDEV-36353: Crash with explain for connection
SHOW EXPLAIN FOR, and EXPLAIN/DESC FOR CONNECTION should behave
identically. However, for a query with an addition expression containing
INTERVAL and NOT IN sub-select SHOW EXPLAIN FOR was correctly throwing
parse error, where as EXPLAIN/DESC FOR CONNECTION was crashing.

The reason for the crash is that select block was not initialized and
was being accessed inside the NOT IN sub-select in the EXPLAIN/DESC FOR
CONNECTION case.
2026-01-22 16:20:33 +05:30
Alexander Barkov
a84b8ec5b1 MDEV-38626 Unexpected Data too long error on subselect as a multiplication argument
Item_singerow_subselect::fix_length_and_dec() incorrectly calculated
its Item::max_length when the underlying expression was Item_int.

The reason of the problem:
Item_int has an optimized max_length to make CONCAT(1) create a VARCHAR(1)
column rather than a VARCHAR(2) column. Its max_length does not include one
extra character for the sign in case the value is positive but the value
is not marked as Item::unsigned==true.

So copying max_length from the underlying Item_int (with value==9)
in cases like this:
  SELECT CONCAT((SELECT 9 FROM t0));
was not correct.

Implementing a new virtual method
  Type_handler::Item_type_std_attributes_generic(const Item *item)

- The default implementation just copies attributes from "item" as is.

- In case of Type_handler_int_result it evaluates max_length
  using item->decimal_precision() rather than item->max_length.
  This works correctly for both "optimized" items like Item_int and
  non-"optimized" Items whose max_length includes +1 for the sign
  in case of signed expressions.
2026-01-22 12:47:52 +04:00
Raghunandan Bhat
16b5bf03d7 MDEV-37474: Privilege check of information_schema.TRIGGERS does not correspond to the standards
According to SQL standard, rows from `INFORMATION_SCHEMA.TRIGGERS` table
should be visible to users with non-SELECT privileges on the columns.
`ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns should be
visible only if the user is the owner of the schema.
MariaDB uses `TRIGGER` privilege instead of owner, which controls the
visibilty of all columns, including those which only need non-SELECT
privileges.

This fix
- Allows users with non-SELECT privileges- INSERT, DELETE or UPDATE,
  to see rows in `INFORMATION_SCHEMA.TRIGGERS` table.
- Ensure `ACTION_CONDITION`, `ACTION_STATEMENT` and `DEFINER` columns
  are `NULL` unless the user is the owner of the schema or has `TRIGGER`
  privilege.
2026-01-22 10:43:18 +05:30
Brandon Nesterenko
11f228cbb2 MDEV-38506: Failed GRANT on a procedure breaks replication
When GRANT EXECUTE ON PROCEDURE fails on the master, it will
erroneously be replicated and executed successfully on the slave.
This both breaks replication and is a security violation.

The underlying issue is that a failed GRANT EXECUTE ON PROCEDURE will
still be replicated when sql_mode does not have NO_AUTO_CREATE_USER.
This is because the function mysql_routine_grant() does not check if an
error occured while performing the GRANT before binlogging, it simply
always binlogs.

This patch fixes this problem by checking if an error happened
previously before binlogging, and if so, then skip binlogging.

Note there is still a broader issue in this area leading to replication
divergence. Reported in MDEV-29848, a partially-completed GRANT
statment (where some earlier GRANTS succeed and a later fails) will not
binlog. Note this affects all grant types, whereas the issue addressed
in this patch is limited to GRANT EXECUTE ON PROCEDURE. This patch
makes GRANT EXECUTE ON PROCEDURE binlogging behavior consistent with
the other grant types. A separate follow-up patch will address the
broader MDEV-29848 issue.

Also note that a test case in rpl_do_grant.test took advantage of
MDEV-38506 so a partially-failing REVOKE EXECUTE ON PROCEDURE would
still replicate.  This test case is disabled with a TODO note to
re-enable it once MDEV-29848 is fixed

Reviewed-by: Sergei Golubchik <serg@mariadb.org>
Signed-off-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
2026-01-21 14:31:21 -07:00
Rex Johnston
6a32ccc5b9 MDEV-38473 Incorrect Empty Set with HAVING clause when SELECT and GROUP BY use different aliases for the same column
MDEV-29300 fix causes a wrong result by incorrectly removing a wrapper to
an item that needed to be wrapped for the correct result.  Direct access
to the item causes an incorrect table reference to be used during
join evaluation.  We revert that fix.

Our original problem query is this
SELECT (SELECT 0 GROUP BY c1 HAVING (SELECT c1)) FROM t1 group by c1;

JOIN::prepare on
/* select#2 */ select 0 group by t1.c1 having (subquery#3)

fixing t1.c1 in group by clause, calls fix_outer_field()
this item is resolved in an outer select (#1) and it is a grouping select,
so we wrap it in Item_outer_ref and set this item to unfixed for later
fixing in fix_inner_refs().

JOIN::prepare continues onto the having clause and fixes (subquery#3) which
calls initiates the prepare series of calls, leading to setup_fields on the
fields in this JOIN, one of which is an outer reference c1.
This is resolved to the item in the next most outer select in the group by
clause. This item has been wrapped with an unfixed Item_outer_ref.
It is found in resolve_ref_in_select_and_group() is it expected that
this item will have already been fixed, hence this call in

Item_field::fix_outer_field()

DBUG_ASSERT(*ref && (*ref)->fixed());

but as explained above, it isn't fixed and debug builds assert here.

Because this wrapper cannot be resolved here for reasons detailed in
fix_inner_refs, and we cannot remove this wrapper without potentially
returning an incorrect result, we have to relax this assertion.

Approved by: Oleksandr "Sanja" Byelkin (sanja@mariadb.com)
2026-01-22 07:21:12 +13:00
Jan Lindström
df50563513 MDEV-38598 : Galera test failure on MW-86-wait8
Test failure is caused by regression introduced by commit
4de773e90 that changed error code when function does not exists.
2026-01-20 17:23:53 +02:00
Jan Lindström
540e6daeee MDEV-37984 : Test failure on galera.MDEV-34647
Make sure that both nodes uses intended auto_increment configuration,
all tables and rows are replicated and ordered correctly.
2026-01-20 16:16:56 +02:00
Vladislav Vaintroub
6c4aedae5e new HeidiSQL 2026-01-20 12:32:00 +01:00
Jan Lindström
e40277d29b MDEV-38218 : Galera test failure on galera_bf_abort_flush_for_export
Problem was in wsrep_handle_mdl_conflict function was comparing
thd->lex->sql_command variable for granted MDL-lock.

There is two possible schedules:

    (1) FLUSH TABLES ... FOR EXPORT that will take MDL-lock (granted_thd).
        INSERT from other node is conflicting operation (request_thd)
        and sees MDL-conflict. Because granted_thd has not executed anything
        else thd->lex->sql_command == SQLCOM_FLUSH and this case was
        correctly handled in wsrep_handle_mdl_conflict i.e. INSERT needs
        to wait.

    (2) FLUSH TABLES ... FOR EXPORT that will take MDL-lock (granted_thd).
        SET SESSION wsrep_sync_wait=0; (granted_thd)
        INSERT from other node is conflicting operation (request_thd)

        However, thd->lex->sql_command is not stored to taken MDL-lock. Now
        as granted_thd is executing SET thd->lex->sql_command != SQLCOM_FLUSH
        and INSERT that is BF will abort it and that means also FTFE is
        killed and MDL-lock relesed. This is incorrect as FTFE has written
        file on filesystem and it can't be really killed.

In this fix wsrep_handle_mdl_conflict is refactored not to use
thd->lex->sql_command as a variable used for decisions. Instead
connection state can be determined also via THD members. E.g.:

    * wsrep_thd_is_toi() || wsrep_thd_is_applying - ongoing TOI or applier
    * wsrep_thd_is_BF - thread is brute force
    * wsrep_thd_is_SR - thread is streaming replication thread
    * thd->current_backup_stage != BACKUP_FINISHED - there's ongoing BACKUP
    * thd->global_read_lock.is_acquired() - ongoing FTWRL
    * thd->locked_tables_mode == LTM_LOCK_TABLES - ongoing FTFE or LOCK TABLES
2026-01-20 10:23:44 +02:00
Vladislav Vaintroub
f92337ac17 Fix MSVC warning
innodb_rbt-t.cc(9,1): warning C4722: 'ib::fatal_or_error::~fatal_or_error':
destructor never returns, potential memory leak
2026-01-19 17:09:05 +01:00
Vladislav Vaintroub
f2cb54849f MDEV-38203 fix build error on Windows 2026-01-19 16:36:55 +01:00
Vladislav Vaintroub
42c260bc0f MDEV-37997 vcpkg's FIND_PACKAGE throws error for zlib dependent packages
Build with vcpkg and WITH_ZLIB=bundled throws error
"Broken installation of vcpkg port zlib" in FIND_PACKAGE(CURL)

Set CMAKE_DISABLE_FIND_PACKAGE_ZLIB to workaround.

Previously, this workaround was hashicorp specific, now we need this also
for videx. Thus setting CMAKE_DISABLE_FIND_PACKAGE_ZLIB was moved to
correct place,  inside MYSQL_USE_BUNDLED_ZLIB macro.
2026-01-19 16:36:55 +01:00
Rucha Deodhar
8c6ebbacce MDEV-25148: Unexpected success and result set upon erroneous JSON_VALUE call
Analysis:
When scanning json and reaching a path, the path type is
JSON_PATH_ARRAY_WILD. So it should not return any value. But the code
does not check that.

Fix:
Use path_setup_nwc() to check for range queries because json_value() should
not accept range queries.
2026-01-18 20:14:53 +05:30
Vladislav Vaintroub
c69ea9b286 Skip main.mysql_options_err, if ha_example plugin is missing
This fixes Appveyor build.
2026-01-16 23:33:22 +01:00
Vladislav Vaintroub
eee6c91fdf Windows,CMake - remove invalid use of MESSAGE_ONCE 2026-01-16 20:20:48 +01:00
Kristian Nielsen
13aad4ed2b MDEV-20586: Incorrect commit of transaction in GTID table processing
The initial scanning of the GTID pos table in find_gtid_pos_tables_cb() used
the wrong call to commit the transaction, ha_commit_trans(thd, TRUE) instead
of trans_commit(thd). This could cause an assertion
  Assertion '!thd->in_active_multi_stmt_transaction() || thd->in_multi_stmt_transaction_mode()' failed in mysql_execute_command
and possibly other issues due to incorrect state in the SQL thread THD.

Similar problem in rpl_slave_state::truncate_state_table() also fixed.

Note there is a sister patch cd88b0831f
which applied this same pattern which fixed a hang due to locks
not being released in the ha_commit_trans(thd, TRUE) call.

Test-case-by: Alice Sherepa <alice.sherepa@gmail.com>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-01-15 16:19:34 -07:00
Sergei Golubchik
65720c604e MDEV-38110 Sever shutdown prevented by RocksDB setting rocksdb_pause_background_work
enable background threads on shutdown, so that they could
respond to signals and free resources
2026-01-14 19:44:54 +01:00
Sergei Golubchik
d12a5333fd MDEV-37888 unexpected type changing after changing AVG to MAX
set collation for AVG, like it's done for MAX
2026-01-14 19:44:54 +01:00
Sergei Golubchik
2c983b5ebb MDEV-38006 Inconsistent behaviors when casting into time
number-to-time conversion was too eagerly capping the value.

A string "9000090" was invalid time, because of 90 seconds.
But number-to-time was capping first, validating later,
to 9000090->time worked. Let's fix it.

also, let's make invalid time values in a string field include
the field name in the warning message, just like invalid time
values in a numeric field do.
2026-01-14 19:44:54 +01:00
Sergei Golubchik
5349220b2e MDEV-37979 sys.ps_setup_save does not restore SQL_LOG_BIN after error, causes replication discrepancy 2026-01-14 19:44:30 +01:00
Sergei Golubchik
0dcec66416 MDEV-38233 Inconsistent results for make_set of cast
if ((res=item->val_str(str)) != str)

is incorrect way to detect whether res can be safely used,
because Item_char_typecast::val_str() can return res
which is different from str, but shares the same buffer.
2026-01-14 19:44:30 +01:00
Sergei Golubchik
0db178da5e MDEV-38124 event scheduler spams the error log
event scheduler was printing a lot of info in [Note] in error log.

change to print its startup/shutdown notes only when log_warnings>0.
and runtime notes only when log_warnings>2.
one note was an abnormal error, change to [Error].
2026-01-14 19:44:30 +01:00
Sergei Golubchik
c26d7b9d0f MDEV-36668 main.mysqld--help-aria test failure when no MAC address
don't use such a greedy regex_replace pattern
2026-01-14 19:44:30 +01:00
Sergei Golubchik
32c846e9fc MDEV-38237 Incorrect BuildRequires entry in RHEL10 srpm
apparently a file can be present in *more than one* rpm,
e.g. /usr/bin/dtrace on rhel10 is present *both* in
systemtap-sdt-dtrace and in systemtap-sdt-devel.

Make sure there's a separator between entries.
2026-01-14 19:44:30 +01:00
Sergei Golubchik
edda8d54c1 MDEV-38133 Package mariadb-common conflicts with mysql-common 2026-01-14 19:44:30 +01:00
Sergei Golubchik
87fdb5ac62 MDEV-26618 OPTIMIZE table not replicating
restore OPTIMIZE/ANALYZE replication under @read_only
that was disabled in b62101f84b
2026-01-14 19:44:30 +01:00
Sergei Golubchik
0bfe10e2b7 MDEV-38087 Unexpected error Unknown column '???' in 'GROUP BY'
with `ORDER BY number` if the number doesn't refer to a valid
result column, use this number in the error message not '???'.
2026-01-14 19:44:30 +01:00
Sergei Golubchik
84eec86b37 mysqldump --no-autocommit
* put autocommit/commit outside of LOCK/UNLOCK.
* use uppercase like all other commands
* restore the old value of autocommit
2026-01-14 19:44:30 +01:00
Sergei Golubchik
b998e3a7b9 MDEV-38203 Hashicorp plugin lets keys timeout and doesn't use cached keys on vault errors
* let use_cache_on_timeout apply to other errors
* enable use_cache_on_timeout by default and deprecate it
* increase cache_timeout to max and deprecate it
* change it from long to portable longlong
* delete both in 13.3
2026-01-14 19:44:30 +01:00
Sergei Golubchik
5e7c391dcb fix main.mysqld_option_err test that didn't work for years
the "Test that bad value for plugin enum option is rejected correctly"
needed multiple fixes:

1. don't set plugin-dir based on $MYSQLTEST_VARDIR, all plugins are
  in var/plugins, but $MYSQLTEST_VARDIR is var/1/, var/2/, etc if
  --parallel is used (that is, practically always), thus the ha_example.so
  cannot be loaded, because cannot be found. Test fails with
  "unknown option --plugin-example-enum" as the plugin is not loaded

2. force --plugin-maturity=experimental, otherwise even if not parallel
   the plugin will fail to load because of low maturity, test still
   fails with "unknown option --plugin-example-enum"

3. don't specify .so extension explicitly otherwise the plugin still
   doesn't load on windows, even if paths and maturity are fixed

4. set --plugin-example=FORCE otherwise plugin fails to load after reading
   --plugin-example-enum-var=noexist because of unknown enum value,
   the server ignores the failure and starts normally. the test hangs.

5. This needs the fix in sql_plugin.cc to detect that the plugin is
   forced even when some options failed to parse. It used to consider
   plugin forced only if all options parsed correctly, which was wrong.

Now the test passes, testing what it was supposed to test - failure
to parse an enum value of a plugin option.

Without these fixes the test hanged as in 4 when run on the main branch
in non-prarallel (e.g. one test only) mode.
2026-01-14 19:44:30 +01:00
Sergei Golubchik
65bdb573e6 MDEV-38168 Lots of joins can crash the server
don't let the parser create ridiculously deep joins that
will be rejected later anyway
2026-01-14 19:44:30 +01:00
Sergei Golubchik
1bb660008f fix the test to not leave $datadir/test/imp_t1.ibd around
otherwise it causes random failures in some later test that lists
files in $datadir/test
2026-01-14 19:44:30 +01:00
Sergei Golubchik
2d12bcd28e MDEV-38028 Userstat Plugin CPU_TIME much higher than BUSY_TIME in versions 10.11.X and beyond
my_getcputime() returns "cpu time in 1/10th on a microsecond (1e-7 s)"
2026-01-14 19:44:30 +01:00
Sergei Golubchik
cf842c8c4d MDEV-38096 Server crashes after INSERT.. ON duplicate KEY UPDATE i = DEFAULT
VALUE() should only use table->insert_values when
table->insert_values contains row values.

table->insert_values gets row values for the ODKU clause
so if VALUE() is used before that it shouldn't use table->insert_values
2026-01-14 19:44:30 +01:00
Sergei Golubchik
b9ae75d661 MDEV-37998 (Column) CHECK constraints can cause CREATE TABLE (SELECT) queries to fail
don't copy field default values and check constraints in
CREATE ... SELECT.

CREATE ... SELECT means a table is created from a *result set*
not from some other table.

For backward compatibility, though, let's keep copying constant
default values and the "compressed" attribute.
2026-01-14 19:44:30 +01:00
Sergei Golubchik
7b276c0282 MDEV-38001 NULL dereference in Trigger_creation_ctx::create()
don't trust the content of a file read from disk
2026-01-14 19:44:29 +01:00
Sergei Golubchik
bc977fb008 MDEV-37971 CHECK TABLE command can be executed by users with the table-level CREATE but not with global CREATE
CHECK TABLE was inconsistently requiring SELECT privilege on global/db level
or any privilege on the table/column level.

Change to require any table-applicable privilege on any level.
2026-01-14 19:44:29 +01:00
Sergei Golubchik
9134fea5d6 cleanup: move constraint tests from check.test to check_constraint.test 2026-01-14 19:44:29 +01:00