summaryrefslogtreecommitdiff
path: root/storage/myisam/ftdefs.h
diff options
context:
space:
mode:
authorunknown <svoj@poseidon.ndb.mysql.com>2005-11-06 13:13:06 +0100
committerunknown <svoj@poseidon.ndb.mysql.com>2005-11-06 13:13:06 +0100
commit66002e452d7d12e1b8f5ebf720d01a0e0aed8c96 (patch)
tree593a4ed5caa4dcceddc324b221fd0228343c9c4a /storage/myisam/ftdefs.h
parentdbfe5a961ff419d8b515532cb1008ede6f6c6d69 (diff)
downloadmariadb-git-66002e452d7d12e1b8f5ebf720d01a0e0aed8c96.tar.gz
WL#2575 - Fulltext: Parser plugin for FTS
WL#2763 - MySQL plugin interface: step 1 Manual merge from CNET tree. include/ft_global.h: Default parser added. include/my_global.h: dlopen related code moved from sql_udf.cc into my_global.h include/myisam.h: Added fulltext parser to MI_KEYDEF libmysqld/Makefile.am: Added LIBDIR macro. mysql-test/r/connect.result: Test result fixed: added plugin table mysql-test/r/information_schema.result: Test result fixed: added plugin table. mysql-test/r/mysqlcheck.result: Test result fixed: added plugin table. mysql-test/r/system_mysql_db.result: Test fixed: added plugin table mysql-test/t/system_mysql_db_fix.test: Test fixed: added plugin table scripts/mysql_create_system_tables.sh: Added mysql.plugin table. scripts/mysql_fix_privilege_tables.sql: Added mysql.plugin table. sql/Makefile.am: Added LIBDIR macro. sql/ha_myisam.cc: Pass fulltext parser from sql to myisam layer. sql/lex.h: Plugin related symbols. sql/mysqld.cc: Initialize/deinitialize plugins, pass opt_plugin_dir. plugin-dir renamed to plugin_dir. plugin_dir is relative to mysql_home now. sql/set_var.cc: plugin_dir added to SHOW VARIABLES. sql/share/errmsg.txt: Plugin related error messages. sql/sql_class.h: Added parser to Key class. Hold parser_name instead of plugin in Key class. sql/sql_lex.h: INSTALL/UNINSTALL PLUGIN commands. sql/sql_parse.cc: INSTALL/UNINSTALL PLUGIN commands. sql/sql_show.cc: SHOW CREATE TABLE: output parser name if index was created WITH PARSER. sql/sql_table.cc: Pass fulltext parser from yacc to sql layer. sql/sql_udf.cc: dlopen related code moved into my_global.h. Implemented better check for UDF path. UDF loads libraries that are under plugin_dir now. sql/sql_yacc.yy: INSTALL/UNINSTALL PLUGIN syntax. Added WITH PARSER syntax to CREATE/ALTER TABLE/INDEX. opt_fulltext_parser must allocate memory, since it will be used afterwards. sql/table.cc: Save/restore fulltext parser in extra data segment. Added DBUG_PRINTs. storage/myisam/ft_boolean_search.c: Split functions so they can be used by fulltext parser. Use fulltext parser if specified. storage/myisam/ft_nlq_search.c: Use fulltext parser. storage/myisam/ft_parser.c: Split functions so they can be used by fulltext parser. Use fulltext parser if specified. storage/myisam/ft_static.c: Default fulltext parser added. storage/myisam/ft_update.c: Use fulltext parser. storage/myisam/ftdefs.h: FTB_PARAM moved into plugin.h and renamed to MYSQL_FTPARSER_BOOLEAN_INFO. storage/myisam/mi_open.c: Set default parser.
Diffstat (limited to 'storage/myisam/ftdefs.h')
-rw-r--r--storage/myisam/ftdefs.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/storage/myisam/ftdefs.h b/storage/myisam/ftdefs.h
index 91c679a1e58..11a283e0eb3 100644
--- a/storage/myisam/ftdefs.h
+++ b/storage/myisam/ftdefs.h
@@ -22,6 +22,7 @@
#include <m_ctype.h>
#include <my_tree.h>
#include <queues.h>
+#include <plugin.h>
#define true_word_char(s,X) (my_isalnum(s,X) || (X)=='_')
#define misc_word_char(X) ((X)=='\'')
@@ -98,20 +99,12 @@ typedef struct st_ft_word {
double weight;
} FT_WORD;
-typedef struct st_ftb_param {
- byte prev;
- int yesno;
- int plusminus;
- bool pmsign;
- bool trunc;
- byte *quot;
-} FTB_PARAM;
-
int is_stopword(char *word, uint len);
uint _ft_make_key(MI_INFO *, uint , byte *, FT_WORD *, my_off_t);
-byte ft_get_word(CHARSET_INFO *, byte **, byte *, FT_WORD *, FTB_PARAM *);
+byte ft_get_word(CHARSET_INFO *, byte **, byte *, FT_WORD *,
+ MYSQL_FTPARSER_BOOLEAN_INFO *);
byte ft_simple_get_word(CHARSET_INFO *, byte **, const byte *,
FT_WORD *, my_bool);
@@ -126,7 +119,7 @@ void _mi_ft_segiterator_dummy_init(const byte *, uint, FT_SEG_ITERATOR *);
uint _mi_ft_segiterator(FT_SEG_ITERATOR *);
void ft_parse_init(TREE *, CHARSET_INFO *);
-int ft_parse(TREE *, byte *, int, my_bool);
+int ft_parse(TREE *, byte *, int, my_bool, struct st_mysql_ftparser *parser);
FT_WORD * ft_linearize(TREE *);
FT_WORD * _mi_ft_parserecord(MI_INFO *, uint, const byte *);
uint _mi_ft_parse(TREE *, MI_INFO *, uint, const byte *, my_bool);