1 /***************************************************************************** 2 3 Copyright (c) 2011, 2018, 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, version 2.0, as published by the 7 Free Software Foundation. 8 9 This program is also distributed with certain software (including but not 10 limited to OpenSSL) that is licensed under separate terms, as designated in a 11 particular file or component or in included license documentation. The authors 12 of MySQL hereby grant you an additional permission to link the program and 13 your derivative works with the separately licensed software that they have 14 included with MySQL. 15 16 This program is distributed in the hope that it will be useful, but WITHOUT 17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, 19 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 St, Fifth Floor, Boston, MA 02110-1301 USA 24 25 *****************************************************************************/ 26 27 /** @file include/buf0dump.h 28 Implements a buffer pool dump/load. 29 30 Created April 08, 2011 Vasil Dimov 31 *******************************************************/ 32 33 #ifndef buf0dump_h 34 #define buf0dump_h 35 36 #include "univ.i" 37 38 /** Wakes up the buffer pool dump/load thread and instructs it to start 39 a dump. This function is called by MySQL code via buffer_pool_dump_now() 40 and it should return immediately because the whole MySQL is frozen during 41 its execution. */ 42 void buf_dump_start(); 43 44 /** Wakes up the buffer pool dump/load thread and instructs it to start 45 a load. This function is called by MySQL code via buffer_pool_load_now() 46 and it should return immediately because the whole MySQL is frozen during 47 its execution. */ 48 void buf_load_start(); 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 buf_load_abort(); 54 55 /** This is the main thread for buffer pool dump/load. It waits for an 56 event and when waked up either performs a dump or load and sleeps 57 again. */ 58 void buf_dump_thread(); 59 60 /** Generate the path to the buffer pool dump/load file. 61 @param[out] path generated path 62 @param[in] path_size size of 'path', used as in snprintf(3). */ 63 void buf_dump_generate_path(char *path, size_t path_size); 64 65 #endif /* buf0dump_h */ 66