diff options
author | unknown <ramil@mysql.com> | 2005-06-09 13:13:02 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-06-09 13:13:02 +0500 |
commit | 897b3c50e8cd5d80e61b8ae8276604a7e3d76ba5 (patch) | |
tree | b1ff0d88a8e12175954a83559d5540d269d82aee /mysys/my_fopen.c | |
parent | 777899a6f568105ab6242516300acd937a9785ec (diff) | |
download | mariadb-git-897b3c50e8cd5d80e61b8ae8276604a7e3d76ba5.tar.gz |
a fix (bug #11193: error messages gets garbled after reggies latest changeset: ChangeSet@1.2260.1.).
Diffstat (limited to 'mysys/my_fopen.c')
-rw-r--r-- | mysys/my_fopen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index 9dbac65b098..002e5ca0f06 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -185,11 +185,11 @@ static void make_ftype(register my_string to, register int flag) DBUG_ASSERT(flag & (O_TRUNC|O_APPEND) != O_TRUNC|O_APPEND); if (flag & (O_RDONLY|O_WRONLY) == O_WRONLY) - *to++= (flag & O_TRUNC) ? 'w' : 'a'; + *to++= (flag & O_APPEND) ? 'a' : 'w'; else if (flag & O_RDWR) { /* Add '+' after theese */ - if (flag & O_TRUNC) + if (flag & (O_TRUNC | O_CREAT)) *to++= 'w'; else if (flag & O_APPEND) *to++= 'a'; |