diff options
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 377f41958c5..3313ff913dc 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -276,14 +276,12 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, { if (use_timestamp) table->timestamp_default_now= table->timestamp_on_update_now= 0; - + table->next_number_field=table->found_next_number_field; - VOID(table->file->extra_opt(HA_EXTRA_WRITE_CACHE, - thd->variables.read_buff_size)); if (handle_duplicates == DUP_IGNORE || handle_duplicates == DUP_REPLACE) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); - table->file->deactivate_non_unique_index((ha_rows) 0); + table->file->start_bulk_insert((ha_rows) 0); table->copy_blobs=1; if (!field_term->length() && !enclosed->length()) error=read_fixed_length(thd,info,table,fields,read_info, @@ -291,9 +289,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, else error=read_sep_field(thd,info,table,fields,read_info,*enclosed, skip_lines); - if (table->file->extra(HA_EXTRA_NO_CACHE)) - error=1; /* purecov: inspected */ - if (table->file->activate_all_index(thd)) + if (table->file->end_bulk_insert()) error=1; /* purecov: inspected */ table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->next_number_field=0; @@ -530,8 +526,8 @@ read_sep_field(THD *thd,COPY_INFO &info,TABLE *table, if (field->type() == FIELD_TYPE_TIMESTAMP) ((Field_timestamp*) field)->set_time(); else if (field != table->next_number_field) - field->set_warning((uint)MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WARN_NULL_TO_NOTNULL); + field->set_warning((uint) MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_NULL_TO_NOTNULL); } continue; } @@ -1015,7 +1011,7 @@ bool READ_INFO::find_start_of_fields() { // Can't be line_start PUSH(chr); while (--ptr != line_start_ptr) - { // Restart with next char + { // Restart with next char PUSH((uchar) *ptr); } goto try_again; |