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.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index b2a816a69dd..d367c1c4fde 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -175,6 +175,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
bool is_fifo=0;
#ifndef EMBEDDED_LIBRARY
LOAD_FILE_INFO lf_info;
+ THD::killed_state killed_status= THD::NOT_KILLED;
#endif
char *db = table_list->db; // This is never null
/*
@@ -186,7 +187,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
ulong skip_lines= ex->skip_lines;
bool transactional_table;
bool is_concurrent;
- THD::killed_state killed_status= THD::NOT_KILLED;
DBUG_ENTER("mysql_load");
#ifdef EMBEDDED_LIBRARY
@@ -510,7 +510,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
error=1;
thd->killed= THD::KILL_QUERY;
};);
- killed_status= (error == 0)? THD::NOT_KILLED : thd->killed;
+
+#ifndef EMBEDDED_LIBRARY
+ killed_status= (error == 0) ? THD::NOT_KILLED : thd->killed;
+#endif
+
/*
We must invalidate the table in query cache before binlog writing and
ha_autocommit_...
@@ -553,7 +557,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (lf_info.wrote_create_file)
{
int errcode= query_error_code(thd, killed_status == THD::NOT_KILLED);
-
+
/* since there is already an error, the possible error of
writing binary log will be ignored */
if (thd->transaction.stmt.modified_non_trans_table)
@@ -767,12 +771,9 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
List_iterator_fast<Item> it(fields_vars);
Item_field *sql_field;
TABLE *table= table_list->table;
- ulonglong id;
bool err;
DBUG_ENTER("read_fixed_length");
- id= 0;
-
while (!read_info.read_fixed_length())
{
if (thd->killed)
@@ -901,12 +902,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
Item *item;
TABLE *table= table_list->table;
uint enclosed_length;
- ulonglong id;
bool err;
DBUG_ENTER("read_sep_field");
enclosed_length=enclosed.length();
- id= 0;
for (;;it.rewind())
{