mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
merge the recovery changes found by barry and rich during a code review to main closes[t:2231]
git-svn-id: file:///svn/toku/tokudb@16298 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a58906fe32
commit
26ba255118
8 changed files with 629 additions and 546 deletions
1151
newbrt/recover.c
1151
newbrt/recover.c
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,5 @@
|
|||
// test recovery of a clean shutdown
|
||||
|
||||
#include "test.h"
|
||||
#include "includes.h"
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ run_test(void) {
|
|||
r = toku_logger_open(TESTDIR, logger); assert(r == 0);
|
||||
LSN beginlsn;
|
||||
r = toku_log_begin_checkpoint(logger, &beginlsn, TRUE, 0); assert(r == 0);
|
||||
r = toku_log_end_checkpoint(logger, NULL, TRUE, beginlsn.lsn, 0); assert(r == 0);
|
||||
r = toku_log_begin_checkpoint(logger, &beginlsn, TRUE, 0); assert(r == 0);
|
||||
r = toku_logger_close(&logger); assert(r == 0);
|
||||
|
||||
// run recovery
|
||||
|
|
|
@ -17,6 +17,10 @@ run_test(void) {
|
|||
TOKULOGGER logger;
|
||||
r = toku_logger_create(&logger); assert(r == 0);
|
||||
r = toku_logger_open(TESTDIR, logger); assert(r == 0);
|
||||
LSN beginlsn;
|
||||
r = toku_log_begin_checkpoint(logger, &beginlsn, TRUE, 0); assert(r == 0);
|
||||
r = toku_log_end_checkpoint(logger, NULL, TRUE, beginlsn.lsn, 0); assert(r == 0);
|
||||
|
||||
BYTESTRING iname = { strlen("missing_tokudb_file"), "missing_tokudb_file" };
|
||||
FILENUM filenum = {42};
|
||||
uint32_t treeflags = 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// test recovery of "hello" comments
|
||||
|
||||
#include "test.h"
|
||||
#include "includes.h"
|
||||
|
||||
|
@ -16,7 +18,13 @@ run_test(void) {
|
|||
r = toku_logger_create(&logger); assert(r == 0);
|
||||
r = toku_logger_open(TESTDIR, logger); assert(r == 0);
|
||||
BYTESTRING hello = { strlen("hello"), "hello" };
|
||||
r = toku_log_comment(logger, NULL, TRUE, 0, hello);
|
||||
r = toku_log_comment(logger, NULL, TRUE, 0, hello); assert(r == 0);
|
||||
LSN beginlsn;
|
||||
r = toku_log_begin_checkpoint(logger, &beginlsn, TRUE, 0); assert(r == 0);
|
||||
r = toku_log_end_checkpoint(logger, NULL, TRUE, beginlsn.lsn, 0); assert(r == 0);
|
||||
r = toku_log_comment(logger, NULL, TRUE, 0, hello); assert(r == 0);
|
||||
BYTESTRING there = { strlen("there"), "there" };
|
||||
r = toku_log_comment(logger, NULL, TRUE, 0, there); assert(r == 0);
|
||||
r = toku_logger_close(&logger); assert(r == 0);
|
||||
|
||||
// run recovery
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// test recovery with no data directory
|
||||
|
||||
#include "test.h"
|
||||
#include "includes.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// test recovery with no log
|
||||
|
||||
#include "test.h"
|
||||
#include "includes.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// test recovery with a NULL log directory
|
||||
|
||||
#include "test.h"
|
||||
#include "includes.h"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue