#At lp:maria based on revid:hakan@askmonty.org-20100122211921-e177xzarwy7l8j5y 2803 Michael Widenius 2010-01-27 Fixed some compiler warnings and errors in test suite found by buildbot modified: include/ft_global.h include/maria.h mysql-test/r/show_check.result mysql-test/suite/rpl/t/rpl_rotate_logs.test mysql-test/t/show_check-master.opt sql/item.cc storage/maria/ft_maria.c storage/myisam/ft_boolean_search.c storage/myisam/ft_myisam.c storage/myisam/ft_nlq_search.c storage/myisam/ft_parser.c storage/myisam/ft_stopwords.c storage/myisam/ftdefs.h per-file messages: include/ft_global.h Changed string size to 'size_t' (to avoid compiler warnings later) include/maria.h Changed string size to 'size_t' (to avoid compiler warnings later) mysql-test/r/show_check.result Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables' mysql-test/suite/rpl/t/rpl_rotate_logs.test Use HIGH_PRIORITY inserts to avoid problem with concurrent inserts on the slave. mysql-test/t/show_check-master.opt Don't use logging to tables, as there is no guarantee in which order tables are showed in 'show open tables' sql/item.cc Fixed compiler warning storage/maria/ft_maria.c Changed string size to 'size_t' (to avoid compiler warnings later) storage/myisam/ft_boolean_search.c Fixed compiler warnings storage/myisam/ft_myisam.c Changed string size to 'size_t' (to avoid compiler warnings later) storage/myisam/ft_nlq_search.c Changed string size to 'size_t' (to avoid compiler warnings later) storage/myisam/ft_parser.c Changed string size to 'size_t' (to avoid compiler warnings) storage/myisam/ft_stopwords.c Changed string size to 'size_t' (to avoid compiler warnings) storage/myisam/ftdefs.h Changed string size to 'size_t' (to avoid compiler warnings) === modified file 'include/ft_global.h' --- a/include/ft_global.h 2009-11-30 13:36:06 +0000 +++ b/include/ft_global.h 2010-01-27 21:53:08 +0000 @@ -62,7 +62,8 @@ void ft_free_stopwords(void); #define FT_SORTED 2 #define FT_EXPAND 4 /* query expansion */ -FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,CHARSET_INFO *, uchar *); +FT_INFO *ft_init_search(uint,void *, uint, uchar *, size_t, + CHARSET_INFO *, uchar *); my_bool ft_boolean_check_syntax_string(const uchar *); /* Internal symbols for fulltext between maria and MyISAM */ === modified file 'include/maria.h' --- a/include/maria.h 2009-02-19 09:01:25 +0000 +++ b/include/maria.h 2010-01-27 21:53:08 +0000 @@ -462,7 +462,7 @@ void maria_versioning(MARIA_HA *info, my void maria_ignore_trids(MARIA_HA *info); /* fulltext functions */ -FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, uint, +FT_INFO *maria_ft_init_search(uint,void *, uint, uchar *, size_t, CHARSET_INFO *, uchar *); /* 'Almost-internal' Maria functions */ === modified file 'mysql-test/r/show_check.result' --- a/mysql-test/r/show_check.result 2009-12-15 09:03:24 +0000 +++ b/mysql-test/r/show_check.result 2010-01-27 21:53:08 +0000 @@ -252,13 +252,11 @@ drop table t1; flush tables; show open tables; Database Table In_use Name_locked -mysql general_log 0 0 create table t1(n int); insert into t1 values (1); show open tables; Database Table In_use Name_locked test t1 0 0 -mysql general_log 0 0 drop table t1; create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed; show create table t1; === modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test' --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2009-03-12 09:48:41 +0000 +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2010-01-27 21:53:08 +0000 @@ -153,7 +153,7 @@ disable_query_log; while ($1) { #eval means expand $ expressions - eval insert into t3 values($1 + 4); + eval insert HIGH_PRIORITY into t3 values($1 + 4); dec $1; } enable_query_log; === modified file 'mysql-test/t/show_check-master.opt' --- a/mysql-test/t/show_check-master.opt 2009-12-03 11:19:05 +0000 +++ b/mysql-test/t/show_check-master.opt 2010-01-27 21:53:08 +0000 @@ -1 +1 @@ ---log-output=table --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="" --slow-query-log-file="" +--log-output=file --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="foo" --slow-query-log-file="" === modified file 'sql/item.cc' --- a/sql/item.cc 2010-01-15 15:27:55 +0000 +++ b/sql/item.cc 2010-01-27 21:53:08 +0000 @@ -7119,7 +7119,7 @@ double Item_cache_decimal::val_real() DBUG_ASSERT(fixed); double res; if (!value_cached && !cache_value()) - return NULL; + return 0.0; my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &res); return res; } === modified file 'storage/maria/ft_maria.c' --- a/storage/maria/ft_maria.c 2007-07-02 17:45:15 +0000 +++ b/storage/maria/ft_maria.c 2010-01-27 21:53:08 +0000 @@ -22,8 +22,8 @@ #include "ma_ftdefs.h" FT_INFO *maria_ft_init_search(uint flags, void *info, uint keynr, - uchar *query, uint query_len, CHARSET_INFO *cs, - uchar *record) + uchar *query, size_t query_len, + CHARSET_INFO *cs, uchar *record) { FT_INFO *res; if (flags & FT_BOOL) === modified file 'storage/myisam/ft_boolean_search.c' --- a/storage/myisam/ft_boolean_search.c 2010-01-15 15:27:55 +0000 +++ b/storage/myisam/ft_boolean_search.c 2010-01-27 21:53:08 +0000 @@ -299,7 +299,7 @@ static int ftb_parse_query_internal(MYSQ } -static int _ftb_parse_query(FTB *ftb, uchar *query, uint len, +static int _ftb_parse_query(FTB *ftb, uchar *query, mysql_ft_size_t len, struct st_mysql_ftparser *parser) { MYSQL_FTPARSER_PARAM *param; @@ -540,7 +540,7 @@ static void _ftb_init_index_search(FT_IN FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query, - uint query_len, CHARSET_INFO *cs) + mysql_ft_size_t query_len, CHARSET_INFO *cs) { FTB *ftb; FTB_EXPR *ftbe; @@ -679,8 +679,9 @@ static int ftb_check_phrase_internal(MYS -1 is returned if error occurs. */ -static int _ftb_check_phrase(FTB *ftb, const uchar *document, uint len, - FTB_EXPR *ftbe, struct st_mysql_ftparser *parser) +static int _ftb_check_phrase(FTB *ftb, const uchar *document, + mysql_ft_size_t len, + FTB_EXPR *ftbe, struct st_mysql_ftparser *parser) { MY_FTB_PHRASE_PARAM ftb_param; MYSQL_FTPARSER_PARAM *param; === modified file 'storage/myisam/ft_myisam.c' --- a/storage/myisam/ft_myisam.c 2007-07-02 17:45:15 +0000 +++ b/storage/myisam/ft_myisam.c 2010-01-27 21:53:08 +0000 @@ -23,8 +23,8 @@ #include "ftdefs.h" FT_INFO *ft_init_search(uint flags, void *info, uint keynr, - uchar *query, uint query_len, CHARSET_INFO *cs, - uchar *record) + uchar *query, size_t query_len, + CHARSET_INFO *cs, uchar *record) { FT_INFO *res; if (flags & FT_BOOL) === modified file 'storage/myisam/ft_nlq_search.c' --- a/storage/myisam/ft_nlq_search.c 2009-11-30 13:36:06 +0000 +++ b/storage/myisam/ft_nlq_search.c 2010-01-27 21:53:08 +0000 @@ -204,7 +204,8 @@ static int FT_DOC_cmp(void *unused __att FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query, - uint query_len, uint flags, uchar *record) + mysql_ft_size_t query_len, uint flags, + uchar *record) { TREE wtree; ALL_IN_ONE aio; === modified file 'storage/myisam/ft_parser.c' --- a/storage/myisam/ft_parser.c 2009-11-30 13:36:06 +0000 +++ b/storage/myisam/ft_parser.c 2010-01-27 21:53:08 +0000 @@ -304,7 +304,7 @@ static int ft_parse_internal(MYSQL_FTPAR } -int ft_parse(TREE *wtree, const uchar *doc, int doclen, +int ft_parse(TREE *wtree, const uchar *doc, mysql_ft_size_t doclen, struct st_mysql_ftparser *parser, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { === modified file 'storage/myisam/ft_stopwords.c' --- a/storage/myisam/ft_stopwords.c 2009-11-29 23:08:56 +0000 +++ b/storage/myisam/ft_stopwords.c 2010-01-27 21:53:08 +0000 @@ -21,7 +21,7 @@ typedef struct st_ft_stopwords { const char * pos; - uint len; + size_t len; } FT_STOPWORD; static TREE *stopwords3=NULL; === modified file 'storage/myisam/ftdefs.h' --- a/storage/myisam/ftdefs.h 2009-11-29 23:08:56 +0000 +++ b/storage/myisam/ftdefs.h 2010-01-27 21:53:08 +0000 @@ -97,8 +97,8 @@ typedef struct st_ft_word { const uchar *pos; - uint len; double weight; + size_t len; } FT_WORD; int is_stopword(const uchar *word, size_t len); @@ -111,7 +111,8 @@ uchar ft_simple_get_word(CHARSET_INFO *, FT_WORD *, my_bool); typedef struct _st_ft_seg_iterator { - uint num, len; + uint num; + mysql_ft_size_t len; HA_KEYSEG *seg; const uchar *rec, *pos; } FT_SEG_ITERATOR; @@ -128,8 +129,9 @@ FT_WORD * _mi_ft_parserecord(MI_INFO *, uint _mi_ft_parse(TREE *, MI_INFO *, uint, const uchar *, MYSQL_FTPARSER_PARAM *, MEM_ROOT *); -FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, uint, uint, uchar *); -FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, uint, CHARSET_INFO *); +FT_INFO *ft_init_nlq_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, uint, + uchar *); +FT_INFO *ft_init_boolean_search(MI_INFO *, uint, uchar *, mysql_ft_size_t, CHARSET_INFO *); extern const struct _ft_vft _ft_vft_nlq; int ft_nlq_read_next(FT_INFO *, char *);