Commit c4b15b2e authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-rpl
parents d654c577 49d2135c
...@@ -3,10 +3,15 @@ create table t1 (a int key) engine=ndb; ...@@ -3,10 +3,15 @@ create table t1 (a int key) engine=ndb;
reset master; reset master;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN master-bin.000001 # Incident # # #1 (LOST_EVENTS)
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Rotate # # master-bin.000002;pos=4
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) PURGE MASTER LOGS TO 'master-bin.000002';
master-bin.000001 # Write_rows # # table_id: # show binlog events from <binlog_start>;
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # COMMIT master-bin.000002 # Query # # BEGIN
master-bin.000002 # Table_map # # table_id: # (test.t1)
master-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000002 # Write_rows # # table_id: #
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000002 # Query # # COMMIT
drop table t1; drop table t1;
...@@ -99,33 +99,33 @@ show binlog events in 'slave-bin.000001' from 4; ...@@ -99,33 +99,33 @@ show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
slave-bin.000001 # Query 2 # BEGIN slave-bin.000001 # Query 1 # BEGIN
slave-bin.000001 # Table_map 2 # table_id: # (test.t1) slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000001 # Write_rows 2 # table_id: # slave-bin.000001 # Write_rows 2 # table_id: #
slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; drop table t1
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
slave-bin.000001 # Query 2 # BEGIN slave-bin.000001 # Query 1 # BEGIN
slave-bin.000001 # Table_map 2 # table_id: # (test.t1) slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000001 # Write_rows 2 # table_id: # slave-bin.000001 # Write_rows 2 # table_id: #
slave-bin.000001 # Write_rows 2 # table_id: # slave-bin.000001 # Write_rows 1 # table_id: #
slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4; show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
slave-bin.000002 # Query 2 # BEGIN slave-bin.000002 # Query 1 # BEGIN
slave-bin.000002 # Table_map 2 # table_id: # (test.t2) slave-bin.000002 # Table_map 2 # table_id: # (test.t2)
slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status) slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000002 # Write_rows 2 # table_id: # slave-bin.000002 # Write_rows 2 # table_id: #
slave-bin.000002 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
slave-bin.000002 # Query 2 # COMMIT slave-bin.000002 # Query 1 # COMMIT
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # # 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No #
......
...@@ -29,5 +29,8 @@ while ($mysql_errno) ...@@ -29,5 +29,8 @@ while ($mysql_errno)
} }
--enable_query_log --enable_query_log
--source include/show_binlog_events.inc
PURGE MASTER LOGS TO 'master-bin.000002';
--source include/show_binlog_events.inc --source include/show_binlog_events.inc
drop table t1; drop table t1;
...@@ -3589,6 +3589,14 @@ restart: ...@@ -3589,6 +3589,14 @@ restart:
/* /*
Main NDB Injector loop Main NDB Injector loop
*/ */
{
/*
Always insert a GAP event as we cannot know what has happened in the cluster
while not being connected.
*/
LEX_STRING const msg= { C_STRING_WITH_LEN("Cluster connect") };
inj->record_incident(thd, INCIDENT_LOST_EVENTS, msg);
}
{ {
thd->proc_info= "Waiting for ndbcluster to start"; thd->proc_info= "Waiting for ndbcluster to start";
......
...@@ -198,7 +198,7 @@ int injector::record_incident(THD *thd, Incident incident) ...@@ -198,7 +198,7 @@ int injector::record_incident(THD *thd, Incident incident)
return 0; return 0;
} }
int injector::record_incident(THD *thd, Incident incident, LEX_STRING message) int injector::record_incident(THD *thd, Incident incident, LEX_STRING const message)
{ {
Incident_log_event ev(thd, incident, message); Incident_log_event ev(thd, incident, message);
if (int error= mysql_bin_log.write(&ev)) if (int error= mysql_bin_log.write(&ev))
......
...@@ -324,7 +324,7 @@ public: ...@@ -324,7 +324,7 @@ public:
void new_trans(THD *, transaction *); void new_trans(THD *, transaction *);
int record_incident(THD*, Incident incident); int record_incident(THD*, Incident incident);
int record_incident(THD*, Incident incident, LEX_STRING message); int record_incident(THD*, Incident incident, LEX_STRING const message);
private: private:
explicit injector(); explicit injector();
......
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