[TYPO3-dev] STRICT-mode for MySQL and install tool

Steffen Kamper info at sk-typo3.de
Tue Jan 27 00:04:59 CET 2009


Hi,

i'm not sure about my results, so  i ask here and descrbe the situation:

I configured MySQL to work in STRICT-mode
$TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET @@global.sql_mode= 
\'STRICT_ALL_TABLES\';';	

Then i discovered Problems with new content with templavoila, error 
message was:
sorry, you didn't have proper permissions to perform this change.

Then i created content with classic page module, error message was:
2: SQL error: 'Field 'tx_templavoila_flex' doesn't have a default value' 
(tt_content:NEW497e35b082363)

looking to ext_tables.sql, field is defined:
tx_templavoila_flex mediumtext NOT NULL

After i changed the field in PMA to DEFAULT '' all errors were gone and 
i could create new content again.

Now first question: is it the case that all fields need DEFAULT if they 
are defined with NOT NULL? (even mediumtext,text etc.)

And now the Bug with installtool. If i change definition to
tx_templavoila_flex mediumtext DEFAULT '' NOT NULL

EM (installscript) is never happy and always display:
ALTER TABLE tt_content CHANGE tx_templavoila_flex tx_templavoila_flex 
mediumtext default '';
Current value: mediumtext
If my first question is true, then we have a bug with the compare.
(it seems there are more, try to change DEFAULT '' to DEFAULT NULL)

vg Steffen




More information about the TYPO3-dev mailing list