diff options
author | unknown <sasha@mysql.sashanet.com> | 2000-11-16 17:53:22 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2000-11-16 17:53:22 -0700 |
commit | 3dc874a7c09932191a8105fc922ea45fde751a67 (patch) | |
tree | e5a75ad817a81098302cd4e933badfabe9e6ccae /sql | |
parent | 07b4739b7cfdf86e1e0a384761617c300dc4042b (diff) | |
parent | 6e8c7df035f12f12f276837838dfbff25d4bb2a6 (diff) | |
download | mariadb-git-3dc874a7c09932191a8105fc922ea45fde751a67.tar.gz |
Merge work.mysql.com:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
BitKeeper/etc/logging_ok:
Auto converge
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 2 | ||||
-rw-r--r-- | sql/mysqlbinlog.cc | 5 | ||||
-rw-r--r-- | sql/slave.cc | 6 | ||||
-rw-r--r-- | sql/sql_repl.cc | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/sql/log.cc b/sql/log.cc index d5b2b16b368..4f25d758f19 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -276,7 +276,7 @@ int MYSQL_LOG::find_first_log(LOG_INFO* linfo, const char* log_name) // if the log entry matches, empty string matching anything if (!log_name_len || - (log_name_len == length+1 && fname[log_name_len] == '\n' && + (log_name_len == length-1 && fname[log_name_len] == '\n' && !memcmp(fname, log_name, log_name_len))) { fname[length-1]=0; // remove last \n diff --git a/sql/mysqlbinlog.cc b/sql/mysqlbinlog.cc index fe90a814714..12b8e71d017 100644 --- a/sql/mysqlbinlog.cc +++ b/sql/mysqlbinlog.cc @@ -310,7 +310,7 @@ Unfortunately, no sweepstakes today, adjusted position to 4\n"); static void dump_local_log_entries(const char* logname) { - File fd; + File fd = -1; IO_CACHE cache,*file= &cache; int rec_count = 0; @@ -368,7 +368,8 @@ read error", rec_count++; delete ev; } - my_close(fd, MYF(MY_WME)); + if(fd >= 0) + my_close(fd, MYF(MY_WME)); end_io_cache(file); } diff --git a/sql/slave.cc b/sql/slave.cc index dea11b0119f..785d4394845 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -756,8 +756,10 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) sql_exchange ex((char*)lev->fname, lev->sql_ex.opt_flags && DUMPFILE_FLAG ); String field_term(&lev->sql_ex.field_term, 1), - enclosed(&lev->sql_ex.enclosed, 1), line_term(&lev->sql_ex.line_term,1), - escaped(&lev->sql_ex.escaped, 1), line_start(&lev->sql_ex.line_start, 1); + enclosed(&lev->sql_ex.enclosed, 1), + line_term(&lev->sql_ex.line_term,1), + escaped(&lev->sql_ex.escaped, 1), + line_start(&lev->sql_ex.line_start, 1); ex.field_term = &field_term; if(lev->sql_ex.empty_flags & FIELD_TERM_EMPTY) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index ba155c72e49..866663eab66 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -256,7 +256,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) if(pos < 4) { - errmsg = "Contratulations! You have hit the magic number and can win \ + errmsg = "Congratulations! You have hit the magic number and can win \ sweepstakes if you report the bug"; goto err; } @@ -291,6 +291,8 @@ sweepstakes if you report the bug"; packet->length(0); packet->append("\0",1); } + + if(error != LOG_READ_EOF) { switch(error) |