[TYPO3-dev] TYPO3 and MySQL Strict Mode

Dmitry Dulepov dmitry.dulepov at gmail.com
Sun Jul 12 14:09:26 CEST 2009


Hi Ingo!

Ingo Schmitt wrote:
> 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 ''.

Please, do not attach files here, especially TIFFs! Think how much more traffic you generated now for TYPO3 servers. There are plenty of free servers where you can put the image and send a link here.

> 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.

Integer fields can be quoted. This is not a error but a fully valid SQL behavior. In your case this was not a cause of error. The image says that 'temp_content' was invalid.

-- 
Dmitry Dulepov
LinkedIn: http://www.linkedin.com/in/dmitrydulepov
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs




More information about the TYPO3-dev mailing list