Commit ea65c36c authored by unknown's avatar unknown

Fixed compiler warnings

Fixed wrong merge that disabled 'make test'
Renamed all suppress files to end in '.supp'
Don't give "skipped %d bytes from file" warnings in 5.0


mysql-test/purify.supp:
  Rename: mysql-test/suppress.purify -> mysql-test/purify.supp
support-files/compiler_warnings.supp:
  Rename: support-files/disabled_compiler_warnings.txt -> support-files/compiler_warnings.supp
Makefile.am:
  Added back missing cd from wrong merge
heap/hp_write.c:
  Fixed compiler warning
mysql-test/r/mysqlbinlog.result:
  Fixed test case to drop all used tables at start and used tables after each test group
mysql-test/t/mysqlbinlog.test:
  Fixed test case to drop all used tables at start and used tables after each test group
sql/net_serv.cc:
  Don't give "skipped %d bytes from file" warnings in 5.0
  (The proper fix for this is in 5.1)
sql/table.cc:
  Fixed compiler warning
parent 3b31ad35
...@@ -123,6 +123,7 @@ tags: ...@@ -123,6 +123,7 @@ tags:
# making sure each user use different ports. # making sure each user use different ports.
test-ps: test-ps:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --ps-protocol @PERL@ ./mysql-test-run.pl $(force) --ps-protocol
test-ns: test-ns:
......
...@@ -68,7 +68,7 @@ int heap_write(HP_INFO *info, const byte *record) ...@@ -68,7 +68,7 @@ int heap_write(HP_INFO *info, const byte *record)
err: err:
if (my_errno == HA_ERR_FOUND_DUPP_KEY) if (my_errno == HA_ERR_FOUND_DUPP_KEY)
DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef)); DBUG_PRINT("info",("Duplicate key: %d", (int) (keydef - share->keydef)));
info->errkey= keydef - share->keydef; info->errkey= keydef - share->keydef;
/* /*
We don't need to delete non-inserted key from rb-tree. Also, if We don't need to delete non-inserted key from rb-tree. Also, if
......
set timestamp=1000000000; set timestamp=1000000000;
drop table if exists t1,t2; drop table if exists t1,t2,t3,t4,t5,t03,t04;
create table t1 (word varchar(20)); create table t1 (word varchar(20));
create table t2 (id int auto_increment not null primary key); create table t2 (id int auto_increment not null primary key);
insert into t1 values ("abirvalg"); insert into t1 values ("abirvalg");
...@@ -23,7 +23,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq ...@@ -23,7 +23,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq
SET @@session.sql_mode=0/*!*/; SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/; /*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
drop table if exists t1,t2/*!*/; drop table if exists t1,t2,t3,t4,t5,t03,t04/*!*/;
SET TIMESTAMP=1000000000/*!*/; SET TIMESTAMP=1000000000/*!*/;
create table t1 (word varchar(20))/*!*/; create table t1 (word varchar(20))/*!*/;
SET TIMESTAMP=1000000000/*!*/; SET TIMESTAMP=1000000000/*!*/;
...@@ -100,7 +100,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq ...@@ -100,7 +100,7 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq
SET @@session.sql_mode=0/*!*/; SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/; /*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
drop table if exists t1,t2/*!*/; drop table if exists t1,t2,t3,t4,t5,t03,t04/*!*/;
SET TIMESTAMP=1000000000/*!*/; SET TIMESTAMP=1000000000/*!*/;
create table t1 (word varchar(20))/*!*/; create table t1 (word varchar(20))/*!*/;
SET TIMESTAMP=1000000000/*!*/; SET TIMESTAMP=1000000000/*!*/;
...@@ -192,6 +192,7 @@ DELIMITER ; ...@@ -192,6 +192,7 @@ DELIMITER ;
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
drop table t1,t2;
flush logs; flush logs;
create table t3 (f text character set utf8); create table t3 (f text character set utf8);
create table t4 (f text character set cp932); create table t4 (f text character set cp932);
...@@ -209,13 +210,14 @@ HEX(f) ...@@ -209,13 +210,14 @@ HEX(f)
select HEX(f) from t4; select HEX(f) from t4;
HEX(f) HEX(f)
835C 835C
drop table t3,t4,t03,t04;
flush logs; flush logs;
select * from t5 /* must be (1),(1) */; select * from t5 /* must be (1),(1) */;
a a
1 1
1 1
drop table t5;
flush logs; flush logs;
drop table if exists t5;
create table t5 (c1 int, c2 varchar(128) character set latin1 not null); create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
insert into t5 values (1, date_format('2001-01-01','%W')); insert into t5 values (1, date_format('2001-01-01','%W'));
set lc_time_names=de_DE; set lc_time_names=de_DE;
...@@ -234,6 +236,7 @@ c1 c2 ...@@ -234,6 +236,7 @@ c1 c2
1 Monday 1 Monday
2 Montag 2 Montag
3 Monday 3 Monday
drop table t5;
drop procedure if exists p1; drop procedure if exists p1;
flush logs; flush logs;
create procedure p1() create procedure p1()
...@@ -269,4 +272,3 @@ call p1(); ...@@ -269,4 +272,3 @@ call p1();
1 1
1 1
drop procedure p1; drop procedure p1;
drop table t1, t2, t03, t04, t3, t4, t5;
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
set timestamp=1000000000; set timestamp=1000000000;
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2,t3,t4,t5,t03,t04;
--enable_warnings --enable_warnings
create table t1 (word varchar(20)); create table t1 (word varchar(20));
...@@ -106,8 +106,11 @@ select "--- reading stdin --" as ""; ...@@ -106,8 +106,11 @@ select "--- reading stdin --" as "";
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 --exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
drop table t1,t2;
#
# Bug#16217 (mysql client did not know how not switch its internal charset) # Bug#16217 (mysql client did not know how not switch its internal charset)
#
flush logs; flush logs;
create table t3 (f text character set utf8); create table t3 (f text character set utf8);
create table t4 (f text character set cp932); create table t4 (f text character set cp932);
...@@ -121,6 +124,7 @@ select HEX(f) from t03; ...@@ -121,6 +124,7 @@ select HEX(f) from t03;
select HEX(f) from t3; select HEX(f) from t3;
select HEX(f) from t04; select HEX(f) from t04;
select HEX(f) from t4; select HEX(f) from t4;
drop table t3,t4,t03,t04;
# #
#BUG#14157: utf8 encoding in binlog without set character_set_client #BUG#14157: utf8 encoding in binlog without set character_set_client
...@@ -133,6 +137,7 @@ flush logs; ...@@ -133,6 +137,7 @@ flush logs;
# should use default-character-set same as the server. # should use default-character-set same as the server.
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
select * from t5 /* must be (1),(1) */; select * from t5 /* must be (1),(1) */;
drop table t5;
# #
# Bug#22645 LC_TIME_NAMES: Statement not replicated # Bug#22645 LC_TIME_NAMES: Statement not replicated
...@@ -140,7 +145,6 @@ select * from t5 /* must be (1),(1) */; ...@@ -140,7 +145,6 @@ select * from t5 /* must be (1),(1) */;
# lc_time_names dependent values correctly # lc_time_names dependent values correctly
# #
flush logs; flush logs;
drop table if exists t5;
create table t5 (c1 int, c2 varchar(128) character set latin1 not null); create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
insert into t5 values (1, date_format('2001-01-01','%W')); insert into t5 values (1, date_format('2001-01-01','%W'));
set lc_time_names=de_DE; set lc_time_names=de_DE;
...@@ -152,6 +156,8 @@ flush logs; ...@@ -152,6 +156,8 @@ flush logs;
drop table t5; drop table t5;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL
select * from t5 order by c1; select * from t5 order by c1;
drop table t5;
# #
# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails # Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
# #
...@@ -175,6 +181,8 @@ call p1(); ...@@ -175,6 +181,8 @@ call p1();
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000009 | $MYSQL --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000009 | $MYSQL
call p1(); call p1();
drop procedure p1; drop procedure p1;
#
# Some coverage of not normally used parts # Some coverage of not normally used parts
# #
--disable_query_log --disable_query_log
...@@ -182,7 +190,4 @@ drop procedure p1; ...@@ -182,7 +190,4 @@ drop procedure p1;
--exec $MYSQL_BINLOG --help 2>&1 > /dev/null --exec $MYSQL_BINLOG --help 2>&1 > /dev/null
--enable_query_log --enable_query_log
# clean up
drop table t1, t2, t03, t04, t3, t4, t5;
# End of 5.0 tests # End of 5.0 tests
...@@ -299,7 +299,7 @@ void net_clear(NET *net) ...@@ -299,7 +299,7 @@ void net_clear(NET *net)
{ {
DBUG_PRINT("info",("skipped %d bytes from file: %s", DBUG_PRINT("info",("skipped %d bytes from file: %s",
count, vio_description(net->vio))); count, vio_description(net->vio)));
#ifdef EXTRA_DEBUG #if defined(EXTRA_DEBUG) && (MYSQL_VERSION_ID < 51000)
fprintf(stderr,"skipped %d bytes from file: %s\n", fprintf(stderr,"skipped %d bytes from file: %s\n",
count, vio_description(net->vio)); count, vio_description(net->vio));
#endif #endif
......
...@@ -2915,7 +2915,8 @@ Field_iterator_table_ref::get_or_create_column_ref(TABLE_LIST *parent_table_ref) ...@@ -2915,7 +2915,8 @@ Field_iterator_table_ref::get_or_create_column_ref(TABLE_LIST *parent_table_ref)
uint field_count; uint field_count;
TABLE_LIST *add_table_ref= parent_table_ref ? TABLE_LIST *add_table_ref= parent_table_ref ?
parent_table_ref : table_ref; parent_table_ref : table_ref;
LINT_INIT(field_count);
if (field_it == &table_field_it) if (field_it == &table_field_it)
{ {
/* The field belongs to a stored table. */ /* The field belongs to a stored table. */
......
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