Bug #31326: No compile check of order of initializations

 fixed -Wreorder warnings
parent 5244d7dc
...@@ -100,8 +100,10 @@ if [ "x$warning_mode" != "xpedantic" ]; then ...@@ -100,8 +100,10 @@ if [ "x$warning_mode" != "xpedantic" ]; then
# C warnings # C warnings
c_warnings="$warnings -Wunused-parameter" c_warnings="$warnings -Wunused-parameter"
# C++ warnings # C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder" cxx_warnings="$warnings"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor" # 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 # Added unless --with-debug=full
debug_extra_cflags="-O1 -Wuninitialized" debug_extra_cflags="-O1 -Wuninitialized"
else 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, ...@@ -29,9 +29,9 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
Master_info::Master_info() Master_info::Master_info()
:Slave_reporting_capability("I/O"), :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), 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; host[0] = 0; user[0] = 0; password[0] = 0;
ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[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, ...@@ -61,8 +61,8 @@ static handler *heap_create_handler(handlerton *hton,
*****************************************************************************/ *****************************************************************************/
ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg) ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0), records_changed(0), internal_table(0), :handler(hton, table_arg), file(0), records_changed(0), key_stat_version(0),
key_stat_version(0) internal_table(0)
{} {}
......
...@@ -425,8 +425,9 @@ public: ...@@ -425,8 +425,9 @@ public:
ArrayPool<TriggerRecord> & trp) ArrayPool<TriggerRecord> & trp)
: slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1) : slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1)
, tables(tp), triggers(trp), files(bp) , tables(tp), triggers(trp), files(bp)
, masterData(b), backup(b)
, ctlFilePtr(RNIL), logFilePtr(RNIL), dataFilePtr(RNIL) , ctlFilePtr(RNIL), logFilePtr(RNIL), dataFilePtr(RNIL)
, masterData(b), backup(b)
{ {
} }
......
...@@ -259,14 +259,14 @@ Pgman::execCONTINUEB(Signal* signal) ...@@ -259,14 +259,14 @@ Pgman::execCONTINUEB(Signal* signal)
// page entry // page entry
Pgman::Page_entry::Page_entry(Uint32 file_no, Uint32 page_no) : Pgman::Page_entry::Page_entry(Uint32 file_no, Uint32 page_no) :
m_state(0),
m_file_no(file_no), m_file_no(file_no),
m_state(0),
m_page_no(page_no), m_page_no(page_no),
m_real_page_i(RNIL), m_real_page_i(RNIL),
m_copy_page_i(RNIL),
m_lsn(0), m_lsn(0),
m_last_lcp(0), m_last_lcp(0),
m_dirty_count(0), m_dirty_count(0),
m_copy_page_i(RNIL),
m_busy_count(0), m_busy_count(0),
m_requests() 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