diff options
author | unknown <brian@zim.(none)> | 2006-04-20 18:23:04 -0700 |
---|---|---|
committer | unknown <brian@zim.(none)> | 2006-04-20 18:23:04 -0700 |
commit | e83ae318da44479b588d61d0d43afc035c9c296c (patch) | |
tree | 8353d832a3689f5a236d8a2f2e4fc95dc77c0563 /sql/ha_archive.h | |
parent | db623fa89f9b90b21c00184400a1ca94c361010f (diff) | |
download | mariadb-git-e83ae318da44479b588d61d0d43afc035c9c296c.tar.gz |
Dean noticed that constant flush calls caused the archive stream file to flush empty buffers. This patch removes that behavior.
sql/ha_archive.cc:
Modifications for more of a lazy approach to opening up archive files for writing.
sql/ha_archive.h:
Added a variable to determine state, and a new method for encapsulating the opening of archive writers.
Diffstat (limited to 'sql/ha_archive.h')
-rw-r--r-- | sql/ha_archive.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/ha_archive.h b/sql/ha_archive.h index 0fa5cdc56ca..2bac9fa605e 100644 --- a/sql/ha_archive.h +++ b/sql/ha_archive.h @@ -34,6 +34,7 @@ typedef struct st_archive_share { THR_LOCK lock; File meta_file; /* Meta file we use */ gzFile archive_write; /* Archive file we are working with */ + bool archive_write_open; bool dirty; /* Flag for if a flush should occur */ bool crashed; /* Meta file is crashed */ ha_rows rows_recorded; /* Number of rows in tables */ @@ -87,6 +88,7 @@ public: int write_meta_file(File meta_file, ha_rows rows, bool dirty); ARCHIVE_SHARE *get_share(const char *table_name, TABLE *table, int *rc); int free_share(ARCHIVE_SHARE *share); + int init_archive_writer(); bool auto_repair() const { return 1; } // For the moment we just do this int read_data_header(gzFile file_to_read); int write_data_header(gzFile file_to_write); |