24#ifndef SQL_BOOTSTRAP_H
25#define SQL_BOOTSTRAP_H
40#define MAX_BOOTSTRAP_QUERY_SIZE 74000
45#define MAX_BOOTSTRAP_LINE_SIZE 74000
std::unique_ptr< T, Free_deleter > unique_ptr_free
std::unique_ptr, but with free as deleter.
Definition: map_helpers.h:105
static char * query
Definition: myisam_ftdump.cc:45
const char * filename
Definition: pfs_example_component_population.cc:67
code_parsing_state
Definition: sql_bootstrap.h:68
@ IN_SLASH_STAR_COMMENT
Parsing a '/''*' comment.
Definition: sql_bootstrap.h:78
@ IN_DOUBLE_QUOTE
Parsing a "literal" string.
Definition: sql_bootstrap.h:74
@ IN_SINGLE_QUOTE
Parsing a 'literal' string.
Definition: sql_bootstrap.h:72
@ NORMAL
Parsing sql code.
Definition: sql_bootstrap.h:70
@ IN_POUND_COMMENT
Parsing a '#' comment.
Definition: sql_bootstrap.h:80
@ IN_DASH_DASH_COMMENT
Parsing a "--" comment.
Definition: sql_bootstrap.h:76
delimiter_state
Definition: sql_bootstrap.h:61
@ DELIMITER_DOLLAR_DOLLAR
Delimiter is "$$".
Definition: sql_bootstrap.h:65
@ DELIMITER_SEMICOLON
Delimiter is ';'.
Definition: sql_bootstrap.h:63
char *(* fgets_fn_t)(char *, size_t, MYSQL_FILE *, int *error)
Definition: sql_bootstrap.h:59
int read_bootstrap_query(char *query, size_t *query_length, MYSQL_FILE *input, fgets_fn_t fgets_fn, bootstrap_parser_state *state)
Definition: sql_bootstrap.cc:109
bootstrap_error
Definition: sql_bootstrap.h:47
@ READ_BOOTSTRAP_EOF
Definition: sql_bootstrap.h:49
@ READ_BOOTSTRAP_DQ_NOT_TERMINATED
Definition: sql_bootstrap.h:53
@ READ_BOOTSTRAP_SUCCESS
Definition: sql_bootstrap.h:48
@ READ_BOOTSTRAP_COMMENT_NOT_TERMINATED
Definition: sql_bootstrap.h:54
@ READ_BOOTSTRAP_IO
Definition: sql_bootstrap.h:50
@ READ_BOOTSTRAP_SQ_NOT_TERMINATED
Definition: sql_bootstrap.h:52
@ READ_BOOTSTRAP_DELIMITER
Definition: sql_bootstrap.h:51
@ READ_BOOTSTRAP_QUERY_SIZE
Definition: sql_bootstrap.h:55
@ READ_BOOTSTRAP_ERROR
Definition: sql_bootstrap.h:56
An instrumented FILE structure.
Definition: mysql_file.h:483
Definition: sql_bootstrap.h:83
void init()
Definition: sql_bootstrap.cc:34
size_t m_line
Definition: sql_bootstrap.h:86
size_t m_column
Definition: sql_bootstrap.h:87
Definition: sql_bootstrap.h:90
enum bootstrap_error m_last_error
Definition: sql_bootstrap.h:108
void init(const char *filename)
Definition: sql_bootstrap.cc:39
size_t m_unget_buffer_length
Definition: sql_bootstrap.h:96
delimiter_state m_delimiter
Definition: sql_bootstrap.h:103
bootstrap_parser_position m_last_delimiter
Definition: sql_bootstrap.h:111
const char * m_filename
Definition: sql_bootstrap.h:106
bootstrap_parser_position m_last_query_start
Definition: sql_bootstrap.h:115
void(* log_function_t)(const char *message)
Definition: sql_bootstrap.h:98
bootstrap_parser_position m_last_open_comment
Definition: sql_bootstrap.h:114
unique_ptr_free< char > m_unget_buffer
Definition: sql_bootstrap.h:95
void report_error_details(log_function_t log)
Definition: sql_bootstrap.cc:55
bootstrap_parser_position m_last_open_double_quote
Definition: sql_bootstrap.h:113
int m_io_sub_error
Definition: sql_bootstrap.h:109
code_parsing_state m_code_state
Definition: sql_bootstrap.h:104
bootstrap_parser_position m_last_open_single_quote
Definition: sql_bootstrap.h:112
size_t m_current_line
Definition: sql_bootstrap.h:107