Bug #20687
closedDBAL (adodb): Tables unknown to T3 breaks down Install-Tool
0%
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
Updated by Xavier Perseguers about 15 years ago
I can reproduce this issue using Oracle. The method crashes for table cache_typo3temp_log
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.
Updated by Karsten Dambekalns about 15 years ago
Revision: 23990, "Fixed bug #11436: Unknown tables break Install-Tool (Thanks to David Bruchmann)"