Project

General

Profile

Actions

Bug #24472

closed

Install complains about default values in ext_tables.sql

Added by Christian Futterlieb almost 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-01-04
Due date:
% Done:

0%

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

Description

When a field with a datatype which is not blob or text has NULL as default value, the extension manager ( or install tool db compare) treats the default value as ''.

For example:

ext_tables.sql:

CREATE TABLE category (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
parent_category_uid int(11),
name varchar(255) DEFAULT '' NOT NULL,

FOREIGN KEY (parent_category_uid) REFERENCES category(uid) ON DELETE CASCADE,
PRIMARY KEY (uid),
KEY parent (pid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DESCRIBE category:

Field | Type | Null | Key | Default | Extra
..
parent_category_uid | int(11) | YES | MUL | NULL |
..

Back in extension manager:

ALTER TABLE category CHANGE parent_category_uid parent_category_uid int(11);
Current value: int(11) default ''

Attached patch prevents generating [default ''] on fields which have NULL as default value.

Tested and working (only) on my sytem:
Ubuntu 10.10
PHP 5.3.3
Apache 2.2.16
MySQL 5.1.49
TYPO3 4.4.6

I don't know if there raise any unwished influences (dbal?).

(issue imported from #M16912)


Files

16912.diff (1.28 KB) 16912.diff Administrator Admin, 2011-01-04 15:07
16912-v2.diff (670 Bytes) 16912-v2.diff Administrator Admin, 2011-02-11 10:34
Actions #1

Updated by Steffen Kamper almost 14 years ago

Issue title is irretating, this is a core issue as you already mentioned, it's t3lib_install.

Actions #2

Updated by Christian Futterlieb almost 14 years ago

Sorry, I was not sure about that. Thanks for correction ;)

Actions #3

Updated by Chris topher almost 14 years ago

Hi Christian,

please update the patch and post it on Core List!
For details check out http://typo3.org/teams/core/core-mailinglist-rules/

Actions #4

Updated by Christian Futterlieb almost 14 years ago

Sent patch-v2 to core list

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.1.7)?

IMHO this was fixed.

Actions #6

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions #7

Updated by Christian Futterlieb over 10 years ago

The problem does not exist in the same way as it did before. Now it's fine, when the default value is properly specified (TYPO3 6.2.3):

    myfield int(11) DEFAULT NULL,

I'm ok with closing the ticket, thanks for taking care

Actions

Also available in: Atom PDF