Added simulate_register_view_failure debug flag in mysql_register_view method. Wrote a test for the bug in view replication.