MySQL Bugs: #72682: Replication MBR halts-stored procedure from unreplicated schema
MySQL Bugs: #59135: Replicate-wild-do-table:cross-database updates and create SPs break replication
If you only use replicate-wild-do-table from the library, when the main library creates the stored procedure, the library will be out of sync, with the error message as follows:
150104 15:15:46 [ERROR] Slave sql:error ' Unknown database ' fdd_statistics ' on query. Default database: ' Fdd_statistics '. Query: ' CREATE definer= ' esf_frame ' @ '% ' PROCEDURE ' Yunying_basic_data_second_boss ' (in StartDate date)
BEGIN
Set @datetime = StartDate;
INSERT INTO Fdd_report_data_second_boss
If you use replicate-do-db, you can fix the problem, but this option cannot handle the problem of working with databases across libraries.
Another approach is to use the row level log format to address (in general, the use of mixed mixed mode), but the row level of the log to the binary file of the concurrency pressure is very large, generally not recommended, unless your MySQL pressure is relatively small.
There are several solutions.
1. If you do not have cross-library operations in your business, you can use the REPLICATE-DO-DB option from the library to specify the databases that need to be synchronized.
2. The database, which is the name of the new library and the main library, can be an empty library. This way you will find that the stored procedure is synchronized. You can use Show procedure status to view it.
The main library displays error 1049 from the library when the stored procedure is created