mariadb/mysql-test/suite
Aleksey Midenkov 49d1bf71dc 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().
2025-12-22 13:13:08 +03:00
..
archive Merge branch '10.6' into '10.11' 2025-04-16 03:34:40 +02:00
atomic Merge branch '10.6' into 10.11 2025-04-26 10:47:03 +02:00
binlog Merge 10.6 into 10.11 2025-10-09 13:29:46 +03:00
binlog_encryption cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
client
compat MDEV-37325 Incorrect results for INTERSECT ALL in ORACLE mode 2025-10-14 14:43:46 +03:00
csv
encryption MDEV-37299 fixup: cmake -DPLUGIN_PERFSCHEMA=NO 2025-09-30 16:42:58 +03:00
engines MDEV-37375 engines/iuds suite fails with ps-protocol 2025-09-15 11:00:02 +02:00
federated cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
funcs_1 cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-37816: galera tests failing with Table performance_schema.xxx doesn't exist 2025-10-09 16:01:09 +11:00
galera_3nodes MDEV-37816: galera tests failing with Table performance_schema.xxx doesn't exist 2025-10-09 16:01:09 +11:00
galera_3nodes_sr galera mtr tests: synchronization between branches and editions 2025-04-02 04:50:11 +02:00
galera_sr galera tests: synchronization between versions and editions 2025-08-14 17:04:40 +02:00
gcol cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
handler Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
heap Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
innodb MDEV-37138: Innochecksum fails to handle doublewrite buffer and 2025-10-13 13:04:53 +05:30
innodb_fts MDEV-35163 InnoDB persistent statistics fail to update after ALTER TABLE...ALGORITHM=COPY 2025-09-22 17:39:47 +05:30
innodb_gis Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
innodb_i_s
innodb_zip MDEV-37138: Innochecksum fails to handle doublewrite buffer and 2025-10-13 13:04:53 +05:30
jp
json MDEV-35614: JSON_UNQUOTE doesn't work with emojis 2025-04-19 08:55:05 +10:00
large_tests
maria Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
mariabackup MDEV-37520 Failure to detect corruption during backups of Aria table 2025-09-04 18:08:39 +03:00
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source MDEV-7611: create multi_source.mariadb-dump_slave 2025-07-10 18:31:36 -06:00
optimizer_unfixed_bugs
parts MDEV-37328 Assertion failure in make_empty_rec upon CONVERT PARTITION 2025-07-28 18:06:11 +02:00
perfschema MDEV-37705 main.lotofstack /main.sp-error fails in MSAN+Debug 2025-09-24 09:08:16 +10:00
perfschema_stress
period Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
plugins Reproducible test case for MDEV-37434 2025-09-18 18:01:33 +02:00
roles Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
rpl Merge 10.6 into 10.11 2025-10-09 13:29:46 +03:00
s3 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
sql_sequence MDEV-33985 Server crashes at Item_func_nextval::val_int 2025-12-22 13:13:08 +03:00
storage_engine
stress MDEV-34453 Trying to read 16384 bytes at 70368744161280 outside the bounds of the file: ./ibdata1 2024-09-20 20:26:43 +05:30
sys_vars Fixed typos 2025-09-04 18:08:39 +03:00
sysschema MDEV-37083: Fixed type mismatch in sys views 2025-07-25 17:02:59 +05:30
unit
vcol Improvements for myisamchk 2025-09-04 18:08:39 +03:00
versioning MDEV-29114 Pruning depends on current timestamp for partition by SYSTEM_TIME 2025-10-14 14:04:47 +03:00
wsrep MDEV-30418 : Setting wsrep_slave_threads causes thread hang 2025-09-26 15:33:56 +03:00