diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-08-12 11:17:45 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-09-02 13:22:28 +0300 |
commit | 2e814d4702d71a04388386a9f591d14a35980bfe (patch) | |
tree | f3f9b48d116a3738c5e71f3a360ca61f16cfb632 /storage/innobase/include/fts0ast.h | |
parent | 848d211c5c4df00b819cd84d7530cf7d29bb0524 (diff) | |
download | mariadb-git-2e814d4702d71a04388386a9f591d14a35980bfe.tar.gz |
Merge InnoDB 5.7 from mysql-5.7.9.
Contains also
MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7
The failure happened because 5.7 has changed the signature of
the bool handler::primary_key_is_clustered() const
virtual function ("const" was added). InnoDB was using the old
signature which caused the function not to be used.
MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7
Fixed mutexing problem on lock_trx_handle_wait. Note that
rpl_parallel and rpl_optimistic_parallel tests still
fail.
MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
Reason: incorrect merge
MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
Reason: incorrect merge
Diffstat (limited to 'storage/innobase/include/fts0ast.h')
-rw-r--r-- | storage/innobase/include/fts0ast.h | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/storage/innobase/include/fts0ast.h b/storage/innobase/include/fts0ast.h index 50f62063893..f0f00a40193 100644 --- a/storage/innobase/include/fts0ast.h +++ b/storage/innobase/include/fts0ast.h @@ -26,8 +26,16 @@ Created 2007/03/16/03 Sunny Bains #ifndef INNOBASE_FST0AST_H #define INNOBASE_FST0AST_H -#include "mem0mem.h" #include "ha_prototypes.h" +#include "mem0mem.h" + +#ifdef UNIV_PFS_MEMORY + +#define malloc(A) ut_malloc_nokey(A) +#define free(A) ut_free(A) +#define realloc(P, A) ut_realloc(P, A) + +#endif /* UNIV_PFS_MEMORY */ /* The type of AST Node */ enum fts_ast_type_t { @@ -35,6 +43,10 @@ enum fts_ast_type_t { FTS_AST_NUMB, /*!< Number */ FTS_AST_TERM, /*!< Term (or word) */ FTS_AST_TEXT, /*!< Text string */ + FTS_AST_PARSER_PHRASE_LIST, /*!< Phase for plugin parser + The difference from text type + is that we tokenize text into + term list */ FTS_AST_LIST, /*!< Expression list */ FTS_AST_SUBEXP_LIST /*!< Sub-Expression list */ }; @@ -139,9 +151,8 @@ fts_ast_term_set_wildcard( fts_ast_node_t* node); /*!< in: term to change */ /******************************************************************** Set the proximity attribute of a text node. */ - void -fts_ast_term_set_distance( +fts_ast_text_set_distance( /*======================*/ fts_ast_node_t* node, /*!< in/out: text node */ ulint distance); /*!< in: the text proximity @@ -149,7 +160,6 @@ fts_ast_term_set_distance( /********************************************************************//** Free a fts_ast_node_t instance. @return next node to free */ -UNIV_INTERN fts_ast_node_t* fts_ast_free_node( /*==============*/ @@ -188,7 +198,6 @@ fts_ast_state_free( /******************************************************************//** Traverse the AST - in-order traversal. @return DB_SUCCESS if all went well */ -UNIV_INTERN dberr_t fts_ast_visit( /*==========*/ @@ -206,7 +215,6 @@ Process (nested) sub-expression, create a new result set to store the sub-expression result by processing nodes under current sub-expression list. Merge the sub-expression result with that of parent expression list. @return DB_SUCCESS if all went well */ -UNIV_INTERN dberr_t fts_ast_visit_sub_exp( /*==================*/ @@ -216,7 +224,6 @@ fts_ast_visit_sub_exp( MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************** Create a lex instance.*/ -UNIV_INTERN fts_lexer_t* fts_lexer_create( /*=============*/ @@ -226,7 +233,6 @@ fts_lexer_create( MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); /******************************************************************** Free an fts_lexer_t instance.*/ -UNIV_INTERN void fts_lexer_free( /*===========*/ @@ -240,7 +246,6 @@ has one more byte than len @param[in] str pointer to string @param[in] len length of the string @return ast string with NUL-terminator */ -UNIV_INTERN fts_ast_string_t* fts_ast_string_create( const byte* str, @@ -249,7 +254,6 @@ fts_ast_string_create( /** Free an ast string instance @param[in,out] ast_str string to free */ -UNIV_INTERN void fts_ast_string_free( fts_ast_string_t* ast_str); @@ -259,7 +263,6 @@ Translate ast string of type FTS_AST_NUMB to unsigned long by strtoul @param[in] str string to translate @param[in] base the base @return translated number */ -UNIV_INTERN ulint fts_ast_string_to_ul( const fts_ast_string_t* ast_str, @@ -268,7 +271,6 @@ fts_ast_string_to_ul( /** Print the ast string @param[in] str string to print */ -UNIV_INTERN void fts_ast_string_print( const fts_ast_string_t* ast_str); @@ -314,6 +316,9 @@ struct fts_ast_node_t { fts_ast_node_t* next_alloc; /*!< For tracking allocations */ bool visited; /*!< whether this node is already processed */ + /* Used by plugin parser */ + fts_ast_node_t* up_node; /*!< Direct up node */ + bool go_up; /*!< Flag if go one level up */ }; /* To track state during parsing */ @@ -327,8 +332,32 @@ struct fts_ast_state_t { fts_lexer_t* lexer; /*!< Lexer callback + arg */ CHARSET_INFO* charset; /*!< charset used for tokenization */ + /* Used by plugin parser */ + fts_ast_node_t* cur_node; /*!< Current node into which + we add new node */ + int depth; /*!< Depth of parsing state */ }; +/******************************************************************//** +Create an AST term node, makes a copy of ptr for plugin parser +@return node */ +extern +fts_ast_node_t* +fts_ast_create_node_term_for_parser( +/*==========i=====================*/ + void* arg, /*!< in: ast state */ + const char* ptr, /*!< in: term string */ + const ulint len); /*!< in: term string length */ + +/******************************************************************//** +Create an AST phrase list node for plugin parser +@return node */ +extern +fts_ast_node_t* +fts_ast_create_node_phrase_list( +/*============================*/ + void* arg); /*!< in: ast state */ + #ifdef UNIV_DEBUG const char* fts_ast_oper_name_get(fts_ast_oper_t oper); |