diff options
author | Michael Widenius <monty@askmonty.org> | 2010-01-28 13:35:10 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-01-28 13:35:10 +0200 |
commit | e926af9bf8d2b00c2c31a3741f65e3d5b846dffe (patch) | |
tree | f3910ce9605223eeb0ad603d4b7d221f4b640ce7 /storage | |
parent | ef0416c14c6a6ba950990c73dd46d8e13f03ad03 (diff) | |
parent | e2efd9338574c87177e0c00273e6e49a32ce2aa6 (diff) | |
download | mariadb-git-e926af9bf8d2b00c2c31a3741f65e3d5b846dffe.tar.gz |
Merge with fixes for compiler warnings and 2 fixed test cases
Fixed some additional compiler warnings from OpenSolaris build.
extra/libevent/devpoll.c:
Fixed compiler warning
mysys/my_file.c:
Fixed compiler warning
sql/mysqld.cc:
Fixed compiler warning
sql/rpl_record.cc:
Removed not used variable
storage/maria/ma_blockrec.c:
Fixed compiler warning
storage/xtradb/buf/buf0buf.c:
Fixed compiler warning
storage/xtradb/handler/i_s.cc:
Fixed compiler warning
support-files/compiler_warnings.supp:
Added suppression of compiler warnings in InnoDB/XtraDB
Added suppression of compiler warnings that can safely be ignored.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/maria/ft_maria.c | 4 | ||||
-rw-r--r-- | storage/maria/ma_blockrec.c | 3 | ||||
-rw-r--r-- | storage/myisam/ft_boolean_search.c | 9 | ||||
-rw-r--r-- | storage/myisam/ft_myisam.c | 4 | ||||
-rw-r--r-- | storage/myisam/ft_nlq_search.c | 3 | ||||
-rw-r--r-- | storage/myisam/ft_parser.c | 2 | ||||
-rw-r--r-- | storage/myisam/ft_stopwords.c | 2 | ||||
-rw-r--r-- | storage/myisam/ftdefs.h | 10 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0buf.c | 8 | ||||
-rw-r--r-- | storage/xtradb/handler/i_s.cc | 2 |
10 files changed, 26 insertions, 21 deletions
diff --git a/storage/maria/ft_maria.c b/storage/maria/ft_maria.c index 1b082f904d0..b1b24592593 100644 --- a/storage/maria/ft_maria.c +++ b/storage/maria/ft_maria.c @@ -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) diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index e4e43bcfcfe..9097731c227 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -1688,7 +1688,8 @@ static my_bool get_head_or_tail_page(MARIA_HA *info, if (!page_link.changed) goto crashed; - DBUG_ASSERT((res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); + DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == + page_type); if (!(dir= find_free_position(page_type == HEAD_PAGE ? info : 0, res->buff, block_size, &res->rownr, &res->length, &res->empty_space))) diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 5df88a230a9..ae494cda385 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -299,7 +299,7 @@ static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param, } -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_INFO *ftb) 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(MYSQL_FTPARSER_PARAM *param, -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; diff --git a/storage/myisam/ft_myisam.c b/storage/myisam/ft_myisam.c index bef3fbfd5f5..7bcc62d5bf5 100644 --- a/storage/myisam/ft_myisam.c +++ b/storage/myisam/ft_myisam.c @@ -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) diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index c4d27bcbd8e..90ad2d635b7 100644 --- a/storage/myisam/ft_nlq_search.c +++ b/storage/myisam/ft_nlq_search.c @@ -204,7 +204,8 @@ static int FT_DOC_cmp(void *unused __attribute__((unused)), 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; diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c index e4d500f6d8a..f585038f0b8 100644 --- a/storage/myisam/ft_parser.c +++ b/storage/myisam/ft_parser.c @@ -304,7 +304,7 @@ static int ft_parse_internal(MYSQL_FTPARSER_PARAM *param, } -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) { diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c index db4cd3b32b6..9544c577c70 100644 --- a/storage/myisam/ft_stopwords.c +++ b/storage/myisam/ft_stopwords.c @@ -21,7 +21,7 @@ typedef struct st_ft_stopwords { const char * pos; - uint len; + size_t len; } FT_STOPWORD; static TREE *stopwords3=NULL; diff --git a/storage/myisam/ftdefs.h b/storage/myisam/ftdefs.h index 2b4c46c78ad..b26fa523b42 100644 --- a/storage/myisam/ftdefs.h +++ b/storage/myisam/ftdefs.h @@ -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 *, const uchar **, const uchar *, 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, const uchar *, MEM_ROOT *); 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 *); diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c index 617b0e01b09..2ea17baf34a 100644 --- a/storage/xtradb/buf/buf0buf.c +++ b/storage/xtradb/buf/buf0buf.c @@ -76,10 +76,10 @@ inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx) block->page.offset, DPAH_SIZE << 3); block_hash_byte = block_hash >> 3; block_hash_offset = (byte) block_hash & 0x07; - if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE) - fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset); - if (block_hash_offset < 0 || block_hash_offset > 7) - fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset); + if (block_hash_byte >= DPAH_SIZE) + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", (unsigned long) block_hash_byte, (unsigned long) block_hash_offset); + if (block_hash_offset > 7) + fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", (unsigned long) block_hash_byte, (unsigned long) block_hash_offset); if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0) trx->distinct_page_access++; trx->distinct_page_access_hash[block_hash_byte] |= (byte) 0x01 << block_hash_offset; diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index f282b141282..fce4e66a791 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -2992,7 +2992,7 @@ i_s_innodb_admin_command_fill( char** query_str; char* ptr; char quote = '\0'; - char* command_head = "XTRA_"; + const char* command_head = "XTRA_"; DBUG_ENTER("i_s_innodb_admin_command_fill"); |