Issue Bug Closed

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

Oliver Hader 06/11/07, 19:40 updated 06/27/08, 10:53

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>‘,<br> ‘password’ =&gt; ‘<pass>‘,<br> ‘host’ =&gt; ‘localhost’,<br> ‘database’ =&gt; ‘t3_somedomain_de’,<br> )<br> ),<br> ‘externalDB’ =&gt; array(<br> ‘type’ =&gt; ‘native’,<br> ‘config’ =&gt; array(<br> ‘username’ =&gt; ‘<user>‘,<br> ‘password’ =&gt; ‘<pass>‘,<br> ‘host’ =&gt; ‘localhost’,<br> ‘database’ =&gt; ‘ext_somedomain_de’,<br> )<br> ),<br>);</pass></user></pass></user>

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

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.