mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03: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:
@@ -258,7 +258,7 @@ void ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
|
||||
|
||||
|
||||
static int ft_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)))
|
||||
{
|
||||
@@ -288,7 +288,7 @@ static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
|
||||
|
||||
|
||||
static int ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
|
||||
const uchar *doc_arg, size_t doc_len)
|
||||
const uchar *doc_arg, mysql_ft_size_t doc_len)
|
||||
{
|
||||
const uchar *doc= doc_arg;
|
||||
const uchar *end= doc + doc_len;
|
||||
@@ -379,8 +379,8 @@ MYSQL_FTPARSER_PARAM *ftparser_call_initializer(MI_INFO *info,
|
||||
mysql_add_word != 0 - parser is initialized, or no
|
||||
initialization needed. */
|
||||
info->ftparser_param[ftparser_nr].mysql_add_word=
|
||||
(int (*)(struct st_mysql_ftparser_param *, const uchar *, size_t,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *)) 1;
|
||||
(int (*)(struct st_mysql_ftparser_param *, const uchar *,
|
||||
mysql_ft_size_t, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1;
|
||||
if (parser->init && parser->init(&info->ftparser_param[ftparser_nr]))
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user