MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fts0sql.cc File Reference
#include "que0que.h"
#include "trx0roll.h"
#include "pars0pars.h"
#include "dict0dict.h"
#include "fts0types.h"
#include "fts0priv.h"
#include "fts0types.ic"
#include "fts0vlc.ic"
Include dependency graph for fts0sql.cc:

Go to the source code of this file.

Functions

UNIV_INTERN int fts_get_table_id (const fts_table_t *fts_table, char *table_id)
UNIV_INTERN char * fts_get_table_name_prefix (const fts_table_t *fts_table)
UNIV_INTERN char * fts_get_table_name (const fts_table_t *fts_table)
UNIV_INTERN que_tfts_parse_sql (fts_table_t *fts_table, pars_info_t *info, const char *sql)
UNIV_INTERN que_tfts_parse_sql_no_dict_lock (fts_table_t *fts_table, pars_info_t *info, const char *sql)
UNIV_INTERN dberr_t fts_eval_sql (trx_t *trx, que_t *graph)
UNIV_INTERN const char * fts_get_select_columns_str (dict_index_t *index, pars_info_t *info, mem_heap_t *heap)
UNIV_INTERN dberr_t fts_sql_commit (trx_t *trx)
UNIV_INTERN dberr_t fts_sql_rollback (trx_t *trx)

Detailed Description

Full Text Search functionality.

Created 2007-03-27 Sunny Bains

Definition in file fts0sql.cc.

Function Documentation

UNIV_INTERN dberr_t fts_eval_sql ( trx_t trx,
que_t graph 
)

Evaluate an SQL query graph.

Returns
DB_SUCCESS or error code
Parameters
trxin: transaction
graphin: Query graph to evaluate

Definition at line 266 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN const char* fts_get_select_columns_str ( dict_index_t index,
pars_info_t info,
mem_heap_t heap 
)

Construct the column specification part of the SQL string for selecting the indexed FTS columns for the given table. Adds the necessary bound ids to the given 'info' and returns the SQL string. Examples:

One indexed column named "text":

"$sel0", info/ids: sel0 -> "text"

Two indexed columns named "subject" and "content":

"$sel0, $sel1", info/ids: sel0 -> "subject", sel1 -> "content",

Returns
heap-allocated WHERE string
Parameters
indexin: index
infoin/out: parser info
heapin: memory heap

Definition at line 300 of file fts0sql.cc.

Here is the call graph for this function:

UNIV_INTERN int fts_get_table_id ( const fts_table_t fts_table,
char *  table_id 
)

Get the table id.

Returns
number of bytes written
Parameters
fts_tablein: FTS Auxiliary table
table_idout: table id, must be at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long

Definition at line 55 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN char* fts_get_table_name ( const fts_table_t fts_table)

Construct the name of an ancillary FTS table.

Returns
own: table name, must be freed with mem_free()
Parameters
fts_tablein: Auxiliary table type

Definition at line 136 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN char* fts_get_table_name_prefix ( const fts_table_t fts_table)

Construct the prefix name of an FTS table.

Returns
own: table name, must be freed with mem_free()
Parameters
fts_tablein: Auxiliary table type

Definition at line 96 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN que_t* fts_parse_sql ( fts_table_t fts_table,
pars_info_t info,
const char *  sql 
)

Parse an SQL string. s is replaced with the table's id.

Returns
query graph
Parameters
fts_tablein: FTS auxiliarry table info
infoin: info struct, or NULL
sqlin: SQL string to evaluate

Definition at line 167 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN que_t* fts_parse_sql_no_dict_lock ( fts_table_t fts_table,
pars_info_t info,
const char *  sql 
)

Parse an SQL string. s is replaced with the table's id.

Returns
query graph
Parameters
fts_tablein: FTS aux table info
infoin: info struct, or NULL
sqlin: SQL string to evaluate

Definition at line 222 of file fts0sql.cc.

Here is the call graph for this function:

UNIV_INTERN dberr_t fts_sql_commit ( trx_t trx)

Commit a transaction.

Returns
DB_SUCCESS or error code
Parameters
trxin: transaction

Definition at line 331 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN dberr_t fts_sql_rollback ( trx_t trx)

Rollback a transaction.

Returns
DB_SUCCESS or error code
Parameters
trxin: transaction

Definition at line 350 of file fts0sql.cc.

Here is the call graph for this function:

Here is the caller graph for this function: