summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fts0priv.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-21 14:21:03 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-21 14:21:03 +0200
commit720e04ff6760e9d04566d7fb33131fd1886ef4cd (patch)
tree17cd54888d796e976e571d5873e3d3f051436a06 /storage/innobase/include/fts0priv.h
parentf1aae861eee711cc718ca8fe52cc08d326b948cf (diff)
downloadmariadb-git-720e04ff6760e9d04566d7fb33131fd1886ef4cd.tar.gz
5.6.31
Diffstat (limited to 'storage/innobase/include/fts0priv.h')
-rw-r--r--storage/innobase/include/fts0priv.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index b4d9e1d41ec..2d4e9d88fd1 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -121,7 +121,7 @@ fts_parse_sql(
fts_table_t* fts_table, /*!< in: FTS aux table */
pars_info_t* info, /*!< in: info struct, or NULL */
const char* sql) /*!< in: SQL string to evaluate */
- __attribute__((nonnull(3), malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
/******************************************************************//**
Evaluate a parsed SQL statement
@return DB_SUCCESS or error code */
@@ -131,7 +131,7 @@ fts_eval_sql(
/*=========*/
trx_t* trx, /*!< in: transaction */
que_t* graph) /*!< in: Parsed statement */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Construct the name of an ancillary FTS table for the given table.
@return own: table name, must be freed with mem_free() */
@@ -141,7 +141,7 @@ fts_get_table_name(
/*===============*/
const fts_table_t*
fts_table) /*!< in: FTS aux table info */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/******************************************************************//**
Construct the column specification part of the SQL string for selecting the
indexed FTS columns for the given table. Adds the necessary bound
@@ -164,7 +164,7 @@ fts_get_select_columns_str(
dict_index_t* index, /*!< in: FTS index */
pars_info_t* info, /*!< in/out: parser info */
mem_heap_t* heap) /*!< in: memory heap */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** define for fts_doc_fetch_by_doc_id() "option" value, defines whether
we want to get Doc whose ID is equal to or greater or smaller than supplied
@@ -191,7 +191,7 @@ fts_doc_fetch_by_doc_id(
callback, /*!< in: callback to read
records */
void* arg) /*!< in: callback arg */
- __attribute__((nonnull(6)));
+ MY_ATTRIBUTE((nonnull(6)));
/*******************************************************************//**
Callback function for fetch that stores the text of an FTS document,
@@ -203,7 +203,7 @@ fts_query_expansion_fetch_doc(
/*==========================*/
void* row, /*!< in: sel_node_t* */
void* user_arg) /*!< in: fts_doc_t* */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************
Write out a single word's data as new entry/entries in the INDEX table.
@return DB_SUCCESS if all OK. */
@@ -216,7 +216,7 @@ fts_write_node(
fts_table_t* fts_table, /*!< in: the FTS aux index */
fts_string_t* word, /*!< in: word in UTF-8 */
fts_node_t* node) /*!< in: node columns */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Tokenize a document. */
UNIV_INTERN
@@ -227,7 +227,7 @@ fts_tokenize_document(
tokenize */
fts_doc_t* result) /*!< out: if provided, save
result tokens here */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*******************************************************************//**
Continue to tokenize a document. */
@@ -241,7 +241,7 @@ fts_tokenize_document_next(
tokens from this tokenization */
fts_doc_t* result) /*!< out: if provided, save
result tokens here */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/******************************************************************//**
Initialize a document. */
UNIV_INTERN
@@ -249,7 +249,7 @@ void
fts_doc_init(
/*=========*/
fts_doc_t* doc) /*!< in: doc to initialize */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Do a binary search for a doc id in the array
@@ -263,7 +263,7 @@ fts_bsearch(
int lower, /*!< in: lower bound of array*/
int upper, /*!< in: upper bound of array*/
doc_id_t doc_id) /*!< in: doc id to lookup */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Free document. */
UNIV_INTERN
@@ -271,7 +271,7 @@ void
fts_doc_free(
/*=========*/
fts_doc_t* doc) /*!< in: document */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Free fts_optimizer_word_t instanace.*/
UNIV_INTERN
@@ -279,7 +279,7 @@ void
fts_word_free(
/*==========*/
fts_word_t* word) /*!< in: instance to free.*/
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Read the rows from the FTS inde
@return DB_SUCCESS or error code */
@@ -293,7 +293,7 @@ fts_index_fetch_nodes(
const fts_string_t*
word, /*!< in: the word to fetch */
fts_fetch_t* fetch) /*!< in: fetch callback.*/
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Create a fts_optimizer_word_t instance.
@return new instance */
@@ -304,7 +304,7 @@ fts_word_init(
fts_word_t* word, /*!< in: word to initialize */
byte* utf8, /*!< in: UTF-8 string */
ulint len) /*!< in: length of string in bytes */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Compare two fts_trx_table_t instances, we actually compare the
table id's here.
@@ -315,7 +315,7 @@ fts_trx_table_cmp(
/*==============*/
const void* v1, /*!< in: id1 */
const void* v2) /*!< in: id2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Compare a table id with a trx_table_t table id.
@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
@@ -325,7 +325,7 @@ fts_trx_table_id_cmp(
/*=================*/
const void* p1, /*!< in: id1 */
const void* p2) /*!< in: id2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Commit a transaction.
@return DB_SUCCESS if all OK */
@@ -334,7 +334,7 @@ dberr_t
fts_sql_commit(
/*===========*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Rollback a transaction.
@return DB_SUCCESS if all OK */
@@ -343,7 +343,7 @@ dberr_t
fts_sql_rollback(
/*=============*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Parse an SQL string. %s is replaced with the table's id. Don't acquire
the dict mutex
@@ -355,7 +355,7 @@ fts_parse_sql_no_dict_lock(
fts_table_t* fts_table, /*!< in: table with FTS index */
pars_info_t* info, /*!< in: parser info */
const char* sql) /*!< in: SQL string to evaluate */
- __attribute__((nonnull(3), malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
/******************************************************************//**
Get value from config table. The caller must ensure that enough
space is allocated for value to hold the column contents
@@ -370,7 +370,7 @@ fts_config_get_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Get value specific to an FTS index from the config table. The caller
must ensure that enough space is allocated for value to hold the
@@ -386,7 +386,7 @@ fts_config_get_index_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set the value in the config table for name.
@return DB_SUCCESS or error code */
@@ -400,7 +400,7 @@ fts_config_set_value(
this parameter name */
const fts_string_t*
value) /*!< in: value to update */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/****************************************************************//**
Set an ulint value in the config table.
@return DB_SUCCESS if all OK else error code */
@@ -412,7 +412,7 @@ fts_config_set_ulint(
fts_table_t* fts_table, /*!< in: the indexed FTS table */
const char* name, /*!< in: param name */
ulint int_value) /*!< in: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set the value specific to an FTS index in the config table.
@return DB_SUCCESS or error code */
@@ -426,7 +426,7 @@ fts_config_set_index_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Increment the value in the config table for column name.
@return DB_SUCCESS or error code */
@@ -439,7 +439,7 @@ fts_config_increment_value(
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta) /*!< in: increment by this much */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Increment the per index value in the config table for column name.
@return DB_SUCCESS or error code */
@@ -452,7 +452,7 @@ fts_config_increment_index_value(
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta) /*!< in: increment by this much */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Get an ulint value from the config table.
@return DB_SUCCESS or error code */
@@ -464,7 +464,7 @@ fts_config_get_index_ulint(
dict_index_t* index, /*!< in: FTS index */
const char* name, /*!< in: param name */
ulint* int_value) /*!< out: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set an ulint value int the config table.
@return DB_SUCCESS or error code */
@@ -476,7 +476,7 @@ fts_config_set_index_ulint(
dict_index_t* index, /*!< in: FTS index */
const char* name, /*!< in: param name */
ulint int_value) /*!< in: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Get an ulint value from the config table.
@return DB_SUCCESS or error code */
@@ -488,7 +488,7 @@ fts_config_get_ulint(
fts_table_t* fts_table, /*!< in: the indexed FTS table */
const char* name, /*!< in: param name */
ulint* int_value) /*!< out: value */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Search cache for word.
@return the word node vector if found else NULL */
@@ -500,7 +500,7 @@ fts_cache_find_word(
index_cache, /*!< in: cache to search */
const fts_string_t*
text) /*!< in: word to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Check cache for deleted doc id.
@return TRUE if deleted */
@@ -511,7 +511,7 @@ fts_cache_is_deleted_doc_id(
const fts_cache_t*
cache, /*!< in: cache ito search */
doc_id_t doc_id) /*!< in: doc id to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Append deleted doc ids to vector and sort the vector. */
UNIV_INTERN
@@ -546,7 +546,7 @@ fts_get_total_word_count(
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: for this index */
ulint* total) /*!< out: total words */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif
/******************************************************************//**
Search the index specific cache for a particular FTS index.
@@ -559,7 +559,7 @@ fts_find_index_cache(
cache, /*!< in: cache to search */
const dict_index_t*
index) /*!< in: index to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Write the table id to the given buffer (including final NUL). Buffer must be
at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long.
@@ -570,10 +570,10 @@ fts_write_object_id(
/*================*/
ib_id_t id, /*!< in: a table/index id */
char* str, /*!< in: buffer to write the id to */
- bool hex_format __attribute__((unused)))
+ bool hex_format MY_ATTRIBUTE((unused)))
/*!< in: true for fixed hex format,
false for old ambiguous format */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Read the table id from the string generated by fts_write_object_id().
@return TRUE if parse successful */
@@ -583,7 +583,7 @@ fts_read_object_id(
/*===============*/
ib_id_t* id, /*!< out: a table id */
const char* str) /*!< in: buffer to read from */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Get the table id.
@return number of bytes written */
@@ -596,7 +596,7 @@ fts_get_table_id(
char* table_id) /*!< out: table id, must be at least
FTS_AUX_MIN_TABLE_ID_LENGTH bytes
long */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Add the table to add to the OPTIMIZER's list. */
UNIV_INTERN
@@ -604,7 +604,7 @@ void
fts_optimize_add_table(
/*===================*/
dict_table_t* table) /*!< in: table to add */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Optimize a table. */
UNIV_INTERN
@@ -612,7 +612,7 @@ void
fts_optimize_do_table(
/*==================*/
dict_table_t* table) /*!< in: table to optimize */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Construct the prefix name of an FTS table.
@return own: table name, must be freed with mem_free() */
@@ -622,7 +622,7 @@ fts_get_table_name_prefix(
/*======================*/
const fts_table_t*
fts_table) /*!< in: Auxiliary table type */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/******************************************************************//**
Add node positions. */
UNIV_INTERN
@@ -633,7 +633,7 @@ fts_cache_node_add_positions(
fts_node_t* node, /*!< in: word node */
doc_id_t doc_id, /*!< in: doc id */
ib_vector_t* positions) /*!< in: fts_token_t::positions */
- __attribute__((nonnull(2,4)));
+ MY_ATTRIBUTE((nonnull(2,4)));
/******************************************************************//**
Create the config table name for retrieving index specific value.
@@ -644,7 +644,7 @@ fts_config_create_index_param_name(
/*===============================*/
const char* param, /*!< in: base name of param */
const dict_index_t* index) /*!< in: index for config */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
#ifndef UNIV_NONINL
#include "fts0priv.ic"