47 fts_ast_node_create(
void)
53 memset(node, 0x0,
sizeof(*node));
90 ulint len = strlen(ptr);
97 while (cur_pos < len) {
104 reinterpret_cast<const byte*>(ptr) + cur_pos,
105 reinterpret_cast<const byte*>(ptr) + len, &str, &offset);
121 node = fts_ast_node_create();
131 static_cast<fts_ast_state_t*>(arg), node);
138 static_cast<fts_ast_state_t*>(
150 return((node_list != NULL) ? node_list : first_node);
164 ulint len = strlen(ptr);
174 ut_ad(ptr[0] ==
'\"');
177 ut_ad(ptr[1] ==
'\"');
183 node = fts_ast_node_create();
192 memcpy(node->
text.
ptr, ptr + 1, len);
273 switch (node->
type) {
290 fts_ast_free_list(node);
302 next_node = node->
next;
440 switch (node->
type) {
442 printf(
"TEXT: %s\n", node->
text.
ptr);
446 printf(
"TERM: %s\n", node->
term.
ptr);
460 printf(
"SUBEXP_LIST: ");
468 printf(
"OPER: %d\n", node->
oper);
487 fts_ast_callback visitor,
497 bool revisit =
false;
498 bool will_be_ignored =
false;
530 node && (error == DB_SUCCESS);
540 arg, &will_be_ignored);
545 if (will_be_ignored) {
581 || oper_node->
oper == oper
600 error = visitor(oper, node, arg);
608 for (node = start_node;
609 node && error == DB_SUCCESS;
615 visitor, arg, &will_be_ignored);
620 for (node = start_node;
621 node && error == DB_SUCCESS;
626 visitor, arg, &will_be_ignored);