diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
commit | 8fc78e08b0e68f82121b0bba8d930bc5ec57a29f (patch) | |
tree | c5c654aca3970830687c68cb22289835e1719233 /sql/sql_load.cc | |
parent | 74f49f9f34b7a4cc1b87aa1cb657b72f8c6c856e (diff) | |
download | mariadb-git-8fc78e08b0e68f82121b0bba8d930bc5ec57a29f.tar.gz |
cleanup
removal of duplicate code in mf_iocache.cc
work on failsafe replication
work on SEQ_READ_APPEND io cache
include/my_sys.h:
updates for SEQ_READ_APPEND
libmysql/Makefile.am:
fix for mysys/mf_iocache.c
libmysql/libmysql.c:
updates for new format of SHOW SLAVE HOSTS
mysql-test/r/rpl000001.result:
test replication of LOAD DATA LOCAL INFILE
mysql-test/r/rpl000002.result:
updated test result
mysql-test/t/rpl000001.test:
test LOAD DATA LOCAL INFILE
mysys/mf_iocache.c:
cleanup to remove duplicate functionality
some work on SEQ_READ_APPEND
sql/mf_iocache.cc:
cleanup to remove duplicate functionality
sql/repl_failsafe.cc:
more work on failsafe replication
sql/repl_failsafe.h:
more work on failsafe replication
sql/slave.cc:
cleanup
more work on failsafe replication
sql/sql_load.cc:
fixed bug on replicating empty file loads
got LOAD DATA LOCAL INFILE to work again, and to be replicated
sql/sql_repl.cc:
cleanup
more work on failsafe replication
sql/sql_repl.h:
more work on failsafe replication
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index c2793da78f3..28140121491 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -278,8 +278,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ha_autocommit_or_rollback(thd,error); if (!opt_old_rpl_compat && mysql_bin_log.is_open()) { - Delete_file_log_event d(thd); - mysql_bin_log.write(&d); + if (lf_info.wrote_create_file) + { + Delete_file_log_event d(thd); + mysql_bin_log.write(&d); + } } DBUG_RETURN(-1); // Error on read } @@ -303,8 +306,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (!opt_old_rpl_compat) { read_info.end_io_cache(); // make sure last block gets logged - Execute_load_log_event e(thd); - mysql_bin_log.write(&e); + if (lf_info.wrote_create_file) + { + Execute_load_log_event e(thd); + mysql_bin_log.write(&e); + } } } if (using_transactions) @@ -534,6 +540,14 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term, } 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 + manual assignment + */ + if (get_it_from_net) + cache.read_function = _my_b_net_read; + need_end_io_cache = 1; if (!opt_old_rpl_compat && mysql_bin_log.is_open()) cache.pre_read = cache.pre_close = |