MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fts0opt.cc File Reference
#include "fts0fts.h"
#include "row0sel.h"
#include "que0types.h"
#include "fts0priv.h"
#include "fts0types.h"
#include "ut0wqueue.h"
#include "srv0start.h"
#include "zlib.h"
#include "fts0types.ic"
#include "fts0vlc.ic"
Include dependency graph for fts0opt.cc:

Go to the source code of this file.

Classes

struct  fts_zip_t
struct  fts_optimize_graph_t
struct  fts_optimize_t
struct  fts_encode_t
struct  fts_slot_t
struct  fts_msg_del_t
struct  fts_msg_optimize_t
struct  fts_msg_t

Enumerations

enum  fts_state_t {
  FTS_STATE_LOADED, FTS_STATE_RUNNING, FTS_STATE_SUSPENDED, FTS_STATE_DONE,
  FTS_STATE_EMPTY
}
enum  fts_msg_type_t {
  FTS_MSG_START, FTS_MSG_PAUSE, FTS_MSG_STOP, FTS_MSG_ADD_TABLE,
  FTS_MSG_OPTIMIZE_TABLE, FTS_MSG_DEL_TABLE
}

Functions

UNIV_INTERN fts_word_tfts_word_init (fts_word_t *word, byte *utf8, ulint len)
UNIV_INTERN ibool fts_optimize_index_fetch_node (void *row, void *user_arg)
UNIV_INTERN dberr_t fts_index_fetch_nodes (trx_t *trx, que_t **graph, fts_table_t *fts_table, const fts_string_t *word, fts_fetch_t *fetch)

Variables

UNIV_INTERN ulong fts_num_word_optimize
UNIV_INTERN char fts_enable_diag_print
static const fts_string_tword

Detailed Description

Full Text Search optimize thread

Created 2007/03/27 Sunny Bains Completed 2011/7/10 Sunny and Jimmy Yang

Definition in file fts0opt.cc.

Enumeration Type Documentation

FTS optimize thread message types.

Enumerator:
FTS_MSG_START 

Start optimizing thread

FTS_MSG_PAUSE 

Pause optimizing thread

FTS_MSG_STOP 

Stop optimizing and exit thread

FTS_MSG_ADD_TABLE 

Add table to the optimize thread's work queue

FTS_MSG_OPTIMIZE_TABLE 

Optimize a table

FTS_MSG_DEL_TABLE 

Remove a table from the optimize threads work queue

Definition at line 76 of file fts0opt.cc.

State of a table within the optimization sub system.

Definition at line 67 of file fts0opt.cc.

Function Documentation

UNIV_INTERN dberr_t fts_index_fetch_nodes ( trx_t trx,
que_t **  graph,
fts_table_t fts_table,
const fts_string_t word,
fts_fetch_t fetch 
)

Read the rows from the FTS inde.

Returns
DB_SUCCESS or error code
Parameters
trxin: transaction
graphin: prepared statement
fts_tablein: table of the FTS INDEX
wordin: the word to fetch
fetchin: fetch callback.

Definition at line 466 of file fts0opt.cc.

Here is the call graph for this function:

UNIV_INTERN ibool fts_optimize_index_fetch_node ( void *  row,
void *  user_arg 
)

Callback function to fetch the rows in an FTS INDEX record.

Returns
always returns non-NULL
Parameters
rowin: sel_node_t*
user_argin: pointer to ib_vector_t

Definition at line 425 of file fts0opt.cc.

Here is the call graph for this function:

UNIV_INTERN fts_word_t* fts_word_init ( fts_word_t word,
byte *  utf8,
ulint  len 
)

Create a fts_optimizer_word_t instance.

Returns
new instance
Parameters
wordin: word to initialize
utf8in: UTF-8 string
lenin: length of string in bytes

Definition at line 340 of file fts0opt.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

UNIV_INTERN char fts_enable_diag_print
Variable specifying whether we do additional FTS diagnostic printout

in the log

Definition at line 235 of file fts0opt.cc.

UNIV_INTERN ulong fts_num_word_optimize

The number of words to read and optimize in a single pass.

Definition at line 232 of file fts0opt.cc.

const fts_string_t* word

< in: optimize scratch pad in: get words greater than this word

Definition at line 785 of file fts0opt.cc.