diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-20 14:20:02 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-09-20 14:20:02 +0200 |
commit | 3ce33c2c5281ef33f03ff0df1c177bd4be1b9670 (patch) | |
tree | 5261ee41c2f30597951f0952da9334a53e5d15d9 /sql/sql_load.cc | |
parent | 5cf25d8019db1800c63e080aba87b825c90301f6 (diff) | |
download | mariadb-git-3ce33c2c5281ef33f03ff0df1c177bd4be1b9670.tar.gz |
Bug #10694 LOAD DATA FROM INFILE fails with 'Out of operation records'
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index c4f5b1427af..7b963c7ea31 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -114,6 +114,10 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, MYF(0)); DBUG_RETURN(-1); } + /* + This needs to be done before external_lock + */ + ha_enable_transaction(thd, FALSE); if (!(table = open_ltable(thd,table_list,lock_type))) DBUG_RETURN(-1); transactional_table= table->file->has_transactions(); @@ -273,7 +277,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (ignore || handle_duplicates == DUP_REPLACE) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); - ha_enable_transaction(thd, FALSE); table->file->start_bulk_insert((ha_rows) 0); table->copy_blobs=1; if (!field_term->length() && !enclosed->length()) @@ -284,10 +287,10 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, skip_lines); if (table->file->end_bulk_insert()) error=1; /* purecov: inspected */ - ha_enable_transaction(thd, TRUE); table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->next_number_field=0; } + ha_enable_transaction(thd, TRUE); if (file >= 0) my_close(file,MYF(0)); free_blobs(table); /* if pack_blob was used */ |