34#ifndef INNOBASE_FST0AST_H
35#define INNOBASE_FST0AST_H
dberr_t
Definition: db0err.h:39
fts_ast_oper_t
Definition: fts0ast.h:55
@ FTS_IGNORE_SKIP
Transient node operator signifies that this is a FTS_IGNORE node, and ignored in the first pass of ft...
Definition: fts0ast.h:75
@ FTS_EXIST_SKIP
Transient node operator signifies that this ia a FTS_EXIST node, and ignored in the first pass of fts...
Definition: fts0ast.h:80
@ FTS_DISTANCE
Proximity distance.
Definition: fts0ast.h:74
@ FTS_INCR_RATING
Increase the rank for this word.
Definition: fts0ast.h:68
@ FTS_DECR_RATING
Decrease the rank for this word.
Definition: fts0ast.h:71
@ FTS_EXIST
Include rows that contain this word.
Definition: fts0ast.h:61
@ FTS_NONE
No operator.
Definition: fts0ast.h:56
@ FTS_IGNORE
Ignore rows that contain this word.
Definition: fts0ast.h:58
@ FTS_NEGATE
Include rows that contain this word but rank them lower.
Definition: fts0ast.h:64
void fts_ast_string_free(fts_ast_string_t *ast_str)
Free an ast string instance.
Definition: fts0ast.cc:677
fts_lexer_t * fts_lexer_create(bool boolean_mode, const byte *query, ulint query_len)
Definition: fts0pars.cc:1923
void fts_ast_text_set_distance(fts_ast_node_t *node, ulint distance)
in: the text proximity distance
Definition: fts0ast.cc:382
fts_ast_node_t * fts_ast_add_node(fts_ast_node_t *list, fts_ast_node_t *node)
in: (sub) expr to add
Definition: fts0ast.cc:335
void fts_lexer_free(fts_lexer_t *fts_lexer)
in: lexer instance to free
Definition: fts0pars.cc:1953
bool fts_ast_node_check_union(fts_ast_node_t *node)
Check only union operation involved in the node.
Definition: fts0ast.cc:493
fts_ast_node_t * fts_ast_create_node_term_for_parser(void *arg, const char *ptr, const ulint len)
Create an AST term node, makes a copy of ptr for plugin parser.
Definition: fts0ast.cc:162
fts_ast_node_t * fts_ast_create_node_subexp_list(void *arg, fts_ast_node_t *expr)
in: ast expr instance
Definition: fts0ast.cc:262
const char * fts_ast_node_type_get(fts_ast_type_t type)
Definition: fts0ast.cc:694
dberr_t(* fts_ast_callback)(fts_ast_oper_t, fts_ast_node_t *, void *)
Definition: fts0ast.h:93
int fts_parse(fts_ast_state_t *state)
in: ast state instance.
Definition: fts0pars.cc:1984
fts_ast_node_t * fts_ast_free_node(fts_ast_node_t *node)
Free a fts_ast_node_t instance.
Definition: fts0ast.cc:290
ulint fts_ast_string_to_ul(const fts_ast_string_t *ast_str, int base)
Translate ast string of type FTS_AST_NUMB to unsigned long by strtoul.
Definition: fts0ast.cc:689
fts_ast_node_t * fts_ast_create_node_phrase_list(void *arg)
Create an AST phrase list node for plugin parser.
Definition: fts0ast.cc:228
fts_ast_node_t * fts_ast_create_node_list(void *arg, fts_ast_node_t *expr)
in: ast expr
Definition: fts0ast.cc:245
fts_ast_string_t * fts_ast_string_create(const byte *str, ulint len)
Create an ast string object, with NUL-terminator, so the string has one more byte than len.
Definition: fts0ast.cc:656
fts_ast_node_t * fts_ast_create_node_term(void *arg, const fts_ast_string_t *ptr)
in: term string
Definition: fts0ast.cc:98
fts_ast_type_t
Definition: fts0ast.h:41
@ FTS_AST_NUMB
Number.
Definition: fts0ast.h:43
@ FTS_AST_TERM
Term (or word)
Definition: fts0ast.h:44
@ FTS_AST_PARSER_PHRASE_LIST
Phase for plugin parser The difference from text type is that we tokenize text into term list.
Definition: fts0ast.h:46
@ FTS_AST_OPER
Operator.
Definition: fts0ast.h:42
@ FTS_AST_SUBEXP_LIST
Sub-Expression list.
Definition: fts0ast.h:51
@ FTS_AST_TEXT
Text string.
Definition: fts0ast.h:45
@ FTS_AST_LIST
Expression list.
Definition: fts0ast.h:50
void fts_ast_state_free(fts_ast_state_t *state)
in: state instance to free
Definition: fts0ast.cc:397
dberr_t fts_ast_visit(fts_ast_oper_t oper, fts_ast_node_t *node, fts_ast_callback visitor, void *arg, bool *has_ignore)
Traverse the AST - in-order traversal.
Definition: fts0ast.cc:520
void fts_ast_term_set_wildcard(fts_ast_node_t *node)
in: term to change
Definition: fts0ast.cc:362
fts_ast_node_t * fts_ast_create_node_oper(void *arg, fts_ast_oper_t oper)
in: ast operator
Definition: fts0ast.cc:81
fts_ast_node_t * fts_ast_create_node_text(void *arg, const fts_ast_string_t *ptr)
in: text string
Definition: fts0ast.cc:191
void fts_ast_node_print(fts_ast_node_t *node)
in: ast node to print
Definition: fts0ast.cc:485
int fts_lexer(YYSTYPE *, fts_lexer_t *)
Definition: fts0pars.cc:1969
Prototypes for global functions in ha_innodb.cc that are called by InnoDB C code.
#define malloc(A)
Definition: lexyy.cc:914
static char * query
Definition: myisam_ftdump.cc:45
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
bool distance(const dd::Spatial_reference_system *srs, const Geometry *g1, const Geometry *g2, double *distance, bool *is_null) noexcept
Computes the distance between two geometries.
Definition: distance.cc:40
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2878
required string type
Definition: replication_group_member_actions.proto:34
Definition: m_ctype.h:385
Definition: fts0ast.h:227
fts_ast_node_t * tail
Children list tail.
Definition: fts0ast.h:229
fts_ast_node_t * head
Children list head.
Definition: fts0ast.h:228
Definition: fts0ast.h:233
fts_ast_oper_t oper
Operator value.
Definition: fts0ast.h:237
fts_ast_type_t type
The type of node.
Definition: fts0ast.h:234
fts_ast_node_t * next
Link for expr list.
Definition: fts0ast.h:239
bool visited
whether this node is already processed
Definition: fts0ast.h:241
bool go_up
Flag if go one level up.
Definition: fts0ast.h:246
fts_ast_list_t list
Expression list.
Definition: fts0ast.h:238
fts_ast_term_t term
Term node.
Definition: fts0ast.h:236
fts_ast_text_t text
Text node.
Definition: fts0ast.h:235
fts_ast_node_t * up_node
Direct up node.
Definition: fts0ast.h:245
fts_ast_node_t * next_alloc
For tracking allocations.
Definition: fts0ast.h:240
trx_t * trx
Definition: fts0ast.h:243
Definition: fts0ast.h:250
fts_ast_list_t list
List of nodes allocated.
Definition: fts0ast.h:255
fts_ast_node_t * root
If all goes OK, then this will point to the root.
Definition: fts0ast.h:252
fts_ast_node_t * cur_node
Current node into which we add new node.
Definition: fts0ast.h:261
int depth
Depth of parsing state.
Definition: fts0ast.h:263
CHARSET_INFO * charset
charset used for tokenization
Definition: fts0ast.h:258
mem_heap_t * heap
Heap to use for alloc.
Definition: fts0ast.h:251
fts_lexer_t * lexer
Lexer callback + arg.
Definition: fts0ast.h:257
Definition: fts0ast.h:205
byte * str
< Pointer to string.
Definition: fts0ast.h:207
ulint len
Definition: fts0ast.h:210
Definition: fts0ast.h:214
bool wildcard
true if wild card set.
Definition: fts0ast.h:216
fts_ast_string_t * ptr
Pointer to term string.
Definition: fts0ast.h:215
Definition: fts0ast.h:220
fts_ast_string_t * ptr
Pointer to text string.
Definition: fts0ast.h:221
ulint distance
> 0 if proximity distance set
Definition: fts0ast.h:222
Definition: fts0pars.cc:109
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
Definition: trx0trx.h:684
unsigned long int ulint
Definition: univ.i:406