summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index d14e165a788..c2267ba5dfc 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -414,9 +414,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())
;
@@ -460,6 +457,9 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
}
}
#endif /*!EMBEDDED_LIBRARY*/
+ if (transactional_table)
+ ha_autocommit_or_rollback(thd,error);
+
error= -1; // Error on read
goto err;
}