1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-38815 Server crashes in Item_func_nextval::val_int upon update on a view

MDEV-28650 (7a88776dc1) fixed the case when the DEFAULT flag is
inside the table definition but it can be also in DML command. When we
assign it from the table definition in mysql_make_view() we lose it in
the current command.

The fix does disjunction assignment to keep both values. It is
signalling DML_prelocking_strategy::handle_table() to call
add_internal_tables(), so it will correctly open associated sequence
table.
This commit is contained in:
Aleksey Midenkov
2026-02-14 22:05:46 +03:00
parent 9aa8cf3420
commit 09657805d0
3 changed files with 25 additions and 1 deletions

View File

@@ -1720,7 +1720,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
if (lex->first_select_lex()->options & OPTION_TO_QUERY_CACHE)
old_lex->first_select_lex()->options|= OPTION_TO_QUERY_CACHE;
old_lex->default_used= lex->default_used;
old_lex->default_used|= lex->default_used;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (table->view_suid)