When we use a getter function in CatalogCache, an unexpected catalog object might be obtained from unexpected database. For example:
std::shared_ptr<TableCatalogObject> CatalogCache::GetCachedTableObject(
oid_t table_oid) {
for (auto it = database_objects_cache.begin();
it != database_objects_cache.end(); ++it) {
auto database_object = it->second;
auto table_object = database_object->GetTableObject(table_oid, true);
if (table_object) return table_object;
}
return nullptr;
}
In this function, same table_oid might be existed in an other database unexpected, because SystemCatalogs class allows each catalog to make same oid between databases. We need to add a database_oid argument to all getter functions.
When we use a getter function in CatalogCache, an unexpected catalog object might be obtained from unexpected database. For example:
In this function, same
table_oid
might be existed in an other database unexpected, because SystemCatalogs class allows each catalog to make same oid between databases. We need to add a database_oid argument to all getter functions.