Bug #18273
closed
Install new Extension with table in native, external database will fail
Added by Paints about 16 years ago.
Updated over 10 years ago.
Category:
Database API (Doctrine DBAL)
Description
Installing a new extension with a new table in an external, native database will fail.
The new table is always created in the _DEFAULT database.
In my opinion this bug is located in line 1919 and 1921 of class.ux_t3lib_db.php.
In this line the default link is used $this->link:
if($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
return mysql_query($compiledQuery, $this->link);
}
return mysql_query($compiledQuery0, $this->link);
break;
But it should be the link of the handlerInstance:
if($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
return mysql_query($compiledQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
}
return mysql_query($compiledQuery0, $this->handlerInstance[$this->lastHandlerKey]['link']);
break;
(issue imported from #M7615)
Files
18273.diff (773 Bytes)
18273.diff |
Patch for the changes proposed by Paints |
Oliver Klee, 2011-04-13 15:25
|
|
Do I get this right?
You create the DB mapping for DBAL in advance and then try to install the exension. So by then DBAL should know that it must create the table in the DB defined by the mapping.
This is what I understand too. Will have to test this.
- Project changed from TYPO3 Core to 329
- Category deleted (
999)
- Target version deleted (
0)
Patch set 1 of change I678ace7bd343a0c9f774d8ab1436dad1218fab7e has been pushed to the review server.
It is available at http://review.typo3.org/4186
- Category set to MySQL
- Status changed from Accepted to Under Review
- Assignee set to Xavier Perseguers
- Target version set to 4.6.0-beta2
Patch set 2 of change I678ace7bd343a0c9f774d8ab1436dad1218fab7e has been pushed to the review server.
It is available at http://review.typo3.org/4186
- Subject changed from Install new Extension with table in nativ, external database will fail to Install new Extension with table in native, external database will fail
Patch set 1 of change Idc337581f5990a84d1a77506c428dcdb31a18779 has been pushed to the review server.
It is available at http://review.typo3.org/4648
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- Project changed from 329 to TYPO3 Core
- Category deleted (
MySQL)
Also available in: Atom
PDF