1 /*****************************************************************************
2 
3 Copyright (c) 2011, 2011, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License, version 2.0,
7 as published by the Free Software Foundation.
8 
9 This program is also distributed with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation.  The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have included with MySQL.
15 
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License, version 2.0, for more details.
20 
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
24 
25 *****************************************************************************/
26 
27 /**************************************************//**
28 @file buf/buf0dump.h
29 Implements a buffer pool dump/load.
30 
31 Created April 08, 2011 Vasil Dimov
32 *******************************************************/
33 
34 #ifndef buf0dump_h
35 #define buf0dump_h
36 
37 #include "univ.i"
38 
39 /*****************************************************************//**
40 Wakes up the buffer pool dump/load thread and instructs it to start
41 a dump. This function is called by MySQL code via buffer_pool_dump_now()
42 and it should return immediately because the whole MySQL is frozen during
43 its execution. */
44 UNIV_INTERN
45 void
46 buf_dump_start();
47 /*============*/
48 
49 /*****************************************************************//**
50 Wakes up the buffer pool dump/load thread and instructs it to start
51 a load. This function is called by MySQL code via buffer_pool_load_now()
52 and it should return immediately because the whole MySQL is frozen during
53 its execution. */
54 UNIV_INTERN
55 void
56 buf_load_start();
57 /*============*/
58 
59 /*****************************************************************//**
60 Aborts a currently running buffer pool load. This function is called by
61 MySQL code via buffer_pool_load_abort() and it should return immediately
62 because the whole MySQL is frozen during its execution. */
63 UNIV_INTERN
64 void
65 buf_load_abort();
66 /*============*/
67 
68 /*****************************************************************//**
69 This is the main thread for buffer pool dump/load. It waits for an
70 event and when waked up either performs a dump or load and sleeps
71 again.
72 @return this function does not return, it calls os_thread_exit() */
73 extern "C" UNIV_INTERN
74 os_thread_ret_t
75 DECLARE_THREAD(buf_dump_thread)(
76 /*============================*/
77 	void*	arg);				/*!< in: a dummy parameter
78 						required by os_thread_create */
79 
80 #endif /* buf0dump_h */
81