Okay, the upgrade somehow over-wrote wp-db.php with blank file and then crashed.
I downloaded 3.3.2 and up-zipped it. Copied across a clean version of wp-db.php and this has brought the site back up at version 3.3.1
Dashboard reported ‘upgrade failed to complete’. So I re-ran the 3.3.2 upgrade and this time in installed okay.
I have no idea why this happened, the upgrade was not obviously interupted, it just ceased with the maintenance message.
Anyway this appears to have solved the issue.