summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbichot@quadxeon.mysql.com <>2005-03-17 17:00:44 +0100
committergbichot@quadxeon.mysql.com <>2005-03-17 17:00:44 +0100
commit7ee2ecbe5d33c1d944a7e58e919bf5fcd7723400 (patch)
tree659b6396fba4955d48e719462482761b7201b438
parent261105a0077dff19d0f6e38dc3a225ad19ba4a1b (diff)
parent3cb85a4740ceddd75cc1e517cd0491d96058e1c4 (diff)
downloadmariadb-git-7ee2ecbe5d33c1d944a7e58e919bf5fcd7723400.tar.gz
Merge quadxeon.mysql.com:/nfstmp1/guilhem/mysql-4.0-4xeon
into quadxeon.mysql.com:/nfstmp1/guilhem/mysql-4.1-4xeon
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--sql/log_event.cc16
2 files changed, 11 insertions, 6 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 8a0c32e37d1..1a7799dc442 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -44,6 +44,7 @@ dlenev@build.mysql.com
dlenev@jabberwock.localdomain
dlenev@mysql.com
ejonore@mc03.ndb.mysql.com
+gbichot@quadxeon.mysql.com
georg@beethoven.local
georg@lmy002.wdf.sap.corp
gerberb@ou800.zenez.com
diff --git a/sql/log_event.cc b/sql/log_event.cc
index d1af78dd751..8a949b81fc1 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2931,8 +2931,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
strmov(p, ".info"); // strmov takes less code than memcpy
strnmov(proc_info, "Making temp file ", 17); // no end 0
thd->proc_info= proc_info;
- if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC,
- MYF(MY_WME))) < 0 ||
+ my_delete(fname_buf, MYF(0)); // old copy may exist already
+ if ((fd= my_create(fname_buf, CREATE_MODE,
+ O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
+ MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP)))
{
@@ -2956,8 +2958,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli)
my_close(fd, MYF(0));
// fname_buf now already has .data, not .info, because we did our trick
- if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC,
- MYF(MY_WME))) < 0)
+ my_delete(fname_buf, MYF(0)); // old copy may exist already
+ if ((fd= my_create(fname_buf, CREATE_MODE,
+ O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
+ MYF(MY_WME))) < 0)
{
slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf);
goto err;
@@ -3081,7 +3085,7 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli)
memcpy(p, ".data", 6);
strnmov(proc_info, "Making temp file ", 17); // no end 0
thd->proc_info= proc_info;
- if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY, MYF(MY_WME))) < 0)
+ if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0)
{
slave_print_error(rli,my_errno, "Error in Append_block event: could not open file '%s'", fname);
goto err;
@@ -3278,7 +3282,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli)
Load_log_event* lev = 0;
memcpy(p, ".info", 6);
- if ((fd = my_open(fname, O_RDONLY|O_BINARY, MYF(MY_WME))) < 0 ||
+ if ((fd = my_open(fname, O_RDONLY|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0 ||
init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0,
MYF(MY_WME|MY_NABP)))
{