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