Hi All,
Indeed it is a bug.
Here is what I did to verify. I installed MariaDB at two paths on my machine (I could have had multiple data dirs but that struck me later). Wrote a DBUG_EXECUTE_IF as suggested by Kristian in mysql_register_view, which returned ER_OUT_OF_RESOURCES.
Ran one mysql server as master and the other as slave. And the result was clear. Even though CREATE VIEW returned error on the master, the VIEW was replicated at the slave. Have not written the test case yet but verified it manually.
During this verification I also figured out that there is a crash too. If mysql_register_view returns ER_OUT_OF_RESOURCES. The view->definer.host and view->definer.user are not set. And the current code tries to write into bin log the details and crashes due to NULL pointer. Anyways, this will be fixed once the bin log issue is resolved.
I have not yet figured out how to write automated test cases for replication, but will do that soon.
Thanks,
Sriram