23#ifndef BOOTSTRAP_IMPL_H
24#define BOOTSTRAP_IMPL_H 1
41 virtual bool begin(
void) {
return false; }
54 virtual void end(
void) {}
Abstract interface to reading bootstrap commands.
Definition: bootstrap_impl.h:32
virtual void end(void)
End processing the iterator.
Definition: bootstrap_impl.h:54
void(* log_function_t)(const char *message)
Definition: bootstrap_impl.h:34
virtual int next(std::string &query)=0
Get the next query string.
virtual bool begin(void)
start processing the iterator
Definition: bootstrap_impl.h:41
Command_iterator()=default
~Command_iterator()=default
virtual void report_error_details(log_function_t log)=0
File bootstrap command reader.
Definition: bootstrap_impl.h:62
fgets_fn_t m_fgets_fn
Definition: bootstrap_impl.h:78
virtual ~File_command_iterator()
int next(std::string &query) override
Get the next query string.
Definition: bootstrap.cc:71
File_command_iterator(const char *file_name, MYSQL_FILE *input, fgets_fn_t fgets_fn)
Definition: bootstrap_impl.h:64
void report_error_details(log_function_t log) override
Definition: bootstrap.cc:84
bootstrap_parser_state m_parser_state
Definition: bootstrap_impl.h:76
MYSQL_FILE * m_input
Definition: bootstrap_impl.h:77
static char * query
Definition: myisam_ftdump.cc:46
Definition: bootstrap.cc:69
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:93
char *(* fgets_fn_t)(char *, size_t, MYSQL_FILE *, int *error)
Definition: sql_bootstrap.h:58
An instrumented FILE structure.
Definition: mysql_file.h:483
Definition: sql_bootstrap.h:89
void init(const char *filename)
Definition: sql_bootstrap.cc:38