mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-24715 Assertion !node->table->skip_alter_undo in CREATE...REPLACE SELECT
In commit 3cef4f8f0f
(MDEV-515)
we inadvertently broke CREATE TABLE...REPLACE SELECT statements
by wrongly disabling row-level undo logging.
select_create::prepare(): Only invoke extra(HA_EXTRA_BEGIN_ALTER_COPY)
if no special treatment of duplicates is needed.
This commit is contained in:
@ -4746,7 +4746,8 @@ select_create::prepare(List<Item> &_values, SELECT_LEX_UNIT *u)
|
||||
if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
|
||||
{
|
||||
table->file->ha_start_bulk_insert((ha_rows) 0);
|
||||
table->file->extra(HA_EXTRA_BEGIN_ALTER_COPY);
|
||||
if (thd->lex->duplicates == DUP_ERROR && !thd->lex->ignore)
|
||||
table->file->extra(HA_EXTRA_BEGIN_ALTER_COPY);
|
||||
}
|
||||
thd->abort_on_warning= !info.ignore && thd->is_strict_mode();
|
||||
if (check_that_all_fields_are_given_values(thd, table, table_list))
|
||||
|
Reference in New Issue
Block a user