summaryrefslogtreecommitdiff
path: root/sql/parse_file.h
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2005-11-20 20:47:07 +0200
committerbell@sanja.is.com.ua <>2005-11-20 20:47:07 +0200
commit806f9e24ff1e9409d6b833c4ec1c07d3e45272c3 (patch)
tree178b80a009c667cc88b5c83cbe9636892d375946 /sql/parse_file.h
parentb13dd4ff72b55b0f015d181d99a48828017f2797 (diff)
downloadmariadb-git-806f9e24ff1e9409d6b833c4ec1c07d3e45272c3.tar.gz
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed. The incorrect length in the trigger file configuration descriptor fixed (BUG#14090). A hook for unknown keys added to the parser to support old .TRG files.
Diffstat (limited to 'sql/parse_file.h')
-rw-r--r--sql/parse_file.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/sql/parse_file.h b/sql/parse_file.h
index b4199e4fbf1..afa88da2ead 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -40,6 +40,35 @@ struct File_option
file_opt_type type; /* Option type */
};
+
+/*
+ This hook used to catch no longer supported keys and process them for
+ backward compatibility.
+*/
+
+class Unknown_key_hook
+{
+public:
+ virtual bool process_unknown_string(char *&unknown_key, gptr base,
+ MEM_ROOT *mem_root, char *end)= 0;
+};
+
+
+/* Dummy hook for parsers which do not need hook for unknown keys */
+
+class File_parser_dummy_hook: public Unknown_key_hook
+{
+public:
+ virtual bool process_unknown_string(char *&unknown_key, gptr base,
+ MEM_ROOT *mem_root, char *end);
+};
+
+extern File_parser_dummy_hook file_parser_dummy_hook;
+
+bool get_file_options_ulllist(char *&ptr, char *end, char *line,
+ gptr base, File_option *parameter,
+ MEM_ROOT *mem_root);
+
class File_parser;
File_parser *sql_parse_prepare(const LEX_STRING *file_name,
MEM_ROOT *mem_root, bool bad_format_errors);
@@ -64,7 +93,8 @@ public:
my_bool ok() { return content_ok; }
LEX_STRING *type() { return &file_type; }
my_bool parse(gptr base, MEM_ROOT *mem_root,
- struct File_option *parameters, uint required);
+ struct File_option *parameters, uint required,
+ Unknown_key_hook *hook);
friend File_parser *sql_parse_prepare(const LEX_STRING *file_name,
MEM_ROOT *mem_root,