Project

General

Profile

Actions

Bug #19177

closed

SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near "datetime default '0000-00-00 00:00:00' "

Added by Norbert Bernhardt over 16 years ago. Updated about 14 years ago.

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

0%

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

Description

After updating the extension list for updates, Typo3 died with message
SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near "datetime default '0000-00-00 00:00:00' "
.

Patch is in ./t3lib/class.t3lib_sqlparser.php
Around line 999:
// Field type:
! if ($result['fieldType'] = $this->nextPart($parseString,'^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob|datetime)([[:space:],]+|\()')) {

replace
if ($result['fieldType'] = $this->nextPart($parseString,'^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob)([[:space:],]+|\()')) {

with
if ($result['fieldType'] = $this->nextPart($parseString,'^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob|datetime)([[:space:],]+|\()')) {

(issue imported from #M9093)

Actions #1

Updated by Susanne Moog about 14 years ago

AFAIK datetime is no real SQL data type but an invention of MySQL and should therefore not be used if you want to stay compatible to other DBMS.

Actions

Also available in: Atom PDF