Project

General

Profile

Actions

Bug #18273

closed

Install new Extension with table in native, external database will fail

Added by Paints about 16 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2008-02-21
Due date:
% Done:

100%

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

Description

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.

In my opinion this bug is located in line 1919 and 1921 of class.ux_t3lib_db.php.
In this line the default link is used $this->link:
if($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
return mysql_query($compiledQuery, $this->link);
}
return mysql_query($compiledQuery0, $this->link);
break;

But it should be the link of the handlerInstance:
if($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
return mysql_query($compiledQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
}
return mysql_query($compiledQuery0, $this->handlerInstance[$this->lastHandlerKey]['link']);
break;

(issue imported from #M7615)


Files

18273.diff (773 Bytes) 18273.diff Patch for the changes proposed by Paints Oliver Klee, 2011-04-13 15:25

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #28563: Incorrect handler detected with DELETE, INSERT and UPDATE queriesClosed2011-07-29

Actions
Actions #1

Updated by Martin Kutschker about 16 years ago

Do I get this right?

You create the DB mapping for DBAL in advance and then try to install the exension. So by then DBAL should know that it must create the table in the DB defined by the mapping.

Actions #2

Updated by Xavier Perseguers over 14 years ago

This is what I understand too. Will have to test this.

Actions #3

Updated by Oliver Klee about 13 years ago

Actions #4

Updated by Oliver Klee about 13 years ago

  • Project changed from TYPO3 Core to 329
  • Category deleted (999)
  • Target version deleted (0)
Actions #5

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change I678ace7bd343a0c9f774d8ab1436dad1218fab7e has been pushed to the review server.
It is available at http://review.typo3.org/4186

Actions #6

Updated by Xavier Perseguers over 12 years ago

  • Category set to MySQL
  • Status changed from Accepted to Under Review
  • Assignee set to Xavier Perseguers
  • Target version set to 4.6.0-beta2
Actions #7

Updated by Mr. Hudson over 12 years ago

Patch set 2 of change I678ace7bd343a0c9f774d8ab1436dad1218fab7e has been pushed to the review server.
It is available at http://review.typo3.org/4186

Actions #8

Updated by Xavier Perseguers over 12 years ago

  • Subject changed from Install new Extension with table in nativ, external database will fail to Install new Extension with table in native, external database will fail
Actions #9

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change Idc337581f5990a84d1a77506c428dcdb31a18779 has been pushed to the review server.
It is available at http://review.typo3.org/4648

Actions #10

Updated by Xavier Perseguers over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Xavier Perseguers about 12 years ago

  • Status changed from Resolved to Closed
Actions #12

Updated by Michael Stucki over 10 years ago

  • Project changed from 329 to TYPO3 Core
  • Category deleted (MySQL)
Actions #13

Updated by Michael Stucki over 10 years ago

  • Category set to 999
Actions

Also available in: Atom PDF