summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-27 20:41:31 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-27 20:41:31 +0300
commit4d59f45260547b3230f177498b6fa07a12647fdc (patch)
treec39c6757a7a7ddbc4849769b288c0131da74803d /sql/sql_load.cc
parentacf6f92aa936fbfe7524617ae57d011ab8f1f96d (diff)
parent00377147e3029b982cbc29d3f4477362c6e6fdb4 (diff)
downloadmariadb-git-4d59f45260547b3230f177498b6fa07a12647fdc.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 92ef222c8b7..8631569a30b 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -663,6 +663,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))
{
@@ -682,6 +686,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);