Last modified: 2011-03-13 18:06:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14200, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12200 - updaters.inc will never load interwiki.sql
updaters.inc will never load interwiki.sql
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.11.x
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://permalink.gmane.org/gmane.org....
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-04 21:36 UTC by Dan Jacobson
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Jacobson 2007-12-04 21:36:55 UTC
Fresh 1.11 wiki installations have interwiki.sql loaded by
default. Installations upgrading to 1.11 do not get it loaded.

Let's take a peek into the future. Perhaps around version 1.15.

People who starting using MediaWiki after around 1.11 will be
enjoying interwiki linking, while those who started earlier will be
scratching their heads, even though both dutifully do regular updates.

We examine the cause:

This part of updaters.inc is good intentioned,

    function do_interwiki_update() {
            # Check that interwiki table exists; if it doesn't source it
            global $wgDatabase, $IP;
            if( $wgDatabase->tableExists( "interwiki" ) ) {
                    echo "...already have interwiki table\n";
                    return true;
            }
            echo "Creating interwiki table: ";
            dbsource( archive("patch-interwiki.sql") );
            echo "ok\n";
            echo "Adding default interwiki definitions: ";
            dbsource( "$IP/maintenance/interwiki.sql" );
            echo "ok\n";
    }

However, as this dump of the post update database shows,

    --
    -- Table structure for table `wiki_interwiki`
    --

    DROP TABLE IF EXISTS `wiki_interwiki`;
    CREATE TABLE `wiki_interwiki` (
      `iw_prefix` char(32) NOT NULL,
      `iw_url` char(127) NOT NULL,
      `iw_local` tinyint(1) NOT NULL,
      `iw_trans` tinyint(1) NOT NULL default '0',
      UNIQUE KEY `iw_prefix` (`iw_prefix`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    --
    -- Dumping data for table `wiki_interwiki`
    --

    /*!40000 ALTER TABLE `wiki_interwiki` DISABLE KEYS */;
    LOCK TABLES `wiki_interwiki` WRITE;
    UNLOCK TABLES;
    /*!40000 ALTER TABLE `wiki_interwiki` ENABLE KEYS */;

The table indeed exists, but in an empty state!
People updating will always have the table, but by default empty, not nonexistent
as the program assumes... except in the rare case one has removed it
by hand.

Yes, you don't want to trample peoples customizations, but what
happens is that people see their friends can use interwiki links, but
they can't even though they've done regular updates.
So an update is not as good as a fresh install.
Comment 1 Dan Jacobson 2008-01-17 23:32:06 UTC
Added URL above which confirms bug.
Comment 2 Dan Jacobson 2008-02-26 22:56:15 UTC
It's my first Blocking bug. Feel free to revert it. It's just that
it's a bad precedent to have updaters end up with a different database
than fresh installers.

Try it yourself. Updating
1.9 > 1.10 > 1.11
vs. installing
1.11

Anyway, I would sense the empty by existent table and fill it up.
Comment 3 Dan Jacobson 2008-02-26 22:58:54 UTC
P.S., when comparing
1.9 > 1.10 > 1.11 vs. 1.11
perhaps there are other database differences... perhaps add this kind of test for all new releases.
Comment 4 Tim Starling 2008-02-27 03:11:56 UTC
Reverted severity to normal. Doesn't block anything.
Comment 5 Brion Vibber 2008-02-27 22:36:23 UTC
I'd probably recommend dumping the default interwiki table entirely. Anyway, the initial one is only a sample of content, and like other content (the initial Main Page) it's not going to be 'updated' overwriting the users' content.

WONTFIX.
Comment 6 Dan Jacobson 2009-03-14 03:30:41 UTC
> recommend dumping the default interwiki table entirely.

(People reading this should use
TRUNCATE TABLE wiki_interwiki;
if one DROPs it, it will only come back again, all filled up, next update.php run.
And in the meantime, not having the table at all will break things...)


Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links