WL#2775: System tables for master.info, relay_log.info

Affects: Server-5.6   —   Status: Complete

SUMMARY
-------
Replace the master.info and relay_log.info files with system tables.

MOTIVATION
----------
1. Get rid of the files making the system more easy to manage.
   This becomes especially important with WL#1697 Multi-source
   since that implementation would create sets of files
   for *every* named master.

2. System table updates should be intermixed with the 
ongoing transaction, thus making the replication more fault tolerant.  
I.e. it would be impossible for the slave to crash between the data 
update and the relay_log_pos update...

3. Brian wants this as part of multi-source (WL#1697).


RELATED WORKLOGS
----------------
(Impact on and by)
WL#1697 - Multi-source replication.
WL#3584 - Group-ids (global-bin-log positions).
WL#4209 - Integrate Backup with Replication.
WL#4621 - Recovery process to synchronize the master.info, the relay-log.info
and the relay-log after a failure.
WL#5125	- Refactory of Slave master.info and slave.info

(Previous work towards this worklog)
WL#3089 - Refactoring for multi-source and info system tables.

(Additional thoughts)
WL#3835 - Slave tables to track progress of replication.

(Different alternative with XA)
WL#3970 - Safe slave positions.


DECISIONS
---------
This should be first discussed with Mats and then reviewed by 
Peter G.  Configuration of this new system table needs to be 
very clearly specified.  -- Lars Thalmann, 2009-01-26


OPEN ISSUES
-----------
1. Perhaps consider storing the password as encrypted.

"Due to the lack of time, we are not going to consider this as
part of this worklog." -- Alfranio, 2009-10-16

2. Although the code can be easily extended to support WL#1697 -
Multi-source replication, this still requires additional work.

3. We are not considering the integration with Backup, WL#4209 - 
Integrate Backup with Replication.


BUGS
----
BUG#55105 - Some PB2 tests fail sporadically with SIGSEGV in
inline_mysql_mutex_lock.

BUG#56324 - Race Condition while shutting down MySQL: "PSI_server"

BUG#51054 - mysqld segfault after binlog enabled

The bugs above need to be fixed so we can properly test this worklog.