We currently check for tables catalog and ignore the "database", "dblist" and so on. It is important to look in dbs to make sure tables exist only where they are supposed to. For example, we had cases of FlaggedRevs uninstalled in frwiki but tables were not fully dropped.
P78808 is the original script running on stat machines.