From: Mr. E23 Date: Mon, 17 Nov 2003 20:52:00 +0000 (+0000) Subject: update now creates linkscc table (used by PersistentLC) X-Git-Tag: 1.1.0~146 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=51687ee4d81a216cbc5abee3260698ace3d621d3;p=lhc%2Fweb%2Fwiklou.git update now creates linkscc table (used by PersistentLC) --- diff --git a/update.php b/update.php index 054c192e98..0aa229ec26 100644 --- a/update.php +++ b/update.php @@ -11,18 +11,6 @@ if( !ini_get( "register_globals" ) ) { echo "WARNING: register_globals is not on; MediaWiki currently relies on this option.\n\n"; } -/* - - TODO: Links cache will be very unhappy without a table like this //e23 - - CREATE TABLE linkscc (lcc_pageid INT UNSIGNED NOT NULL UNIQUE KEY, - lcc_title VARCHAR(255) NOT NULL UNIQUE KEY, - lcc_cacheobj MEDIUMBLOB NOT NULL); - -*/ - - - # Update already-installed software # @@ -76,6 +64,25 @@ if ( count( $wgAlterSpecs ) ) { mysql_close( $rconn ); } +{ // Create linkscc if necessary + $sql = "CREATE TABLE IF NOT EXISTS linkscc (". + " lcc_pageid INT UNSIGNED NOT NULL UNIQUE KEY, ". + " lcc_title VARCHAR(255) NOT NULL UNIQUE KEY,". + " lcc_cacheobj MEDIUMBLOB NOT NULL)"; + // Should it be created as InnoDB? + $rconn = mysql_connect( $wgDBserver, $wgDBadminuser, $wgDBadminpassword ); + mysql_select_db( $wgDBname ); + print "\n$sql;\n"; + $res = mysql_query( $sql, $rconn ); + if ( $res === false ) { + print "MySQL error: " . mysql_error( $rconn ) . "\n"; + } + mysql_close( $rconn ); +} + + + + # # Copy files into installation directories