MySQL master slave replication-troubleshooting

MySQL

Why does the Procedure/function created on the master replicates to slave even after enabling table filters using "replicate-do-table". This create a lot of problems in the production setup as it rewrites the function already in the slave with the one modified in master.
I need to have two different functions in master and slave, only the table data needs to be replicated. Solution please

How to repeat:
Create a table in master

Replicate the table to slave with replicate-do-table option

create a function on master

it rewrites the function which was already there in slave with the same name

Best Answer

Because in MySQL all fuynctions and procedures are stored in the mysql system database rather than in the database where they were defined. So unless you exclude the mysql database from replication, the functions and procedures you define will replicate downstream.