We were missing a method to list out views defined in a database. This
patch adds in MysqlBase::isView() and MysqlBse::listViews().
Since listViews() cache its result in DatabaseBase::$allViews, we also
introduce a final DatabaseBase::clearViewsCache() to let us clear the
per process cache.
Finally, fixed fatal error when duplicating VIEWs in MySQL.
bug: 43571
Change-Id: I8650baa4b721fe69ea3e1d557dd76745c0c7754e
Previously mysql_real_escape_string() was improperly used which escapes
for inclusion in a plain string rather than an identifier.
Also adds basic test support for the DatabaseMysqlBase class.
Co-Authored by: Antoine Musso <hashar@free.fr>
Bug: 55427
Change-Id: Ic045e195c89d8d5d0f0edbda0cd1df781de7025c