revision-id: 3b49c8a81ec126c3faed6ae7c4930e59be7ca9c5 (mariadb-10.2.22-72-g3b49c8a81ec) parent(s): 7c93e1c438bf9faacc0e9472cd52a41add5421b5 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2019-03-14 15:09:47 +0100 message: c --- sql/sql_load.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 2fd9caef575..3283b962f65 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -639,7 +639,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, thd->abort_on_warning= !ignore && thd->is_strict_mode(); /* Prepare table for random positioning (importent for innodb) */ - if (table_list->table->file->ha_rnd_init(0)) + if ((table_list->table->file->ha_table_flags() & HA_DUPLICATE_POS) && + table_list->table->file->ha_rnd_init(0)) { error= 1; goto err; @@ -663,7 +664,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, set_fields, set_values, read_info, *ex->enclosed, skip_lines, ignore); - table_list->table->file->ha_rnd_end(); + 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)
participants (1)
-
Oleksandr Byelkin