MySQL 5.6.14 Source Code Document
|
#include "que0types.h"
#include "ut0byte.h"
#include "fut0fut.h"
#include "ut0rbt.h"
#include "fts0fts.h"
#include "fts0types.ic"
#include "fts0vlc.ic"
Go to the source code of this file.
Classes | |
struct | fts_doc_stats_t |
struct | fts_get_doc_t |
struct | fts_index_cache_t |
struct | fts_update_t |
struct | fts_stopword_t |
struct | fts_sync_t |
struct | fts_cache_t |
struct | fts_node_t |
struct | fts_tokenizer_word_t |
struct | fts_word_t |
struct | fts_fetch_t |
struct | fts_index_selector_t |
struct | fts_doc_t |
struct | fts_token_t |
Typedefs | |
typedef pars_user_func_cb_t | fts_sql_callback |
typedef void(* | fts_filter )(void *, fts_node_t *, void *, ulint len) |
Functions | |
UNIV_INLINE int | fts_utf8_string_cmp (const void *p1, const void *p2) |
UNIV_INLINE int | fts_utf8_string_cmp_prefix (const void *p1, const void *p2) |
UNIV_INLINE int | fts_trx_row_doc_id_cmp (const void *p1, const void *p2) |
UNIV_INLINE int | fts_ranking_doc_id_cmp (const void *p1, const void *p2) |
UNIV_INLINE int | fts_update_doc_id_cmp (const void *p1, const void *p2) |
UNIV_INLINE ulint | fts_decode_vlc (byte **ptr) |
UNIV_INLINE void | fts_utf8_string_dup (fts_string_t *dst, const fts_string_t *src, mem_heap_t *heap) |
UNIV_INLINE ulint | fts_get_encoded_len (ulint val) |
UNIV_INLINE ulint | fts_encode_int (ulint val, byte *buf) |
UNIV_INLINE ulint | fts_utf8_decode (const byte **ptr) |
UNIV_INLINE void | fts_utf8_tolower (fts_string_t *str) |
UNIV_INLINE const char * | fts_get_suffix (ulint selected) |
UNIV_INLINE ulint | fts_get_n_selectors (void) |
UNIV_INLINE ulint | fts_select_index (const CHARSET_INFO *cs, const byte *str, ulint len) |
UNIV_INLINE ulint | fts_select_next_index (const CHARSET_INFO *cs, const byte *str, ulint len) |
Variables | |
const fts_index_selector_t | fts_index_selector [] |
typedef pars_user_func_cb_t fts_sql_callback |
Callbacks used within FTS.
Definition at line 38 of file fts0types.h.
UNIV_INLINE ulint fts_decode_vlc | ( | byte ** | ptr | ) |
Decode and return the integer that was encoded using our VLC scheme. in: ptr to decode from, this ptr is incremented by the number of bytes decoded
ptr | out: value decoded |
UNIV_INLINE ulint fts_encode_int | ( | ulint | val, |
byte * | buf | ||
) |
Encode an integer using our VLC scheme and return the length in bytes. in: buffer, must have enough space
val | out: length of value encoded, in bytes in: value to encode |
UNIV_INLINE ulint fts_get_encoded_len | ( | ulint | val | ) |
Return length of val if it were encoded using our VLC scheme. in: value to encode
val | out: length of value encoded, in bytes |
UNIV_INLINE const char* fts_get_suffix | ( | ulint | selected | ) |
Get the selected FTS aux INDEX suffix. in: selected index
UNIV_INLINE int fts_ranking_doc_id_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Compare two fts_ranking_t instances doc_ids. in: id2
p1 | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: id1 |
UNIV_INLINE ulint fts_select_index | ( | const CHARSET_INFO * | cs, |
const byte * | str, | ||
ulint | len | ||
) |
Select the FTS auxiliary index for the given string.
cs | Charset |
str | in: word string |
UNIV_INLINE ulint fts_select_next_index | ( | const CHARSET_INFO * | cs, |
const byte * | str, | ||
ulint | len | ||
) |
in: string length
cs | Charset |
str | in: string |
UNIV_INLINE int fts_trx_row_doc_id_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Compare two fts_trx_row_t instances doc_ids. in: id2
p1 | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: id1 |
UNIV_INLINE int fts_update_doc_id_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Compare two fts_update_t instances doc_ids. in: id2
p1 | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: id1 |
UNIV_INLINE ulint fts_utf8_decode | ( | const byte ** | ptr | ) |
Decode a UTF-8 character.
http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf:
Scalar Value 1st Byte 2nd Byte 3rd Byte 4th Byte 00000000 0xxxxxxx 0xxxxxxx 00000yyy yyxxxxxx 110yyyyy 10xxxxxx zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx 000uuuzz zzzzyyyy yyxxxxxx 11110uuu 10zzzzzz 10yyyyyy 10xxxxxx
This function decodes UTF-8 sequences up to 6 bytes (31 bits).
On error *ptr will point to the first byte that was not correctly decoded. This will hopefully help in resyncing the input. in/out: pointer to UTF-8 string. The pointer is advanced to the start of the next character.
ptr | out: UTF8_ERROR if *ptr did not point to a valid UTF-8 sequence, or the Unicode code point. |
UNIV_INLINE int fts_utf8_string_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Compare two UTF-8 strings. in: node
p1 | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: key |
UNIV_INLINE int fts_utf8_string_cmp_prefix | ( | const void * | p1, |
const void * | p2 | ||
) |
Compare two UTF-8 strings, and return match (0) if passed in "key" value equals or is the prefix of the "node" value. in: node
p1 | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: key |
UNIV_INLINE void fts_utf8_string_dup | ( | fts_string_t * | dst, |
const fts_string_t * | src, | ||
mem_heap_t * | heap | ||
) |
Duplicate an UTF-8 string. in: heap to use
dst | out: < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 in: dup to here |
src | in: src string |
UNIV_INLINE void fts_utf8_tolower | ( | fts_string_t * | str | ) |
Lowercase an UTF-8 string. in: string
const fts_index_selector_t fts_index_selector[] |
It's defined in fts/fts0fts.c
FTS auxiliary INDEX split intervals.
Definition at line 223 of file fts0fts.cc.