different log file for master and beta mysql
I see one solution to this situation is to have multiple commit of the same file.

let say 20140926.sql file  in this case, Now you have two changes one should go to Beta server and one to Master server.

You can have two seperate commit, changes that suppose to go to Beta in one commit and changes that is suppose to Master in other commit, with proper comment to indentify and versions incrementing count too can help.

Now while merge in Beta branch you can get the only version of commited for it and in Master the other corresponding version commited for it.