diff options
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 0228bf62708..ba1403837b8 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -647,6 +647,10 @@ int mysql_load(THD *thd, const 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)) { @@ -666,6 +670,9 @@ int mysql_load(THD *thd, const 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 (likely(!error)) thd_progress_next_stage(thd); |