
Hi Brian
When storing a string that is longer then the table definition, is it possible to configure mysql to treat this condition as an error and abort the operation, rather then blindly truncating/corrupting the data and reporting a warning? Or does this require using transactions[1]?
sql_mode=TRADITIONAL sets a whole set of options that will do what you want. See ref manual for more detail. How effective it is does depend on the underlying storage engine's ability to rollback, regardless of whether you use an explicit transaction. That is, it'll be ok on any operation affecting only a single row, otherwise use InnoDB or another transactional engine. This should be the default anyway for most production environments. MyISAM has specific capabilities and uses, and can be used when appropriate (it was architected for data warehousing, and is fast at bulk inserts currently with selects and particularly fast table scans).
[1] IIRC transaction support requires InnoDB and some applications require MyISAM - e.g. for geospatial stuff. Of course another option would be to switch to a better DB, eg postgresql.
If an app requires extensive GIS support, I definitely recommend PostgreSQL as it's particularly suited to that task. I see no benefit in a discussion like "is green better than blue" - they are both valid and useful colours. Regards, Arjen. -- Exec.Director @ Open Query (http://openquery.com) MySQL services Sane business strategy explorations at http://Upstarta.biz Personal blog at http://lentz.com.au/blog/