MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
File_parser Class Reference
Inheritance diagram for File_parser:
Collaboration diagram for File_parser:

Public Member Functions

my_bool ok ()
const LEX_STRINGtype () const
my_bool parse (uchar *base, MEM_ROOT *mem_root, struct File_option *parameters, uint required, Unknown_key_hook *hook) const

Friends

File_parsersql_parse_prepare (const LEX_STRING *file_name, MEM_ROOT *mem_root, bool bad_format_errors)

Additional Inherited Members

- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Detailed Description

Definition at line 98 of file parse_file.h.

Member Function Documentation

my_bool File_parser::parse ( uchar *  base,
MEM_ROOT mem_root,
struct File_option parameters,
uint  required,
Unknown_key_hook hook 
) const

parse parameters.

Parameters
basebase address for parameter writing (structure like TABLE)
mem_rootMEM_ROOT for parameters allocation
parametersparameters description
requirednumber of required parameters in above list. If the file contains more parameters than "required", they will be ignored. If the file contains less parameters then "required", non-existing parameters will remain their values.
hookhook called for unknown keys
hook_datasome data specific for the hook
Return values
FALSEOK
TRUEerror

Definition at line 694 of file parse_file.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

File_parser* sql_parse_prepare ( const LEX_STRING file_name,
MEM_ROOT mem_root,
bool  bad_format_errors 
)
friend

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

Definition at line 362 of file parse_file.cc.


The documentation for this class was generated from the following files: