From da5a9926e1747b482fa7236bf794b4b605b21bf6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Sep 2005 21:40:59 +0200 Subject: 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 --- sql/examples/ha_archive.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/examples') 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; -- cgit v1.2.1