diff options
author | unknown <serg@serg.mylan> | 2006-05-30 18:15:18 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2006-05-30 18:15:18 +0200 |
commit | 15a13203f198102a74462cc5ffb5bbb8dc652a3f (patch) | |
tree | b1cfd64caab412e06dc9f1423722025c190d194f /include/mysql/plugin.h | |
parent | f1bb09e777427145f614c52488ead02a62e062e2 (diff) | |
download | mariadb-git-15a13203f198102a74462cc5ffb5bbb8dc652a3f.tar.gz |
Now ftparser does not need to bother about memory management -
it can tell MySQL to make a copy of everything (bug#17123)
include/mysql/plugin.h:
Now ftparser does not need to bother about memory management -
it can tell MySQL to make a copy of everything (bug#17123)
MYSQL_FTFLAGS_NEED_COPY flag
storage/myisam/ft_boolean_search.c:
param->flags
storage/myisam/ft_nlq_search.c:
param->flags. ft_parse takes a mem_root as an argument
storage/myisam/ft_parser.c:
ftparser takes a memroot as an argument. words are copied there, if necessary.
memroot is reset for every parsing and free'd at the end of the statement.
storage/myisam/ft_update.c:
ftparser takes a memroot as an argument. words are copied there, if necessary.
memroot is reset for every parsing and free'd at the end of the statement.
storage/myisam/ftdefs.h:
ftparser takes a memroot as an argument. words are copied there, if necessary.
memroot is reset for every parsing and free'd at the end of the statement.
storage/myisam/mi_check.c:
ftparser takes a memroot as an argument. words are copied there, if necessary
storage/myisam/myisamdef.h:
memroot for ftparser in MI_INFO and MI_SORT_PARAM
storage/myisam/sort.c:
free ftparser memroot
Diffstat (limited to 'include/mysql/plugin.h')
-rw-r--r-- | include/mysql/plugin.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index a47b1099eef..728b62ab2f4 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -201,6 +201,17 @@ typedef struct st_mysql_ftparser_boolean_info char *quot; } MYSQL_FTPARSER_BOOLEAN_INFO; +/* + The following flag means that buffer with a string (document, word) + may be overwritten by the caller before the end of the parsing (that is + before st_mysql_ftparser::deinit() call). If one needs the string + to survive between two successive calls of the parsing function, she + needs to save a copy of it. The flag may be set by MySQL before calling + st_mysql_ftparser::parse(), or it may be set by a plugin before calling + st_mysql_ftparser_param::mysql_parse() or + st_mysql_ftparser_param::mysql_add_word(). +*/ +#define MYSQL_FTFLAGS_NEED_COPY 1 /* An argument of the full-text parser plugin. This structure is @@ -234,8 +245,10 @@ typedef struct st_mysql_ftparser_boolean_info length: Length of the document or query string, in bytes. + flags: See MYSQL_FTFLAGS_* constants above. + mode: The parsing mode. With boolean operators, with stopwords, or - nothing. See MYSQL_FTPARSER_* constants above. + nothing. See enum_ftparser_mode above. */ typedef struct st_mysql_ftparser_param @@ -250,6 +263,7 @@ typedef struct st_mysql_ftparser_param struct charset_info_st *cs; char *doc; int length; + int flags; enum enum_ftparser_mode mode; } MYSQL_FTPARSER_PARAM; |