MySQL 9.0.0
Source Code Documentation
|
#include "sql/parse_file.h"
#include <fcntl.h>
#include <limits.h>
#include <string.h>
#include "my_alloc.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_dir.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_sys.h"
#include "mysql/psi/mysql_file.h"
#include "mysql/strings/my_strtoll10.h"
#include "mysqld_error.h"
#include "sql/mysqld.h"
#include "sql/sql_list.h"
Functions | |
File_parser * | sql_parse_prepare (const LEX_STRING *file_name, MEM_ROOT *mem_root, bool bad_format_errors) |
Prepare frm to parse (read to memory). More... | |
static const char * | parse_string (const char *ptr, const char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
parse LEX_STRING. More... | |
static bool | read_escaped_string (const char *ptr, const char *eol, LEX_STRING *str) |
read escaped string from ptr to eol in already allocated str. More... | |
static const char * | parse_escaped_string (const char *ptr, const char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
parse \n delimited escaped string. More... | |
static const char * | parse_quoted_escaped_string (const char *ptr, const char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
parse '' delimited escaped string. More... | |
bool | get_file_options_ulllist (const char *&ptr, const char *end, const char *line, uchar *base, File_option *parameter, MEM_ROOT *mem_root) |
Parser for FILE_OPTIONS_ULLLIST type value. More... | |
Variables | |
File_parser_dummy_hook | file_parser_dummy_hook |
bool get_file_options_ulllist | ( | const char *& | ptr, |
const char * | end, | ||
const char * | line, | ||
uchar * | base, | ||
File_option * | parameter, | ||
MEM_ROOT * | mem_root | ||
) |
Parser for FILE_OPTIONS_ULLLIST type value.
[in,out] | ptr | pointer to parameter |
[in] | end | end of the configuration |
[in] | line | pointer to the line beginning |
[in] | base | base address for parameter writing (structure like TABLE) |
[in] | parameter | description |
[in] | mem_root | MEM_ROOT for parameters allocation |
|
static |
parse \n delimited escaped string.
ptr | pointer on string beginning |
end | pointer on symbol after parsed string end (still owned by buffer and can be accessed |
mem_root | MEM_ROOT for parameter allocation |
str | pointer on string, where results should be stored |
0 | error |
|
static |
parse '' delimited escaped string.
ptr | pointer on string beginning |
end | pointer on symbol after parsed string end (still owned by buffer and can be accessed |
mem_root | MEM_ROOT for parameter allocation |
str | pointer on string, where results should be stored |
0 | error |
|
static |
parse LEX_STRING.
ptr | pointer on string beginning |
end | pointer on symbol after parsed string end (still owned by buffer and can be accessed |
mem_root | MEM_ROOT for parameter allocation |
str | pointer on string, where results should be stored |
0 | error |
|
static |
read escaped string from ptr to eol in already allocated str.
ptr | pointer on string beginning |
eol | pointer on character after end of string |
str | target string |
false | OK |
true | error |
File_parser * sql_parse_prepare | ( | const LEX_STRING * | file_name, |
MEM_ROOT * | mem_root, | ||
bool | bad_format_errors | ||
) |
Prepare frm to parse (read to memory).
file_name | path & filename to .frm file |
mem_root | MEM_ROOT for buffer allocation |
bad_format_errors | send errors on bad content |
File_parser_dummy_hook file_parser_dummy_hook |