summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-03-28 17:15:45 -0500
committerunknown <cmiller@zippy.(none)>2006-03-28 17:15:45 -0500
commite0a48a8c40e735d4a10ae0ac11a5f2757b50dbca (patch)
tree308aa27abe44e12afb9e9a29ca5a31f5357be136 /sql
parente4e2e5024a3053df8a1bb788fbd6081047b72f12 (diff)
downloadmariadb-git-e0a48a8c40e735d4a10ae0ac11a5f2757b50dbca.tar.gz
Bug#11151: LOAD DATA INFILE commits transaction in 5.0
No longer create or commit transactions within the loading of files. mysql-test/r/loaddata.result: Add test result. mysql-test/t/loaddata.test: Add test case. sql/sql_load.cc: Loading data from a table should neither create new transactions nor destroy (by committing or rolling-back) existing transactions.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_load.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index cc724c102a4..bc45ae9e334 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -381,7 +381,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
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 */
@@ -396,9 +396,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (error)
{
- if (transactional_table)
- ha_autocommit_or_rollback(thd,error);
-
if (read_file_from_client)
while (!read_info.next_line())
;
@@ -465,8 +462,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
ignore, transactional_table);
}
#endif /*!EMBEDDED_LIBRARY*/
- if (transactional_table)
- error=ha_autocommit_or_rollback(thd,error);
err:
if (thd->lock)