summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-09-08 21:40:59 +0200
committerjimw@mysql.com <>2005-09-08 21:40:59 +0200
commit121678a72e6ae9a28c1b4d76f06e6fb656841398 (patch)
tree149d6adbf3c111b404bb9fb9910dc6b250424199
parenta540a66b2637202b28d0dbcc82b60f53ba1bacc3 (diff)
downloadmariadb-git-121678a72e6ae9a28c1b4d76f06e6fb656841398.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.
-rw-r--r--sql/examples/ha_archive.cc2
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;