同步操作将从 nwsuafzq/MySQLAdvisor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; version 2 of the License.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */#ifndef _my_plugin_ftparser_h#define _my_plugin_ftparser_h#include "plugin.h"/*************************************************************************API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)*/#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */enum enum_ftparser_mode{/*Fast and simple mode. This mode is used for indexing, and naturallanguage queries.The parser is expected to return only those words that go into theindex. Stopwords or too short/long words should not be returned. The'boolean_info' argument of mysql_add_word() does not have to be set.*/MYSQL_FTPARSER_SIMPLE_MODE= 0,/*Parse with stopwords mode. This mode is used in boolean searches for"phrase matching."The parser is not allowed to ignore words in this mode. Every wordshould be returned, including stopwords and words that are too shortor long. The 'boolean_info' argument of mysql_add_word() does nothave to be set.*/MYSQL_FTPARSER_WITH_STOPWORDS= 1,/*Parse in boolean mode. This mode is used to parse a boolean query string.The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFOstructure in the 'boolean_info' argument to mysql_add_word().Usually that means that the parser should recognize boolean operatorsin the parsing stream and set appropriate fields inMYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As forMYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored.Instead, use FT_TOKEN_STOPWORD for the token type of such a word.*/MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2};/*Token types for boolean mode searching (used for the type member ofMYSQL_FTPARSER_BOOLEAN_INFO struct)FT_TOKEN_EOF: End of data.FT_TOKEN_WORD: Regular word.FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression).FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression).FT_TOKEN_STOPWORD: Stopword.*/enum enum_ft_token_type{FT_TOKEN_EOF= 0,FT_TOKEN_WORD= 1,FT_TOKEN_LEFT_PAREN= 2,FT_TOKEN_RIGHT_PAREN= 3,FT_TOKEN_STOPWORD= 4};/*This structure is used in boolean search mode only. It conveysboolean-mode metadata to the MySQL search engine for every word inthe search query. A valid instance of this structure must be filledin by the plugin parser and passed as an argument in the call tomysql_add_word (the callback function in the MYSQL_FTPARSER_PARAMstructure) when a query is parsed in boolean mode.type: The token type. Should be one of the enum_ft_token_type values.yesno: Whether the word must be present for a match to occur:>0 Must be present<0 Must not be present0 Neither; the word is optional but its presence increases the relevanceWith the default settings of the ft_boolean_syntax system variable,>0 corresponds to the '+' operator, <0 corrresponds to the '-' operator,and 0 means neither operator was used.weight_adjust: A weighting factor that determines how much a matchfor the word counts. Positive values increase, negative - decrease therelative word's importance in the query.wasign: The sign of the word's weight in the query. If it's non-negativethe match for the word will increase document relevance, if it'snegative - decrease (the word becomes a "noise word", the less of it thebetter).trunc: Corresponds to the '*' operator in the default setting of theft_boolean_syntax system variable.*/typedef struct st_mysql_ftparser_boolean_info{enum enum_ft_token_type type;int yesno;int weight_adjust;char wasign;char trunc;/* These are parser state and must be removed. */char prev;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 isbefore st_mysql_ftparser::deinit() call). If one needs the stringto survive between two successive calls of the parsing function, sheneeds to save a copy of it. The flag may be set by MySQL before callingst_mysql_ftparser::parse(), or it may be set by a plugin before callingst_mysql_ftparser_param::mysql_parse() orst_mysql_ftparser_param::mysql_add_word().*/#define MYSQL_FTFLAGS_NEED_COPY 1/*An argument of the full-text parser plugin. This structure isfilled in by MySQL server and passed to the parsing function of theplugin as an in/out parameter.mysql_parse: A pointer to the built-in parser implementation of theserver. It's set by the server and can be used by the parser pluginto invoke the MySQL default parser. If plugin's role is to extracttextual data from .doc, .pdf or .xml content, it might extractplaintext from the content, and then pass the text to the defaultMySQL parser to be parsed.mysql_add_word: A server callback to add a new word. When parsinga document, the server sets this to point at a function that addsthe word to MySQL full-text index. When parsing a search query,this function will add the new word to the list of words to searchfor. The boolean_info argument can be NULL for all cases exceptwhen mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO.ftparser_state: A generic pointer. The plugin can set it to pointto information to be used internally for its own purposes.mysql_ftparam: This is set by the server. It is used by MySQL functionscalled via mysql_parse() and mysql_add_word() callback. The pluginshould not modify it.cs: Information about the character set of the document or query string.doc: A pointer to the document or query string to be parsed.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, ornothing. See enum_ftparser_mode above.*/typedef struct st_mysql_ftparser_param{int (*mysql_parse)(struct st_mysql_ftparser_param *,char *doc, int doc_len);int (*mysql_add_word)(struct st_mysql_ftparser_param *,char *word, int word_len,MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);void *ftparser_state;void *mysql_ftparam;const struct charset_info_st *cs;char *doc;int length;int flags;enum enum_ftparser_mode mode;} MYSQL_FTPARSER_PARAM;/*Full-text parser descriptor.interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION.The parsing, initialization, and deinitialization functions areinvoked per SQL statement for which the parser is used.*/struct st_mysql_ftparser{int interface_version;int (*parse)(MYSQL_FTPARSER_PARAM *param);int (*init)(MYSQL_FTPARSER_PARAM *param);int (*deinit)(MYSQL_FTPARSER_PARAM *param);};#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。