Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8.3
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Db_Table
-
Labels:None
Description
The cache identifier where the metadata are saved is not unique:
- schema is not mandatory, so if you have two databases with a same table name in both and you haven't set the schema it will generate the same id.
- you can connect to databases on different host or port and it's also not include in the id so there are collisions.
Zend/Db/Table/Abstract.php
$cacheId = md5("$this->_schema.$this->_name");
should be replace to :
//get db configuration $dbConfig = $this->_db->getConfig(); //get the port if available $port = isset($dbConfig['options']['port']) ? ':'.$dbConfig['options']['port'] : null; //get the custom schema or the default schema if not specified $schema = !empty($this->_schema) ? $this->_schema : $dbConfig['dbname']; // Define the cache identifier where the metadata are saved $cacheId = md5($dbConfig['host'].$port.'/'.$schema.'.'.$this->_name);
Exactly the same for me today
But with your correction, we can't have same schema in different database on same server.
I choose: