Commit da5a9926 authored by unknown's avatar unknown

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
parent d65a24bb
...@@ -520,7 +520,7 @@ int ha_archive::create(const char *name, TABLE *table_arg, ...@@ -520,7 +520,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
error= my_errno; error= my_errno;
goto error; goto error;
} }
if ((archive= gzdopen(create_file, "ab")) == NULL) if ((archive= gzdopen(create_file, "wb")) == NULL)
{ {
error= errno; error= errno;
goto error2; goto error2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment