1 /* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
3 #ident "$Id$"
4 /*======
5 This file is part of PerconaFT.
6 
7 
8 Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
9 
10     PerconaFT is free software: you can redistribute it and/or modify
11     it under the terms of the GNU General Public License, version 2,
12     as published by the Free Software Foundation.
13 
14     PerconaFT is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17     GNU General Public License for more details.
18 
19     You should have received a copy of the GNU General Public License
20     along with PerconaFT.  If not, see <http://www.gnu.org/licenses/>.
21 
22 ----------------------------------------
23 
24     PerconaFT is free software: you can redistribute it and/or modify
25     it under the terms of the GNU Affero General Public License, version 3,
26     as published by the Free Software Foundation.
27 
28     PerconaFT is distributed in the hope that it will be useful,
29     but WITHOUT ANY WARRANTY; without even the implied warranty of
30     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
31     GNU Affero General Public License for more details.
32 
33     You should have received a copy of the GNU Affero General Public License
34     along with PerconaFT.  If not, see <http://www.gnu.org/licenses/>.
35 ======= */
36 
37 #ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."
38 
39 #pragma once
40 
41 #include "cachetable/cachetable-internal.h"
42 
43 //
44 // Dummy callbacks for checkpointing
45 //
dummy_log_fassociate(CACHEFILE UU (cf),void * UU (p))46 static void dummy_log_fassociate(CACHEFILE UU(cf), void* UU(p)) { }
dummy_close_usr(CACHEFILE UU (cf),int UU (i),void * UU (p),bool UU (b),LSN UU (lsn))47 static void dummy_close_usr(CACHEFILE UU(cf), int UU(i), void* UU(p), bool UU(b), LSN UU(lsn))  { }
dummy_free_usr(CACHEFILE UU (cf),void * UU (p))48 static void dummy_free_usr(CACHEFILE UU(cf), void* UU(p))  { }
dummy_chckpnt_usr(CACHEFILE UU (cf),int UU (i),void * UU (p))49 static void dummy_chckpnt_usr(CACHEFILE UU(cf), int UU(i), void* UU(p)) { }
dummy_begin(LSN UU (lsn),void * UU (p))50 static void dummy_begin(LSN UU(lsn), void* UU(p)) { }
dummy_end(CACHEFILE UU (cf),int UU (i),void * UU (p))51 static void dummy_end(CACHEFILE UU(cf), int UU(i), void* UU(p)) { }
dummy_note_pin(CACHEFILE UU (cf),void * UU (p))52 static void dummy_note_pin(CACHEFILE UU(cf), void* UU(p)) { }
dummy_note_unpin(CACHEFILE UU (cf),void * UU (p))53 static void dummy_note_unpin(CACHEFILE UU(cf), void* UU(p)) { }
54 
55 //
56 // Helper function to set dummy functions in given cachefile.
57 //
UU()58 static UU() void
59 create_dummy_functions(CACHEFILE cf)
60 {
61     void *ud = NULL;
62     toku_cachefile_set_userdata(cf,
63                                ud,
64                                &dummy_log_fassociate,
65                                &dummy_close_usr,
66                                &dummy_free_usr,
67                                &dummy_chckpnt_usr,
68                                &dummy_begin,
69                                &dummy_end,
70                                &dummy_note_pin,
71                                &dummy_note_unpin);
72 };
73