summaryrefslogtreecommitdiff
path: root/sql/parse_file.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2015-03-10 10:24:20 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2015-03-11 17:39:15 +0100
commit80f03abcca0d902a876d10e6c1dc8c4c6d3b2bfa (patch)
tree3cf78175d7303f3736c6df7786ea9a7ad75b24a2 /sql/parse_file.h
parent3aa1a600bb3cc72dd30edd8f1c41b90e1157a2ed (diff)
downloadmariadb-git-80f03abcca0d902a876d10e6c1dc8c4c6d3b2bfa.tar.gz
MDEV-7671: Cache VIEW definitions in the TDC
(changes of backported patch are very small: strlen removed, error processing fixed, view open statistics added)
Diffstat (limited to 'sql/parse_file.h')
-rw-r--r--sql/parse_file.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/sql/parse_file.h b/sql/parse_file.h
index 2a0266e98b7..e4756e6c8af 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -58,8 +58,8 @@ class Unknown_key_hook
public:
Unknown_key_hook() {} /* Remove gcc warning */
virtual ~Unknown_key_hook() {} /* Remove gcc warning */
- virtual bool process_unknown_string(char *&unknown_key, uchar* base,
- MEM_ROOT *mem_root, char *end)= 0;
+ virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
+ MEM_ROOT *mem_root, const char *end)= 0;
};
@@ -69,18 +69,20 @@ class File_parser_dummy_hook: public Unknown_key_hook
{
public:
File_parser_dummy_hook() {} /* Remove gcc warning */
- virtual bool process_unknown_string(char *&unknown_key, uchar* base,
- MEM_ROOT *mem_root, char *end);
+ virtual bool process_unknown_string(const char *&unknown_key, uchar* base,
+ MEM_ROOT *mem_root, const char *end);
};
extern File_parser_dummy_hook file_parser_dummy_hook;
-bool get_file_options_ulllist(char *&ptr, char *end, char *line,
- uchar* base, File_option *parameter,
+bool get_file_options_ulllist(const char *&ptr, const char *end,
+ const char *line, uchar* base,
+ File_option *parameter,
MEM_ROOT *mem_root);
-char *
-parse_escaped_string(char *ptr, char *end, MEM_ROOT *mem_root, LEX_STRING *str);
+const char *
+parse_escaped_string(const char *ptr, const char *end, MEM_ROOT *mem_root,
+ LEX_STRING *str);
class File_parser;
File_parser *sql_parse_prepare(const LEX_STRING *file_name,
@@ -96,18 +98,18 @@ my_bool rename_in_schema_file(THD *thd,
class File_parser: public Sql_alloc
{
- char *buff, *start, *end;
+ char *start, *end;
LEX_STRING file_type;
bool content_ok;
public:
- File_parser() :buff(0), start(0), end(0), content_ok(0)
+ File_parser() :start(0), end(0), content_ok(0)
{ file_type.str= 0; file_type.length= 0; }
bool ok() { return content_ok; }
- LEX_STRING *type() { return &file_type; }
+ const LEX_STRING *type() const { return &file_type; }
my_bool parse(uchar* base, MEM_ROOT *mem_root,
struct File_option *parameters, uint required,
- Unknown_key_hook *hook);
+ Unknown_key_hook *hook) const;
friend File_parser *sql_parse_prepare(const LEX_STRING *file_name,
MEM_ROOT *mem_root,