[TYPO3-core] length and usage of column "ident" of table "cash_hash"

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Jul 17 12:48:51 CEST 2006


Hi!

I've run into a portability problem of Mysql: the silent length truncation 
of data. All other DBSs choke if strings are too long for a column.

The problem in particular is the ident field. Some extension (eg 
automaketemplate) use the field. That is they fill it, but the don't use 
it. Otherwise it might have been noticed that a value of 
"tx_automaketemplate_pi1" will be truncated to "tx_automaketemplate_".

What to do now?

We could enlarge the column (20 chars is not extremely) long. Nice but not 
really necessary.

Or we could do a substr on the ident value (in the identical functions 
storeHash in t3lib_page and t3lib_befunc). This should not hurt any code 
that reads the ident as it has always been trimmed by mysql. But we could 
say it's up to the PHP developer to send correct data.

And we could do both.

Masi



More information about the TYPO3-team-core mailing list