[TYPO3-core] RFC #16912: Bug: Install complains about default values in ext_tables.sql

Christian Futterlieb christian at futterlieb.ch
Fri Feb 11 10:17:48 CET 2011


Hi core list.

This is an SVN patch request.

Type: Bugfix

Bugtracker references:
http://http://bugs.typo3.org/view.php?id=16912

Branches:
trunk
TYPO3-4.5
TYPO3-4.4

Problem:
When a field with a datatype which is not blob or text has NULL as 
default value, install treats the default value as ''.

Solution:
Add a check for default field value is not NULL.

How to test:
1. Create a field with a definition like this in ext_tables.sql:

my_nullvalue int(11)

2. Compare database will add the field correctly:

ALTER TABLE my_table ADD my_nullvalue int(11);

3. Re-comparing database will report:

ALTER TABLE my_table CHANGE my_nullvalue my_nullvalue int(11);
Current value: int(11) default ''

4. Apply the patch

5. Re-compare database
The field my_nullvalue should not appear anymore in 'changing fields'

Notes:
First: I'm not sure if this bugfix raises any unwished influences?
Second: this patch only suppresses unneeded output in install. IMO 
install should know about NULL values and handle those sql statements 
correctly. I'll try to come up with another patch for fixing this in 
general.

Best regards

Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16912-TYPO3_4-4-6.diff
Type: text/x-patch
Size: 662 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110211/5d058b41/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16912-TYPO3_4-5-0.diff
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110211/5d058b41/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16912-v2.diff
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110211/5d058b41/attachment-0002.bin>


More information about the TYPO3-team-core mailing list