- fixes to the control file module
- unit test for it
- renames of all Maria files I created to start with ma_
storage/maria/ma_checkpoint.c:
Rename: storage/maria/checkpoint.c -> storage/maria/ma_checkpoint.c
storage/maria/ma_checkpoint.h:
Rename: storage/maria/checkpoint.h -> storage/maria/ma_checkpoint.h
storage/maria/ma_least_recently_dirtied.c:
Rename: storage/maria/least_recently_dirtied.c -> storage/maria/ma_least_recently_dirtied.c
storage/maria/ma_least_recently_dirtied.h:
Rename: storage/maria/least_recently_dirtied.h -> storage/maria/ma_least_recently_dirtied.h
storage/maria/ma_recovery.c:
Rename: storage/maria/recovery.c -> storage/maria/ma_recovery.c
storage/maria/ma_recovery.h:
Rename: storage/maria/recovery.h -> storage/maria/ma_recovery.h
storage/maria/Makefile.am:
control file module and its unit test program
storage/maria/ma_control_file.c:
DBUG_ tags. Fix for gcc warnings.
log_no -> logno (I felt "_no" sounded like a standalone "No" word).
ma_ prefix for some functions.
last_checkpoint_lsn_at_startup -> last_checkpoint_lsn (no need
to make special vars for the values at startup). Same for last_logno.
ma_control_file_write_and_force() now updates last_checkpoint_lsn
and last_logno, the idea being that they belong to the module,
others should not update them.
And thus when the module shuts down, it zeroes those vars.
storage/maria/ma_control_file.h:
importing structs from Sanja to get the control file module to compile;
we'll remove that when Sanja pushes the log handler.
CONTROL_FILE_IMPOSSIBLE_LOGNO is 0, not FFFFFFFF.
storage/maria/ma_control_file_test.c:
Unit test program for the Maria control file module.
Modelled after other ma_test* files in this directory (so, does
not follow the unit test framework recently introduced with libtap;
TODO as a task on all ma_test* programs).
We test that writing to the control file works, and re-reading from it
too, we check (by reading the file by ourselves) that its content
on disk is correct, and check that a corrupted control file is detected.
storage/maria/checkpoint.c:
comments
storage/maria/least_recently_dirtied.c:
comments
storage/maria/ma_check.c:
line formatting changes neglected from my last merge
storage/maria/ma_ft_parser.c:
it reduces the diff of MyISAM vs Maria :)
storage/maria/recovery.c:
comments
storage/maria/checkpoint.c:
minor fixes
storage/maria/least_recently_dirtied.c:
writing down MikaelR's comments.
storage/maria/recovery.c:
writing down MikaelR's comments.
Some small fixes.
storage/maria/control_file.h:
small fix
storage/maria/recovery.c:
small fixes to the pseudocode and discussion of why no checkpoint at end of UNDO phase.
control file (WL#3234), to serve as a detailed LLD. It looks like C code, but does not compile (no point in making it compile,
as other modules on which I depend are not yet fully speficied or written); some pieces are not coded and just marked in comments.
Files' organization (names, directories of C files) does not matter at this point.
I don't think I had to commit so early, but it feels good to publish something, gives me the impression of moving forward :)
storage/maria/checkpoint.c:
WL#3071 Maria checkpoint, implementation
storage/maria/checkpoint.h:
WL#3071 Maria checkpoint, interface
storage/maria/control_file.c:
WL#3234 Maria control file, implementation
storage/maria/control_file.h:
WL#3234 Maria control file, interface
storage/maria/least_recently_dirtied.c:
WL#3261 Maria background flushing of least-recently-dirtied pages, implementation
storage/maria/least_recently_dirtied.h:
WL#3261 Maria background flushing of least-recently-dirtied pages, interface
storage/maria/recovery.c:
WL#3072 Maria recovery, implementation
storage/maria/recovery.h:
WL#3072 Maria recovery, interface