diff options
author | unknown <guilhem@gbichot4.local> | 2008-04-07 18:59:20 +0200 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2008-04-07 18:59:20 +0200 |
commit | 2d327efd89c85a65672fb232ba0bb55b9f582394 (patch) | |
tree | 9228b52dbc8c47dcb50ccd9075833f0be786e6c1 /storage/maria/ma_init.c | |
parent | 722a8ebe5b78f82f9cda9872317ff0f8f1dcd63e (diff) | |
download | mariadb-git-2d327efd89c85a65672fb232ba0bb55b9f582394.tar.gz |
Fixing the little bug that if a new version reads an old control file,
it couldn't entirely write its new information (it could not write
more bytes than the old format wrote).
storage/maria/ma_control_file.c:
Let ma_control_file_write_and_force() return error if called when
file is not open.
When the file was of an old version (no room for our changeable part)
we upgrade this part. When the file was of a new version we re-use its
format but zero the parts which we can't maintain.
storage/maria/ma_init.c:
ma_control_file_write_and_force() now does not assert if called
when control file is not open.
storage/maria/ma_recovery.c:
missing ";" (thanks Peter Zaitsev for the bug report and Monty for the patch)
Diffstat (limited to 'storage/maria/ma_init.c')
-rw-r--r-- | storage/maria/ma_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/maria/ma_init.c b/storage/maria/ma_init.c index 4db8e92895c..6edb0155aec 100644 --- a/storage/maria/ma_init.c +++ b/storage/maria/ma_init.c @@ -56,15 +56,15 @@ void maria_end(void) maria_inited= maria_multi_threaded= FALSE; ft_free_stopwords(); ma_checkpoint_end(); - if (ma_control_file_inited() && - ((trid= trnman_get_max_trid()) > max_trid_in_control_file)) + if ((trid= trnman_get_max_trid()) > max_trid_in_control_file) { /* Store max transaction id into control file, in case logs are removed by user, or maria_chk wants to check tables (it cannot access max trid from the log, as it cannot process REDOs). */ - ma_control_file_write_and_force(last_checkpoint_lsn, last_logno, trid); + (void)ma_control_file_write_and_force(last_checkpoint_lsn, last_logno, + trid); } trnman_destroy(); if (translog_status == TRANSLOG_OK) |