mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
Fixes after comments from last push:
- Removed some not needed casts - Change plugin.h to be 'binary compatible' with old versions - Added mysql_ft_size_t typedef to plugin.h to make it trivial to change string lengths to size_t on next ABI change - Made some fixes suggested by Kristian to make things more portable and future safe (when it comes to strict aliasing) include/ft_global.h: Introduced FT_WEIGTH, to handle fulltext weights in a slightly more portable manner include/mysql/plugin.h: Change plugin.h to be 'binary compatible' with old versions Added mysql_ft_size_t typedef to plugin.h to make it trivial to change string lengths to size_t on next ABI change Changed flags to unsigned (as flags should always be unsigned) mysql-test/t/information_schema.test: Fixed typo sql/sp_head.cc: Removed cast sql/sql_select.cc: Removed cast sql/table.cc: Removed cast storage/maria/ma_ft_boolean_search.c: Use mysql_ft_size_t instead of size_t for plugin.h code Changed some other string lengths to size_t storage/maria/ma_ft_nlq_search.c: Use FT_WEIGTH to make code more portable storage/maria/ma_ft_parser.c: Use mysql_ft_size_t instead of size_t for plugin.h code Changed some other string lengths to size_t storage/maria/ma_ftdefs.h: Changed some string lengths to size_t storage/maria/maria_ftdump.c: Use FT_WEIGTH to make code more portable storage/myisam/ft_boolean_search.c: Use mysql_ft_size_t instead of size_t for plugin.h code storage/myisam/ft_nlq_search.c: Use FT_WEIGTH to make code more portable storage/myisam/ft_parser.c: Use mysql_ft_size_t instead of size_t for plugin.h code storage/myisam/myisam_ftdump.c: Use FT_WEIGTH to make code more portable
This commit is contained in:
parent
5d9c3014ce
commit
0df8279c46
16 changed files with 99 additions and 80 deletions
|
|
@ -180,7 +180,7 @@ typedef struct st_my_ftb_param
|
|||
|
||||
|
||||
static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *word, size_t word_len,
|
||||
const uchar *word, mysql_ft_size_t word_len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *info)
|
||||
{
|
||||
MY_FTB_PARAM *ftb_param= param->mysql_ftparam;
|
||||
|
|
@ -282,7 +282,7 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
|
|||
|
||||
|
||||
static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *query, size_t len)
|
||||
const uchar *query, mysql_ft_size_t len)
|
||||
{
|
||||
MY_FTB_PARAM *ftb_param= param->mysql_ftparam;
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO info;
|
||||
|
|
@ -616,7 +616,7 @@ typedef struct st_my_ftb_phrase_param
|
|||
|
||||
|
||||
static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *word, size_t word_len,
|
||||
const uchar *word, mysql_ft_size_t word_len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
|
||||
{
|
||||
MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam;
|
||||
|
|
@ -648,7 +648,8 @@ static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param,
|
|||
|
||||
|
||||
static int ftb_check_phrase_internal(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *document, size_t len)
|
||||
const uchar *document,
|
||||
mysql_ft_size_t len)
|
||||
{
|
||||
FT_WORD word;
|
||||
MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam;
|
||||
|
|
@ -874,8 +875,9 @@ typedef struct st_my_ftb_find_param
|
|||
|
||||
|
||||
static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *word, size_t len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
|
||||
const uchar *word, mysql_ft_size_t len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO
|
||||
*boolean_info __attribute__((unused)))
|
||||
{
|
||||
MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
|
||||
FT_INFO *ftb= ftb_param->ftb;
|
||||
|
|
@ -935,7 +937,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param,
|
|||
|
||||
|
||||
static int ftb_find_relevance_parse(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *doc, size_t len)
|
||||
const uchar *doc, mysql_ft_size_t len)
|
||||
{
|
||||
MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
|
||||
FT_INFO *ftb= ftb_param->ftb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue