DBI, BLOBS, MySQL

Richard Huxton dev at archonet.com
Fri Jan 9 09:00:52 GMT 2009


Paul Makepeace wrote:
> What does 'show table files;' give you? You might have the wrong type
> of blob/text.
> 
> http://dev.mysql.com/doc/refman/5.0/en/blob.html

"If a TEXT column is indexed, index entry comparisons are space-padded
at the end. This means that, if the index requires unique values,
duplicate-key errors will occur for values that differ only in the
number of trailing spaces. For example, if a table contains 'a', an
attempt to store 'a ' causes a duplicate-key error"

Genius. True genius.

-- 
  Richard Huxton
  Archonet Ltd


More information about the london.pm mailing list