Project

General

Profile

Actions

Bug #20687

closed

DBAL (adodb): Tables unknown to T3 breaks down Install-Tool

Added by David Bruchmann over 15 years ago. Updated about 15 years ago.

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

0%

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

Description

Using Installtool with adodb is hard when unknown tables are in Database.

PHP-Errror-Message:
Fatal Error: Call to a member function MetaType() on a non-object in ...\dbal\class.ux_t3lib_db.php on line 1153

Solution (added lines are marked with +):

function MetaType($type,$table,$max_length=-1)    {
$this->lastHandlerKey = $this->handler_getFromTableList($table);
switch((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
case 'native':
$str = $type;
break;
case 'adodb':
$rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit('SELECT * FROM '.$this->quoteFromTables($table),1);
+ if (in_array($table,$this->cache_fieldType)) {
$str = $rs->MetaType($type, $max_length);
+ }
break;
case 'userdefined':
$str = $this->handlerInstance[$this->lastHandlerKey]->MetaType($str,$table,$max_length);
break;
default:
die('No handler found!!!');
break;
}
return $str;
}

$this->cache_fieldType is build from TCA including loaded extensions even if some tables aren't loaded (i.e. the dbal-tables).
Until no foreign and unknown tables are recognized by install-tool everything is correct. Added Lines prevent T3 to collapse when other tables are found.

Error occured when trying T3 in MS-Access directly with the dbal-access-driver instead of using a wrapper installation of ms-sql.
(issue imported from #M11436)


Files

11436.diff (855 Bytes) 11436.diff Administrator Admin, 2009-08-28 14:57
Actions #1

Updated by Xavier Perseguers about 15 years ago

I can reproduce this issue using Oracle. The method crashes for table cache_typo3temp_log

Actions #2

Updated by David Bruchmann about 15 years ago

In mySQL this fault either doesn't occur or isn't remarkable in that kind because tables for organization i.e. the PMA-tables and the mysql-tables are stored in other databases while some DBMS store all/more tables in one database.

Actions #3

Updated by Karsten Dambekalns about 15 years ago

Revision: 23990, "Fixed bug #11436: Unknown tables break Install-Tool (Thanks to David Bruchmann)"

Actions

Also available in: Atom PDF