diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-20 16:30:10 -0300 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-20 16:30:10 -0300 |
commit | 6c15f6718f96cf2a712f1ea1ccf6e057ada5aa5f (patch) | |
tree | c02d7fe89f0e9d9cbd05e83dd77ceeed812eb293 /sql/sql_load.cc | |
parent | 8d407c5f704c523205d52eabd89ca7fd366cf6eb (diff) | |
parent | c96b249fc3912f7a86f885cc62da1a3eeed537c6 (diff) | |
download | mariadb-git-6c15f6718f96cf2a712f1ea1ccf6e057ada5aa5f.tar.gz |
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 15 |
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()) { |