MySQL  8.0.18
Source Code Documentation
sql_initialize.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program 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, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef SQL_INITIALIZE_H
24 #define SQL_INITIALIZE_H 1
25 
26 #include <string>
27 
28 #include "sql/bootstrap_impl.h"
29 
31  public:
34  virtual bool begin(void) override;
35  int next(std::string &query) override;
36  void report_error_details(log_function_t log) override;
37  virtual void end(void) override;
38 
39  private:
40  int m_cmds_ofs{0};
41  int m_cmd_ofs{0};
42 };
43 
44 extern bool opt_initialize_insecure;
45 bool initialize_create_data_directory(const char *data_home);
47 
48 #endif /* SQL_INITIALIZE_H */
Abstract interface to reading bootstrap commands.
Definition: bootstrap_impl.h:32
static char * query
Definition: myisam_ftdump.cc:44
Compiled_in_command_iterator()
Definition: sql_initialize.h:32
int m_cmds_ofs
Definition: sql_initialize.h:40
int next(std::string &query) override
Get the next query string.
Definition: sql_initialize.cc:184
Definition: sql_initialize.h:30
virtual bool begin(void) override
start processing the iterator
Definition: sql_initialize.cc:145
bool opt_initialize_insecure
Definition: sql_initialize.cc:63
bool mysql_initialize_directory_freshly_created
True if –initialize has actually created the directory.
Definition: sql_initialize.cc:65
bool initialize_create_data_directory(const char *data_home)
Create the data directory.
Definition: sql_initialize.cc:231
virtual void end(void) override
End processing the iterator.
Definition: sql_initialize.cc:213
int m_cmd_ofs
Definition: sql_initialize.h:41
void(* log_function_t)(const char *message)
Definition: bootstrap_impl.h:34
void report_error_details(log_function_t log) override
Definition: sql_initialize.cc:201
virtual ~Compiled_in_command_iterator()
Definition: sql_initialize.h:33