Closed Bug 609081 Opened 15 years ago Closed 15 years ago

Broken creator references in wiki_revision

Categories

(support.mozilla.org :: Knowledge Base Software, task, P1)

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: erik, Unassigned)

Details

I don't know how this is possible, but I have non-NULL creator_ids in wiki_revision that are pointing to non-existing auth_user rows. It's causing document_revisions.html to blow up when it hits {{ rev.creator }}. Just look at this fun stuff: mysql> select wiki_revision.id, creator_id, auth_user.id from wiki_revision left join auth_user on creator_id=auth_user.id where auth_user.id is null; +------+------------+------+ | id | creator_id | id | +------+------------+------+ | 4915 | 179990 | NULL | | 4953 | 180326 | NULL | | 4956 | 180418 | NULL | | 4961 | 180669 | NULL | | 4966 | 181033 | NULL | | 3471 | 181119 | NULL | | 4990 | 182051 | NULL | And on it goes for 180 rows. The table definition looks okay... CONSTRAINT `creator_id_refs_id_4298f2ad` FOREIGN KEY (`creator_id`) REFERENCES `auth_user` (`id`), ...so I don't know what's going on.
Do we know if these come from migrated articles? Those are fairly high user IDs, I'm wondering if you imported a new set of wiki articles but your users table is out of date?
I'm not getting them on my db. Erik and I discussed this yesterday and it's probably because I didn't include my auth_user table in the db dump. His database was older, so he didn't have some users. This shouldn't happen on production, however.
Sure enough, the dump Paul gave me, generated with default mysqldump params, was full of things like /*!40000 ALTER TABLE `wiki_revision` DISABLE KEYS */;. I would feel really uncomfortable leaving those in when loading a dump on production. I'll make sure to say that on the dump-loading ticket.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.