Commit 763c1132 authored by unknown's avatar unknown

Bug #31326: No compile check of order of initializations

 fixed -Wreorder warnings


BUILD/SETUP.sh:
  Bug #31326: enabled the -Wreorder warnings
sql/rpl_mi.cc:
  Bug #31326: fixed -Wreorder warnings
storage/heap/ha_heap.cc:
  Bug #31326: fixed -Wreorder warnings
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
  Bug #31326: fixed -Wreorder warnings
storage/ndb/src/kernel/blocks/pgman.cpp:
  Bug #31326: fixed -Wreorder warnings
parent 0cc269da
......@@ -100,8 +100,10 @@ if [ "x$warning_mode" != "xpedantic" ]; then
# C warnings
c_warnings="$warnings -Wunused-parameter"
# C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
cxx_warnings="$warnings"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wreorder"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
debug_extra_cflags="-O1 -Wuninitialized"
else
......
set autocommit=1;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; insert into bug16206 values(2)
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
f n Query 1 n use `test`; insert into bug16206 values(0)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; BEGIN
f n Query 1 n use `test`; insert into bug16206 values(2)
f n Query 1 n use `test`; COMMIT
f n Query 1 n use `test`; insert into bug16206 values(3)
drop table bug16206;
set autocommit=0;
End of 5.0 tests
-- source include/not_embedded.inc
-- source include/have_bdb.inc
#
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
#
set autocommit=1;
let $VERSION=`select version()`;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
--replace_result $VERSION VERSION
--replace_column 1 f 2 n 5 n
show binlog events;
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
--replace_result $VERSION VERSION
--replace_column 1 f 2 n 5 n
show binlog events;
drop table bug16206;
set autocommit=0;
--echo End of 5.0 tests
......@@ -29,9 +29,9 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
Master_info::Master_info()
:Slave_reporting_capability("I/O"),
ssl(0), fd(-1), io_thd(0), inited(0),
ssl(0), ssl_verify_server_cert(0), fd(-1), io_thd(0), inited(0),
abort_slave(0),slave_running(0),
ssl_verify_server_cert(0), slave_run_id(0)
slave_run_id(0)
{
host[0] = 0; user[0] = 0; password[0] = 0;
ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0;
......
......@@ -61,8 +61,8 @@ static handler *heap_create_handler(handlerton *hton,
*****************************************************************************/
ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0), records_changed(0), internal_table(0),
key_stat_version(0)
:handler(hton, table_arg), file(0), records_changed(0), key_stat_version(0),
internal_table(0)
{}
......
......@@ -425,8 +425,9 @@ public:
ArrayPool<TriggerRecord> & trp)
: slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1)
, tables(tp), triggers(trp), files(bp)
, masterData(b), backup(b)
, ctlFilePtr(RNIL), logFilePtr(RNIL), dataFilePtr(RNIL)
, masterData(b), backup(b)
{
}
......
......@@ -259,14 +259,14 @@ Pgman::execCONTINUEB(Signal* signal)
// page entry
Pgman::Page_entry::Page_entry(Uint32 file_no, Uint32 page_no) :
m_state(0),
m_file_no(file_no),
m_state(0),
m_page_no(page_no),
m_real_page_i(RNIL),
m_copy_page_i(RNIL),
m_lsn(0),
m_last_lcp(0),
m_dirty_count(0),
m_copy_page_i(RNIL),
m_busy_count(0),
m_requests()
{
......
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