summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2006-02-07 11:47:04 +0100
committertomas@poseidon.ndb.mysql.com <>2006-02-07 11:47:04 +0100
commit407d98b946553e8b58cfc28f85d969ae97316946 (patch)
treedda36b3afcd586e60081e26502876cfb950004b5 /sql/sql_load.cc
parent69ed898ec22c78de5509b30b5ccd53c498ba2648 (diff)
downloadmariadb-git-407d98b946553e8b58cfc28f85d969ae97316946.tar.gz
Bug#17081 LOAD DATA INFILE" may not load all the data
Bug #17154 load data infile hangs when duplicate key encountered
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 3850e704718..1d6442ba7d6 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -384,8 +384,11 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
error= read_sep_field(thd, info, table_list, fields_vars,
set_fields, set_values, read_info,
*enclosed, skip_lines, ignore);
- if (table->file->end_bulk_insert())
- error=1; /* purecov: inspected */
+ if (table->file->end_bulk_insert() && !error)
+ {
+ table->file->print_error(my_errno, MYF(0));
+ error= 1;
+ }
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->next_number_field=0;
}