The MySQL developers seem to be developing a habit of rolling out useful new features in their .1 releases. MySQL 4 was a good release, but it’s the group_concat feature from 4.1 that I miss most often when forced to use a 3.x or 4.0 install. MySQL 5 made some huge leaps forward, but already there’s plenty of talk about the new features coming in 5.1.
With the former it will now be a simple matter to query arbitrary XML data stored in text fields. It’s by no means an XML database, and it remains to be seen what performance looks like, but for those of us who sometimes need to store smaller snippets of XML or who want another option for flexibly searching the data we’re storing, it looks to be a nice addition.
The latter means we’ll be able to dispense with all those quick maintenance scripts dispatched by cron and instead (if the current syntax makes it into the release) set up triggers such as:
EVERY 1 DAY
UPDATE session SET expired = 1
DATE_SUB(CURDATE(), INTERVAL 7 DAY) > last_updated;
Naturally, developers will need to decide how much control to cede to the data layer and how much ought to be kept in their application, and backup strategies will need to be adjusted accordingly. But for those of us tired of having to maintain configuration data across multiple scripts (or load in the configuration framework for quick, standalone scripts) this is a very handy addition.