Implement a new Performance_Schema table for the information returned by SHOW MASTER STATUS. (directly related to WL#3656) Benefits: - Information on master status can be SQL SELECTed to retrieve individual items according to the search attributes of SELECT; - the SELECTed material can be processed further in the server like to be assigned to a user variables etc. If both this WL and WL#3656 are implemented, it will be possible for a slave to have complete control of its replication status\footnote{A possible option is to delare a FEDERATED table on slave that bases on the new MASTER_STATUS table and deploy the controlling client on the slave server} Earlier implementation as I_S plugin https://launchpad.net/is-replication-status deviates from I_S convention to contain only meta-data related info. ------------- Status update, 2010-09-03 Need to investigate the possible overlap / integration with WL#2775 System tables for master.info, relay_log.info.
S0. The new table must follow all conventions of P_S database, incl.
the table definition is static and therefore to exists at bootstrap.
S1. The new table has the only record which has so many attributes as many lines
Show-Master-Status displays.
The type of the attributes correspond to their internal representation in
the server.
S2. It must be not-updatable by the user.
S3. It must be upgradable e.g to let add a new attribute.
The static code implementation is suggested similarly to WL#3656 case.
The current implementation aims at compatible to Show-Master-Status behaviour.
In future version the number of records can be extended to match the number of
connected slaves and new attributes be added to identify more the sending status
of the master that currently is missed.
The exact table definition
mysql> show create table performance_schema.MASTER_STATUS\G
*************************** 1. row ***************************
Table: MASTER_STATUS
Create Table: CREATE TABLE `MASTER_STATUS` (
File varchar(FN_REFLEN),
Position int,
Binlog_Do_DB varchar (256),
Binlog_Ignore_DB varchar (256)
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
is added to mysql_system_table.sql bootstrap script.
LLD of PERFORMANCE_SCHEMA.SLAVE_STATUS description applies to the current WL
with necessary modifications due to the number and types of the attributes.
Note:
-----
For comparison, the implementation of SHOW MASTER STATUS
is located in sql/rpl_master.cc, show_binlog_info().
