Project

General

Profile

Actions

Bug #17376

closed

Persistent MySQL connections to more than one database doesn't work

Added by Oliver Hader over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-06-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The scenario:
  • two MySQL databases used
    - t3_somedomain_de: _DEFAUL with TYPO3 stuff
    - ext_somedomain_de: externalDB with non-TYPO3 stuff (no uid, pid on tables, etc.)
  • php.ini with enabled persistent connections

The first (persitent) connection works without any problems. But when a query to the externalDB is executed, the old link identifier of the _DEFAUL database will be "reused" for the externalDB. The next query of the regular TYPO3 database will fail (e.g. "ext_somedomain_de.pages" doesn't exist).

The kind of configuration used in localconf.php:

$TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
'_DEFAULT' => array(
'type' => 'native',
'config' => array(
'username' => '<user>',
'password' => '<pass>',
'host' => 'localhost',
'database' => 't3_somedomain_de',
)
),
'externalDB' => array(
'type' => 'native',
'config' => array(
'username' => '<user>',
'password' => '<pass>',
'host' => 'localhost',
'database' => 'ext_somedomain_de',
)
),
);

$TYPO3_CONF_VARS['EXTCONF']['dbal']['table2handlerKeys'] = array(
'Sometable_First' => 'externalDB',
'Sometable_Second' => 'externalDB',
'Sometable_Third' => 'externalDB',
);
(issue imported from #M5774)


Files

0005774.patch (2.14 KB) 0005774.patch Administrator Admin, 2007-06-11 19:46
Actions

Also available in: Atom PDF