1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-32015 insert into an empty table fails with hash unique

don't enable bulk insert when table->s->long_unique_table
This commit is contained in:
Sergei Golubchik
2023-08-25 18:13:51 +02:00
parent 382c543f53
commit 65b3c89430
6 changed files with 46 additions and 26 deletions

View File

@ -641,7 +641,8 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list,
(!table->triggers ||
!table->triggers->has_delete_triggers()))
table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
if (thd->locked_tables_mode <= LTM_LOCK_TABLES &&
!table->s->long_unique_table)
table->file->ha_start_bulk_insert((ha_rows) 0);
table->copy_blobs=1;