Commit 75b555dc authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings and test cases problems found by buildbot


mysql-test/r/dyncol.result:
  Updated test results
mysql-test/r/index_intersect.result:
  Updated results
mysql-test/r/index_intersect_innodb.result:
  Updated results
mysql-test/t/dyncol.test:
  Added replace_result for floating point results that are different on windows
  Added round() around a result to get same result on all platforms.
mysql-test/t/index_intersect.test:
  Added replace_result to fix that index_merge may put key names in different order.
mysys/ma_dyncol.c:
  Fixed compiler warnings on Solaris
sql/key.cc:
  Fixed compiler warnings on Solaris
sql/mysqld.cc:
  Fixed compiler warning on windows
support-files/compiler_warnings.supp:
  Suppressed an unintersting warning on Solaris
parent f4491ade
...@@ -444,9 +444,9 @@ column_get(column_create(1, "8:46:06.23434" AS time), 1 as double) ...@@ -444,9 +444,9 @@ column_get(column_create(1, "8:46:06.23434" AS time), 1 as double)
select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double); select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double);
column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double) column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double)
20110405084606.2 20110405084606.2
select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)); select round(column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)),3);
column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)) round(column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)),3)
20110405084606.234375 20110405084606.234
select column_get(column_create(1, NULL AS double), 1 as double); select column_get(column_create(1, NULL AS double), 1 as double);
column_get(column_create(1, NULL AS double), 1 as double) column_get(column_create(1, NULL AS double), 1 as double)
NULL NULL
......
...@@ -371,7 +371,7 @@ EXPLAIN ...@@ -371,7 +371,7 @@ EXPLAIN
SELECT * FROM City SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%'; WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country,Name Name 35 NULL # Using index condition; Using where; Rowid-ordered scan 1 SIMPLE City range Population,Name,Country Name # NULL # Using index condition; Using where; Rowid-ordered scan
SELECT * FROM City USE INDEX () SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%'; WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
ID Name Country Population ID Name Country Population
......
...@@ -372,7 +372,7 @@ EXPLAIN ...@@ -372,7 +372,7 @@ EXPLAIN
SELECT * FROM City SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%'; WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Population,Name,Country 4,35,3 NULL # Using sort_intersect(Population,Name,Country); Using where 1 SIMPLE City index_merge Population,Name,Country Population,Name,Country # NULL # Using sort_intersect(Population,Name,Country); Using where
SELECT * FROM City USE INDEX () SELECT * FROM City USE INDEX ()
WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%'; WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
ID Name Country Population ID Name Country Population
......
...@@ -86,6 +86,7 @@ select column_get(column_create(1, -1212 AS int), 1 as unsigned int); ...@@ -86,6 +86,7 @@ select column_get(column_create(1, -1212 AS int), 1 as unsigned int);
select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int); select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 as unsigned int);
select column_get(column_create(1, 999.9999999999999999 AS decimal), 1 as unsigned int); select column_get(column_create(1, 999.9999999999999999 AS decimal), 1 as unsigned int);
select column_get(column_create(1, -1 AS decimal), 1 as unsigned int); select column_get(column_create(1, -1 AS decimal), 1 as unsigned int);
--replace_result 1e+029 1e+29
select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as unsigned int); select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as unsigned int);
select column_get(column_create(1, 999.9 AS double), 1 as unsigned int); select column_get(column_create(1, 999.9 AS double), 1 as unsigned int);
select column_get(column_create(1, -1 AS double), 1 as unsigned int); select column_get(column_create(1, -1 AS double), 1 as unsigned int);
...@@ -115,6 +116,7 @@ select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1 ...@@ -115,6 +116,7 @@ select column_get(column_create(1, 99999999999999999999999999999 AS decimal), 1
select column_get(column_create(1, -99999999999999999999999999999 AS decimal), 1 as int); select column_get(column_create(1, -99999999999999999999999999999 AS decimal), 1 as int);
select column_get(column_create(1, 999.9999999999999999 AS decimal), 1 as int); select column_get(column_create(1, 999.9999999999999999 AS decimal), 1 as int);
select column_get(column_create(1, 999.9 AS double), 1 as int); select column_get(column_create(1, 999.9 AS double), 1 as int);
--replace_result 1e+029 1e+29
select column_get(column_create(1, -99999999999999999999999999999 AS double), 1 as int); select column_get(column_create(1, -99999999999999999999999999999 AS double), 1 as int);
select column_get(column_create(1, "-1212III" AS char), 1 as int); select column_get(column_create(1, "-1212III" AS char), 1 as int);
select column_get(column_create(1, "1212III" AS char), 1 as int); select column_get(column_create(1, "1212III" AS char), 1 as int);
...@@ -161,7 +163,8 @@ select column_get(column_create(1, -99999999999999999999999999999 AS decimal), 1 ...@@ -161,7 +163,8 @@ select column_get(column_create(1, -99999999999999999999999999999 AS decimal), 1
select column_get(column_create(1, "2011-04-05" AS date), 1 as double); select column_get(column_create(1, "2011-04-05" AS date), 1 as double);
select column_get(column_create(1, "8:46:06.23434" AS time), 1 as double); select column_get(column_create(1, "8:46:06.23434" AS time), 1 as double);
select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double); select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double);
select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)); # The replace result is needed for windows.
select round(column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)),3);
select column_get(column_create(1, NULL AS double), 1 as double); select column_get(column_create(1, NULL AS double), 1 as double);
-- echo # column get real truncation & warnings -- echo # column get real truncation & warnings
...@@ -241,6 +244,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as d ...@@ -241,6 +244,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as d
select column_get(column_create(1, 9223372036854775807 AS int), 1 as datetime); select column_get(column_create(1, 9223372036854775807 AS int), 1 as datetime);
select column_get(column_create(1, -9223372036854775808 AS int), 1 as datetime); select column_get(column_create(1, -9223372036854775808 AS int), 1 as datetime);
select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as datetime); select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as datetime);
--replace_result 1e+028 1e+28
select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as datetime); select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as datetime);
select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as datetime); select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as datetime);
select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as datetime); select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as datetime);
...@@ -286,6 +290,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as d ...@@ -286,6 +290,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as d
select column_get(column_create(1, 9223372036854775807 AS int), 1 as date); select column_get(column_create(1, 9223372036854775807 AS int), 1 as date);
select column_get(column_create(1, -9223372036854775808 AS int), 1 as date); select column_get(column_create(1, -9223372036854775808 AS int), 1 as date);
select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as date); select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as date);
--replace_result 1e+028 1e+28
select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as date); select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as date);
select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as date); select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as date);
select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as date); select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as date);
...@@ -330,6 +335,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as t ...@@ -330,6 +335,7 @@ select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as t
select column_get(column_create(1, 9223372036854775807 AS int), 1 as time); select column_get(column_create(1, 9223372036854775807 AS int), 1 as time);
select column_get(column_create(1, -9223372036854775808 AS int), 1 as time); select column_get(column_create(1, -9223372036854775808 AS int), 1 as time);
select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as time); select column_get(column_create(1, 99999999999999999999999999999 AS decimal(32,10)), 1 as time);
--replace_result 1e+028 1e+28
select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as time); select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as time);
select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as time); select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as time);
select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time); select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time);
......
...@@ -136,7 +136,8 @@ EXPLAIN ...@@ -136,7 +136,8 @@ EXPLAIN
SELECT * FROM City SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%'; WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
--replace_column 9 # --replace_column 7 # 9 #
--replace_result Population,Country,Name Population,Name,Country
EXPLAIN EXPLAIN
SELECT * FROM City SELECT * FROM City
WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%'; WHERE Name BETWEEN 'G' AND 'K' AND Population > 500000 AND Country LIKE 'C%';
......
...@@ -905,6 +905,7 @@ static void type_and_offset_read(DYNAMIC_COLUMN_TYPE *type, ...@@ -905,6 +905,7 @@ static void type_and_offset_read(DYNAMIC_COLUMN_TYPE *type,
uchar *place, size_t offset_size) uchar *place, size_t offset_size)
{ {
ulong val; ulong val;
LINT_INIT(val);
place+= COLUMN_NUMBER_SIZE; /* skip column number */ place+= COLUMN_NUMBER_SIZE; /* skip column number */
switch (offset_size) { switch (offset_size) {
...@@ -1611,6 +1612,7 @@ find_place(uint num, uchar *header, size_t entry_size, ...@@ -1611,6 +1612,7 @@ find_place(uint num, uchar *header, size_t entry_size,
{ {
uint mid, start, end, val; uint mid, start, end, val;
int flag; int flag;
LINT_INIT(flag); /* 100 % safe */
start= 0; start= 0;
end= column_count -1; end= column_count -1;
......
...@@ -761,6 +761,7 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts, ...@@ -761,6 +761,7 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts,
LINT_INIT(cs); LINT_INIT(cs);
LINT_INIT(length1); LINT_INIT(length1);
LINT_INIT(length2); LINT_INIT(length2);
LINT_INIT(pack_length);
key1+= key_part->length; key1+= key_part->length;
key2+= key_part->length; key2+= key_part->length;
......
...@@ -4661,7 +4661,7 @@ int main(int argc, char **argv) ...@@ -4661,7 +4661,7 @@ int main(int argc, char **argv)
#ifndef DBUG_OFF #ifndef DBUG_OFF
test_lc_time_sz(); test_lc_time_sz();
srand(time(NULL)); srand((uint) time(NULL));
#endif #endif
/* /*
......
...@@ -67,7 +67,6 @@ vi\.c : unused parameter ...@@ -67,7 +67,6 @@ vi\.c : unused parameter
common\.c : unused parameter common\.c : unused parameter
term\.c : .* term\.c : .*
# #
# Ignore some warnings in libevent, which is not maintained by us. # Ignore some warnings in libevent, which is not maintained by us.
# #
...@@ -146,6 +145,7 @@ table_xt\.cc : variable.*might be clobbered by.*longjmp ...@@ -146,6 +145,7 @@ table_xt\.cc : variable.*might be clobbered by.*longjmp
# #
# Yassl # Yassl
#
include/runtime.hpp: .*pure_error.* include/runtime.hpp: .*pure_error.*
.*/extra/yassl/.*taocrypt/.*: comparison with string literal .*/extra/yassl/.*taocrypt/.*: comparison with string literal
.*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds .*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds
...@@ -158,6 +158,12 @@ mySTL/algorithm\.hpp: is used uninitialized in this function ...@@ -158,6 +158,12 @@ mySTL/algorithm\.hpp: is used uninitialized in this function
# #
.*/dbug/.*(groff|<standard input>) : .* .*/dbug/.*(groff|<standard input>) : .*
#
# Warnings on OpenSolaris
#
.*/my_config\.h : _FILE_OFFSET_BITS
/usr/include/sys/feature_tests.h : this is the location of the previous definition
# #
# Unexplanable (?) stuff # Unexplanable (?) stuff
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment