Fix last_err value in MysqlDatabase::nextid()