WL#3725: ndb_apply_status extension for generic replication

Affects: Server-5.1   —   Status: Complete

ndb_apply_status is today only used in cluster -> cluster replication

this WL extends the usage to  "any engine" -> cluster replication

Note added by Trudy Pelzer, 2007-03-12:
This is a 5.1 task, needed to fix tagged BUG#26783
"replication status unknown after cluster or mysqld failure";
per Calvin.
----------- master (innodb table)

master> show binlog events;
+-------------------+-----+-------------+-----------+-------------+---------------------------------------------------------------+
| Log_name          | Pos | Event_type  | Server_id | End_log_pos | Info       
                                                  |
+-------------------+-----+-------------+-----------+-------------+---------------------------------------------------------------+
| master-bin.000001 |   4 | Format_desc |         1 |         102 | Server ver:
5.1.16-beta-valgrind-max-debug-log, Binlog ver: 4 |
| master-bin.000001 | 102 | Query       |         1 |          90 | use `test`;
insert into t1 values (1,1)                       |
| master-bin.000001 | 192 | Xid         |         1 |         219 | COMMIT /*
xid=6 */                                            |


------------slave (ndb table)


slave> select * from mysql.ndb_apply_status;
+-----------+-------+-------------------+-----------+---------+
| server_id | epoch | log_name          | start_pos | end_pos |
+-----------+-------+-------------------+-----------+---------+
|         1 |     0 | master-bin.000001 |       102 |      90 |
+-----------+-------+-------------------+-----------+---------+



-------------master


master> show binlog events;
+-------------------+-----+-------------+-----------+-------------+---------------------------------------------------------------+
| Log_name          | Pos | Event_type  | Server_id | End_log_pos | Info       
                                                  |
+-------------------+-----+-------------+-----------+-------------+---------------------------------------------------------------+
| master-bin.000001 |   4 | Format_desc |         1 |         102 | Server ver:
5.1.16-beta-valgrind-max-debug-log, Binlog ver: 4 |
| master-bin.000001 | 102 | Query       |         1 |          90 | use `test`;
insert into t1 values (1,1)                       |
| master-bin.000001 | 192 | Xid         |         1 |         219 | COMMIT /*
xid=6 */                                            |
| master-bin.000001 | 219 | Query       |         1 |         287 | use `test`;
BEGIN                                             |
| master-bin.000001 | 287 | Query       |         1 |          90 | use `test`;
insert into t1 values (2,1)                       |
| master-bin.000001 | 377 | Query       |         1 |         180 | use `test`;
insert into t1 values (3,1)                       |
| master-bin.000001 | 467 | Xid         |         1 |         494 | COMMIT /*
xid=45 */                                           |



----------- slave

slave> select * from mysql.ndb_apply_status;
+-----------+-------+-------------------+-----------+---------+
| server_id | epoch | log_name          | start_pos | end_pos |
+-----------+-------+-------------------+-----------+---------+
|         1 |     0 | master-bin.000001 |       219 |     494 |
+-----------+-------+-------------------+-----------+---------+


No LLD needed, see BUG#26783 and HLS for details.
-- Trudy Pelzer, 2007-06-18