diff options
author | unknown <jimw@mysql.com> | 2005-09-08 21:40:59 +0200 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-09-08 21:40:59 +0200 |
commit | da5a9926e1747b482fa7236bf794b4b605b21bf6 (patch) | |
tree | 149d6adbf3c111b404bb9fb9910dc6b250424199 /sql/examples | |
parent | d65a24bb7c07537298bd3520d7c9b0fc0f3035e6 (diff) | |
download | mariadb-git-da5a9926e1747b482fa7236bf794b4b605b21bf6.tar.gz |
When first creating the ARZ file for an archive table, use "wb" as the mode for
gzdopen() because the file itself was only opened for writing (and truncated),
and some libc implementations (like SCO) don't like to do a fdopen(..., "a") on
a fd that was not opened using O_APPEND.
sql/examples/ha_archive.cc:
Use "wb" instead of "ab" since we just opened this file for writing
Diffstat (limited to 'sql/examples')
-rw-r--r-- | sql/examples/ha_archive.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc index bc4af0c7dc7..30b107aa627 100644 --- a/sql/examples/ha_archive.cc +++ b/sql/examples/ha_archive.cc @@ -520,7 +520,7 @@ int ha_archive::create(const char *name, TABLE *table_arg, error= my_errno; goto error; } - if ((archive= gzdopen(create_file, "ab")) == NULL) + if ((archive= gzdopen(create_file, "wb")) == NULL) { error= errno; goto error2; |