maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #02031
bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2805)
#At lp:maria based on revid:knielsen@xxxxxxxxxxxxxxx-20100128072046-x28qsbhoudenjj0f
2805 Michael Widenius 2010-01-28 [merge]
Merge with fixes for compiler warnings and 2 fixed test cases
Fixed some additional compiler warnings from OpenSolaris build.
modified:
extra/libevent/devpoll.c
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
mysys/my_file.c
sql/item.cc
sql/mysqld.cc
sql/rpl_record.cc
storage/maria/ft_maria.c
storage/maria/ma_blockrec.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
storage/xtradb/buf/buf0buf.c
storage/xtradb/handler/i_s.cc
support-files/compiler_warnings.supp
per-file messages:
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.
=== modified file 'extra/libevent/devpoll.c'
--- a/extra/libevent/devpoll.c 2010-01-07 13:00:06 +0000
+++ b/extra/libevent/devpoll.c 2010-01-28 11:35:10 +0000
@@ -140,7 +140,7 @@ devpoll_init(struct event_base *base)
return (NULL);
if (getrlimit(RLIMIT_NOFILE, &rl) == 0 &&
- rl.rlim_cur != RLIM_INFINITY)
+ (unsigned long long) rl.rlim_cur != (unsigned long long) RLIM_INFINITY)
nfiles = rl.rlim_cur - 1;
/* Initialize the kernel queue */
=== 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 'mysys/my_file.c'
--- a/mysys/my_file.c 2006-12-23 19:20:40 +0000
+++ b/mysys/my_file.c 2010-01-28 11:35:10 +0000
@@ -51,7 +51,7 @@ static uint set_max_open_files(uint max_
DBUG_PRINT("info", ("rlim_cur: %u rlim_max: %u",
(uint) rlimit.rlim_cur,
(uint) rlimit.rlim_max));
- if (rlimit.rlim_cur == RLIM_INFINITY)
+ if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY)
rlimit.rlim_cur = max_file_limit;
if (rlimit.rlim_cur >= max_file_limit)
DBUG_RETURN(rlimit.rlim_cur); /* purecov: inspected */
=== 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 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-01-15 15:27:55 +0000
+++ b/sql/mysqld.cc 2010-01-28 11:35:10 +0000
@@ -2704,7 +2704,7 @@ static void init_signals(void)
{
/* Change limits so that we will get a core file */
STRUCT_RLIMIT rl;
- rl.rlim_cur = rl.rlim_max = RLIM_INFINITY;
+ rl.rlim_cur = rl.rlim_max = (rlim_t) RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &rl) && global_system_variables.log_warnings)
sql_print_warning("setrlimit could not change the size of core files to 'infinity'; We may not be able to generate a core file on signals");
}
=== modified file 'sql/rpl_record.cc'
--- a/sql/rpl_record.cc 2009-10-22 00:15:45 +0000
+++ b/sql/rpl_record.cc 2010-01-28 11:35:10 +0000
@@ -366,7 +366,6 @@ int prepare_record(TABLE *const table,
*/
for (Field **field_ptr= table->field+skip; *field_ptr; ++field_ptr)
{
- uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG;
Field *const f= *field_ptr;
if ((f->flags & NO_DEFAULT_VALUE_FLAG) &&
(f->real_type() != MYSQL_TYPE_ENUM))
=== 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/maria/ma_blockrec.c'
--- a/storage/maria/ma_blockrec.c 2010-01-06 21:27:53 +0000
+++ b/storage/maria/ma_blockrec.c 2010-01-28 11:35:10 +0000
@@ -1688,7 +1688,8 @@ static my_bool get_head_or_tail_page(MAR
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)))
=== 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 *);
=== modified file 'storage/xtradb/buf/buf0buf.c'
--- a/storage/xtradb/buf/buf0buf.c 2010-01-06 12:00:14 +0000
+++ b/storage/xtradb/buf/buf0buf.c 2010-01-28 11:35:10 +0000
@@ -76,10 +76,10 @@ inline void _increment_page_get_statisti
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;
=== modified file 'storage/xtradb/handler/i_s.cc'
--- a/storage/xtradb/handler/i_s.cc 2010-01-15 15:58:25 +0000
+++ b/storage/xtradb/handler/i_s.cc 2010-01-28 11:35:10 +0000
@@ -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");
=== modified file 'support-files/compiler_warnings.supp'
--- a/support-files/compiler_warnings.supp 2010-01-06 21:27:53 +0000
+++ b/support-files/compiler_warnings.supp 2010-01-28 11:35:10 +0000
@@ -28,6 +28,12 @@ pars0lex.l: .*conversion from 'ulint' to
btr/btr0cur\.c: .*value computed is not used.*: 3175-3375
include/buf0buf\.ic: unused parameter ���mtr���
fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199
+fil/fil0fil\.c: unused parameter
+log/log0recv\.c: unused variable
+os/os0file\.c: unused parameter
+handler/i_s\.cc: unused variable
+sync/sync0rw\.c: unused parameter
+sync/sync0sync\.c: unused parameter
#
# bdb is not critical to keep up to date
@@ -50,6 +56,11 @@ db_vrfy.c : .*comparison is always false
.*/extra/libevent/select\.c : .*comparison between signed and unsigned.* : 270-280
#
+# Ignore warnings from system libraries
+#
+/usr/share/aclocal/audiofile.m4 : .*
+
+#
# Ignore all conversion warnings on windows 64
# (Is safe as we are not yet supporting strings >= 2G)
#
@@ -102,6 +113,8 @@ include/runtime.hpp: .*pure_error.*
#
listener.cc : .*conversion from 'SOCKET' to 'int'.*
net_serv.cc : .*conversion from 'SOCKET' to 'int'.*
+set_var.cc: right-hand operand of comma has no effect : 1000-1400
+
# allow a little moving space for the warning below
mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600