summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-02-14 21:50:09 +0100
committerunknown <serg@serg.mylan>2005-02-14 21:50:09 +0100
commit2d8b51991cb5d639254786edb6c446adbd4eb31c (patch)
treeea9dd08a255018554104b4f137dea7cfe36ece0a /sql/sql_load.cc
parentff4e1476a91193bf5236cbdadeceac843f7bebf4 (diff)
parent9297872d75f4754df8bbf607e380fc6cf68251f1 (diff)
downloadmariadb-git-2d8b51991cb5d639254786edb6c446adbd4eb31c.tar.gz
manually merged
client/mysqlbinlog.cc: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged innobase/trx/trx0trx.c: Auto merged mysql-test/include/varchar.inc: Auto merged mysql-test/r/bdb.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/mysqlbinlog2.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/user_var.test: Auto merged mysys/hash.c: Auto merged sql/item_func.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_trigger.cc: Auto merged mysql-test/r/ctype_ucs.result: ul mysql-test/r/drop_temp_table.result: ul mysql-test/r/innodb.result: ul mysql-test/r/insert_select.result: ul mysql-test/r/mix_innodb_myisam_binlog.result: ul mysql-test/r/rpl_change_master.result: ul mysql-test/r/rpl_charset.result: ul mysql-test/r/rpl_error_ignored_table.result: ul mysql-test/r/rpl_flush_log_loop.result: ul mysql-test/r/rpl_flush_tables.result: ul mysql-test/r/rpl_loaddata.result: ul mysql-test/r/rpl_loaddata_rule_m.result: ul mysql-test/r/rpl_log.result: ul mysql-test/r/rpl_max_relay_size.result: ul mysql-test/r/rpl_relayrotate.result: ul mysql-test/r/rpl_replicate_do.result: ul mysql-test/r/rpl_rotate_logs.result: ul mysql-test/r/rpl_temporary.result: ul mysql-test/r/rpl_timezone.result: ul mysql-test/r/rpl_until.result: ul mysql-test/r/rpl_user_variables.result: ul mysql-test/r/user_var.result: ul
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 7858632fff2..efd914003dc 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->s->tmp_table);
if (!fields.elements)
{
@@ -263,7 +262,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*/
@@ -365,7 +364,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);
}
}
@@ -377,7 +376,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())
@@ -387,16 +386,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)
@@ -404,7 +403,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;