Okay, my bad...
Creating externallinks table...Query "CREATE TABLE `externallinks` ( " failed with error code "Table 'externallinks' already exists
I forgot that mysqlhotcopy won't copy InnoDB tables, so even MySQL reported the table existed but wouldn't let me run any queries on it.
I used mysqldump to create the test upgrade table instead and it's working fine now. Sorry for the noise :-)
Cheers, Adam.