Bug #50926
closeddocumentation is misleading in some points
0%
Description
The documentation contains this example of a configuration, p.6
Using another MySQL database for the “tt_guest” and “sys_note” tables
1: $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array (
2: '_DEFAULT' => array (
3: 'type' => 'native',
4: 'config' => array(
5: 'username' => '', // Set by default (overridden)
6: 'password' => '', // Set by default (overridden)
7: 'host' => '', // Set by default (overridden)
8: 'database' => '', // Set by default (overridden)
10: )
11: ),
12: 'alternativeMySQLdb' => array (
13: 'type' => 'native',
14: 'config' => array(
15: 'username' => 'your_username',
16: 'password' => 'your_password',
17: 'host' => 'localhost',
18: 'database' => 'alternative_database_name',
19: )
20: ),
21: );
22:
However, the 'alternativeMySQLdb' configuration would never be created successfully with the current dbal extension.
This code on line 3068 in file class.ux_t3lib_db.php
prevents that the "link " property is assigned for any mysql-configurations that are registered as "native" but not registered as "_DEFAULT"
if ($link) {
// For default, set ->link (see t3lib_DB)
if ($handlerKey == '_DEFAULT') {
$this->link = $link;
}
/* I have replaced it with this */
// If link succeeded:
if ($link) {
// For default, set ->link (see t3lib_DB)
//if ($handlerKey == '_DEFAULT') {
$this->link = $link;
//}
//error_log("handlerKey $handlerKey");
Maybe there is a better way to do this. Just saying.
My dbal version: 4-7-7
Updated by Michael Stucki almost 11 years ago
- Project changed from 329 to TYPO3 Core
Updated by Mathias Schreiber almost 10 years ago
- Assignee set to Andreas Kienast
- Target version set to 7.5
- Is Regression set to No
Hey Andy,
thoughts?
Updated by Andreas Kienast almost 10 years ago
I have to investigate if this is still an issue.
Updated by Morton Jonuschat over 9 years ago
- Status changed from New to Needs Feedback
The relevant parts of the code are still there, but from my understanding of the code $this->link is the default connection, this and all other links are also stored in $this->handlerInstance[$handlerKey]['link']. The latter is being used throughout DatabaseConnection, $this->link is never being accessed.
Updated by Alexander Opitz almost 9 years ago
- Status changed from Needs Feedback to Closed
- Assignee deleted (
Andreas Kienast)
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.