[BUGFIX] Install new Extension with table in native, external database will fail
authorHeiko Kromm <h.kromm@paints.de>
Sat, 6 Aug 2011 17:43:42 +0000 (19:43 +0200)
committerXavier Perseguers <xavier@typo3.org>
Mon, 29 Aug 2011 08:17:14 +0000 (10:17 +0200)
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.

Change-Id: I678ace7bd343a0c9f774d8ab1436dad1218fab7e
Fixes: #18273
Releases: 4.5, 4.6

typo3/sysext/dbal/class.ux_t3lib_db.php

index 0958384..1c1eca9 100644 (file)
@@ -2931,9 +2931,9 @@ class ux_t3lib_DB extends t3lib_DB {
                                        $compiledQuery = $this->SQLparser->compileSQL($this->lastParsedAndMappedQueryArray);
 
                                        if (in_array($this->lastParsedAndMappedQueryArray['type'], array('INSERT', 'DROPTABLE'))) {
-                                               return mysql_query($compiledQuery, $this->link);
+                                               return mysql_query($compiledQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
                                        }
-                                       return mysql_query($compiledQuery[0], $this->link);
+                                       return mysql_query($compiledQuery[0], $this->handlerInstance[$this->lastHandlerKey]['link']);
                                        break;
                                case 'adodb':
                                        // Compiling query: