summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-01-27 22:38:56 +0100
committerserg@serg.mylan <>2005-01-27 22:38:56 +0100
commit3c5060981f6de05473a981df259c1a42e084cc81 (patch)
tree6715c798eca742afb2f6f41acc10e122a8d50aa0 /sql/sql_load.cc
parent2c0d5bb41dadde3b108f0a1e67b513aa45015cd3 (diff)
downloadmariadb-git-3c5060981f6de05473a981df259c1a42e084cc81.tar.gz
query_id and my_xid -> ulonglong
fix for binlog+autocommit+tclog comments, style fixes
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 21dd2318504..82e8ac25052 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -105,7 +105,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
char *tdb= thd->db ? thd->db : db; // Result is never null
ulong skip_lines= ex->skip_lines;
int res;
- bool transactional_table, log_delayed;
+ bool transactional_table;
DBUG_ENTER("mysql_load");
#ifdef EMBEDDED_LIBRARY
@@ -133,7 +133,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
}
table= table_list->table;
transactional_table= table->file->has_transactions();
- log_delayed= (transactional_table || table->tmp_table);
if (!fields.elements)
{
@@ -261,7 +260,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
lf_info.handle_dup = handle_duplicates;
lf_info.wrote_create_file = 0;
lf_info.last_pos_in_file = HA_POS_ERROR;
- lf_info.log_delayed= log_delayed;
+ lf_info.log_delayed= transactional_table;
read_info.set_io_cache_arg((void*) &lf_info);
}
#endif /*!EMBEDDED_LIBRARY*/
@@ -363,7 +362,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
/* If the file was not empty, wrote_create_file is true */
if (lf_info.wrote_create_file)
{
- Delete_file_log_event d(thd, db, log_delayed);
+ Delete_file_log_event d(thd, db, transactional_table);
mysql_bin_log.write(&d);
}
}
@@ -375,7 +374,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
send_ok(thd,info.copied+info.deleted,0L,name);
- if (!log_delayed)
+ if (!transactional_table)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
#ifndef EMBEDDED_LIBRARY
if (mysql_bin_log.is_open())
@@ -385,16 +384,16 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
block will be logged only after Execute_load_log_event (which is wrong),
when read_info is destroyed.
*/
- read_info.end_io_cache();
+ read_info.end_io_cache();
if (lf_info.wrote_create_file)
{
- Execute_load_log_event e(thd, db, log_delayed);
+ Execute_load_log_event e(thd, db, transactional_table);
mysql_bin_log.write(&e);
}
}
#endif /*!EMBEDDED_LIBRARY*/
if (transactional_table)
- error=ha_autocommit_or_rollback(thd,error);
+ error=ha_autocommit_or_rollback(thd,error);
err:
if (thd->lock)
@@ -402,7 +401,7 @@ err:
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- thd->abort_on_warning= 0;
+ thd->abort_on_warning= 0;
DBUG_RETURN(error);
}
@@ -732,12 +731,11 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
my_free((gptr) buffer,MYF(0)); /* purecov: inspected */
error=1;
}
- else
+ else
{
/*
init_io_cache() will not initialize read_function member
- if the cache is READ_NET. The reason is explained in
- mysys/mf_iocache.c. So we work around the problem with a
+ if the cache is READ_NET. So we work around the problem with a
manual assignment
*/
need_end_io_cache = 1;