[BUGFIX] ext:dbal Usage of dropped constant TYPO3_db 67/49567/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 23 Aug 2016 21:37:50 +0000 (23:37 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 24 Aug 2016 17:30:42 +0000 (19:30 +0200)
Usage of TYPO3_db constant prevents successful connection,
use database name directly instead.

Change-Id: I9017db927a8c58b5573964ad61ecce5c264abb34
Resolves: #77613
Releases: master
Reviewed-on: https://review.typo3.org/49567
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php

index 0c8b92b..296e210 100644 (file)
@@ -2697,7 +2697,7 @@ class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection
         // Getting real list of tables:
         switch ($this->handlerCfg['_DEFAULT']['type']) {
             case 'native':
-                $tables_result = $this->query('SHOW TABLE STATUS FROM `' . TYPO3_db . '`');
+                $tables_result = $this->query('SHOW TABLE STATUS FROM `' . $this->handlerCfg['_DEFAULT']['config']['database'] . '`');
                 if (!$this->sql_error()) {
                     while ($theTable = $this->sql_fetch_assoc($tables_result)) {
                         $whichTables[$theTable['Name']] = $theTable;