summaryrefslogtreecommitdiff
path: root/include/maria.h
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2007-10-09 10:38:31 +0200
committerunknown <guilhem@gbichot4.local>2007-10-09 10:38:31 +0200
commit791b0aa081a3fbd648ab8342e1fa7d1251df9acc (patch)
treefeb2478e8f6e897c6ce6b472e3b4b4b969f855c3 /include/maria.h
parent568e32c80dcfe542887bfc9eb0d000fda4b54b74 (diff)
downloadmariadb-git-791b0aa081a3fbd648ab8342e1fa7d1251df9acc.tar.gz
WL#3071 - Maria checkpoint
* Preparation for having a background checkpoint thread: frequency of checkpoint taken by that thread is now configurable by the user: global variable maria_checkpoint_frequency, in seconds, default 30 (checkpoint every 30th second); 0 means no checkpoints (and thus no background thread, thus no background flushing, that will probably only be used for testing). * Don't take checkpoints in Recovery if it didn't do anything significant; thus no checkpoint after a clean shutdown/restart. The only checkpoint which is never skipped is the one at shutdown. * fix for a test failure (after-merge fix) include/maria.h: new variable mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: result update mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: position update (=after merge fix, as this position was already changed into 5.1 and not merged here, causing test to fail) storage/maria/ha_maria.cc: Checkpoint's frequency is now configurable by the user: global variable maria_checkpoint_frequency. Changing it on the fly requires us to shutdown/restart the background checkpoint thread, as the loop done in that thread assumes a constant checkpoint interval. Default value is 30: a checkpoint every 30 seconds (yes, I know, physicists will remind that it should be named "period" then). ha_maria now asks for a background checkpoint thread when it starts, but this is still overruled (disabled) in ma_checkpoint_init(). storage/maria/ma_checkpoint.c: Checkpoint's frequency is now configurable by the user: background thread takes a checkpoint every maria_checkpoint_interval-th second. If that variable is 0, no checkpoints are taken. Note, I will enable the background thread only in a later changeset. storage/maria/ma_recovery.c: Don't take checkpoints at the end of the REDO phase and at the end of Recovery if Recovery didn't make anything significant (didn't open any tables, didn't rollback any transactions). With this, after a clean shutdown, Recovery shouldn't take any checkpoint, which makes starting faster (we save a few fsync()s of the log and control file).
Diffstat (limited to 'include/maria.h')
-rw-r--r--include/maria.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/maria.h b/include/maria.h
index dfd0596ba7e..f915e9fbb7e 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -244,7 +244,7 @@ typedef struct st_maria_columndef /* column information */
} MARIA_COLUMNDEF;
-extern ulong maria_block_size;
+extern ulong maria_block_size, maria_checkpoint_frequency;
extern ulong maria_concurrent_insert;
extern my_bool maria_flush, maria_single_user;
extern my_bool maria_delay_key_write;