diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-12-20 09:52:34 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-25 18:02:31 +0200 |
commit | 4e01bc8c963d9513625dd984cd1aca24b8a7b516 (patch) | |
tree | 9814be2b0ce45c9833328b63cf403d76d1e24c50 /sql/sql_load.cc | |
parent | 3dffdee667666df9ade9f2c458bf1ea495ffba02 (diff) | |
download | mariadb-git-4e01bc8c963d9513625dd984cd1aca24b8a7b516.tar.gz |
MDEV-16240: Assertion `0' failed in row_sel_convert_mysql_key_to_innobasebb-10.2-MDEV-16240
Set table in row ID position mode before using this function.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 49558f8b694..0fcc4efbccd 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -660,6 +660,10 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, thd->abort_on_warning= !ignore && thd->is_strict_mode(); + if ((table_list->table->file->ha_table_flags() & HA_DUPLICATE_POS) && + (error= table_list->table->file->ha_rnd_init_with_error(0))) + goto err; + thd_progress_init(thd, 2); if (table_list->table->validate_default_values_of_unset_fields(thd)) { @@ -679,6 +683,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, set_fields, set_values, read_info, *ex->enclosed, skip_lines, ignore); + if (table_list->table->file->ha_table_flags() & HA_DUPLICATE_POS) + table_list->table->file->ha_rnd_end(); + thd_proc_info(thd, "End bulk insert"); if (!error) thd_progress_next_stage(thd); |