From 51687ee4d81a216cbc5abee3260698ace3d621d3 Mon Sep 17 00:00:00 2001 From: "Mr. E23" Date: Mon, 17 Nov 2003 20:52:00 +0000 Subject: [PATCH] update now creates linkscc table (used by PersistentLC) --- update.php | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) 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 -- 2.20.1