mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
Create code to compute the size of a rollback entry. Addresses #711.
git-svn-id: file:///svn/tokudb@3490 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
8511ea7372
commit
85905624d4
1 changed files with 11 additions and 0 deletions
|
@ -509,6 +509,17 @@ void generate_rollbacks (void) {
|
|||
fprintf(cf, " txn->newest_logentry = v;\n");
|
||||
fprintf(cf, " return 0;\n}\n");
|
||||
}));
|
||||
DO_ROLLBACKS(lt, ({
|
||||
fprintf2(cf, hf, "int toku_logger_rollback_fsize_%s (", lt->name);
|
||||
int count=0;
|
||||
DO_FIELDS(ft, lt, fprintf2(cf, hf, "%s%s %s", (count++>0)?", ":"", ft->type, ft->name));
|
||||
fprintf(hf, ");\n");
|
||||
fprintf(cf, ") {\n");
|
||||
fprintf(cf, " return 1 // the cmd");
|
||||
DO_FIELDS(ft, lt,
|
||||
fprintf(cf, "\n + toku_logsizeof_%s(%s)", ft->type, ft->name));
|
||||
fprintf(cf, ";\n}\n");
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue