private function _cacheTableData($tables, $table)
{
// Note: I don't see why we would need array_merge_recursive() here,
// as it creates double entries for the same table (for example a double
// entry for Comment when changing the storage engine in Operations)
// Note 2: Instead of array_merge(), simply use the + operator because
// array_merge() renumbers numeric keys starting with 0, therefore
// we would lose a db name that consists only of numbers
foreach ($tables as $one_database => $its_tables) {
if (isset($this->_table_cache[$one_database])) {
// the + operator does not do the intended effect
// when the cache for one table already exists
if ($table && isset($this->_table_cache[$one_database][$table])) {
unset($this->_table_cache[$one_database][$table]);
}
$this->_table_cache[$one_database] = $this->_table_cache[$one_database] + $tables[$one_database];
} else {
$this->_table_cache[$one_database] = $tables[$one_database];
}
}
}