[TYPO3-dev] TYPO3 and MySQL Strict Mode

Ingo Schmitt spam at marketing-factory.de
Sat Jul 11 16:37:19 CEST 2009


Hi list,

we tried to install TYPO3 on a plain XAMP package on Windows. In this 
Case MySQL 5.1.x is configured to run in MySQL Strict Mode 
(http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html).

We discovered some errors by generated SQL statments, where the field 
type is not correct set, e.g. when an SQL integer is filled by a ''.

I tracked this issue down, and dicovered that in this case the boolean 
php Variable was passed to the TYPO3-DB exec_INSERT_query method. Here 
automatically all fields are quoted.

In my case we have disabled strict_mode, which solves this issue.
But I do see two things we should think about:

(1) Passing Values to the SQL Query parser, where the values have not 
correctly set to the SQL Fields (e.g. in this issue page_id as '3460') 
causes load on the SQL Server and slows down the execution of the statement.

(2) Since XMAPP is packaged with strict_mode, should it be worth to 
change the behavior of TYPO3?

Regards

ingo


Mit freundlichen Gruessen
-- 
Ingo Schmitt                        mailto:is at marketing-factory.de
Marketing Factory Consulting GmbH   http://typo3.marketing-factory.de/
Content Management mit Typo3: Beratung - Schulung - Realisierung


More information about the TYPO3-dev mailing list