MySQL 9.0.0
Source Code Documentation
parse_file.h File Reference
#include <stddef.h>
#include <sys/types.h>
#include "lex_string.h"
#include "my_inttypes.h"

Go to the source code of this file.

Classes

struct  File_option
 
class  Unknown_key_hook
 This hook used to catch no longer supported keys and process them for backward compatibility. More...
 
class  File_parser_dummy_hook
 Dummy hook for parsers which do not need hook for unknown keys. More...
 
class  File_parser
 

Macros

#define PARSE_FILE_TIMESTAMPLENGTH   19
 

Enumerations

enum  file_opt_type {
  FILE_OPTIONS_STRING , FILE_OPTIONS_ESTRING , FILE_OPTIONS_ULONGLONG , FILE_OPTIONS_TIMESTAMP ,
  FILE_OPTIONS_STRLIST , FILE_OPTIONS_ULLLIST
}
 

Functions

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...
 
File_parsersql_parse_prepare (const LEX_STRING *file_name, MEM_ROOT *mem_root, bool bad_format_errors)
 Prepare frm to parse (read to memory). More...
 

Variables

File_parser_dummy_hook file_parser_dummy_hook
 

Macro Definition Documentation

◆ PARSE_FILE_TIMESTAMPLENGTH

#define PARSE_FILE_TIMESTAMPLENGTH   19

Enumeration Type Documentation

◆ file_opt_type

Enumerator
FILE_OPTIONS_STRING 

String (LEX_STRING)

FILE_OPTIONS_ESTRING 

Escaped string (LEX_STRING)

FILE_OPTIONS_ULONGLONG 

ulonglong parameter (ulonglong)

FILE_OPTIONS_TIMESTAMP 

timestamp (LEX_STRING have to be allocated with length 20 (19+1)

FILE_OPTIONS_STRLIST 

list of escaped strings (List<LEX_STRING>)

FILE_OPTIONS_ULLLIST 

list of ulonglong values (List<ulonglong>)

Function Documentation

◆ get_file_options_ulllist()

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.

Parameters
[in,out]ptrpointer to parameter
[in]endend of the configuration
[in]linepointer to the line beginning
[in]basebase address for parameter writing (structure like TABLE)
[in]parameterdescription
[in]mem_rootMEM_ROOT for parameters allocation

◆ sql_parse_prepare()

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).

Parameters
file_namepath & filename to .frm file
mem_rootMEM_ROOT for buffer allocation
bad_format_errorssend errors on bad content
Note
returned pointer + 1 will be type of .frm
Returns
0 - error
parser object

Variable Documentation

◆ file_parser_dummy_hook

File_parser_dummy_hook file_parser_dummy_hook
extern