Some changes to the link tables. They now all use a key on cur_id for the *_from...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Mar 2004 09:06:13 +0000 (09:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 11 Mar 2004 09:06:13 +0000 (09:06 +0000)
commit59c6e92429c1c42c6e06d60e85766901810b338e
tree69fe8492498b6a796dc7206710c4203aa9fa52b6
parent2b0d56cd65a465db7a7a556d0d0b51b22dd3a235
Some changes to the link tables. They now all use a key on cur_id for the *_from column instead of strings, and have a unique index to force prevent any duplicate entries. There's not yet a clean step in the update script, so just clear out your links tables (patch-linktables.sql) and rebuild them with refreshLinks.php.

This saves trouble in a number of places where we can now do joins with the link tables to get other info (such as cur_is_redirect!) as well as the name, and fewer bits need to be juggled on page renaming, as outgoing links no longer have to be changed (cur_id remains the same when a page is renamed).

rebuildLinks.inc and some of the tools in the 'maintenance page' still need to be updated to work with the new setup. (Special:Maintenance needs a *lot* of cleanup in general. It's kind of a catch-all of vaguely defined features which suck performance like a hydroelectric dam.)

Also I've slipped in some extra debug code. And, I think 'indexes.sql' is a big waste of time and should all be moved into tables.sql. Building indexes separately doesn't help on InnoDB and won't do anything on MyISAM either if you're just going to replace the table after it's built with an imported one from a dump which creates it with indexes.
18 files changed:
includes/Article.php
includes/Database.php
includes/ImagePage.php
includes/LinkCache.php
includes/LinksUpdate.php
includes/Parser.php
includes/ParserCache.php
includes/SpecialDeadendpages.php
includes/SpecialMaintenance.php
includes/SpecialMovepage.php
includes/SpecialRecentchangeslinked.php
includes/SpecialWhatlinkshere.php
includes/SquidUpdate.php
maintenance/archives/patch-linktables.sql [new file with mode: 0644]
maintenance/archives/patch-list.txt
maintenance/indexes.sql
maintenance/rebuildlinks.inc
maintenance/tables.sql