Thilina,
renaming a db gives multiple notices of missing variables and missing argument for function.
As a result, renaming a db that contains a view has for effect that the view is lost.
To see these warnings, please do your tests having this line in config.inc.php: $cfg['Error_Handler']['display'] = true;