* Remove obsolete killthread.php
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 14 Jan 2006 02:37:55 +0000 (02:37 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 14 Jan 2006 02:37:55 +0000 (02:37 +0000)
RELEASE-NOTES
includes/Database.php
includes/DatabaseOracle.php
includes/DatabasePostgreSQL.php
includes/killthread.php [deleted file]

index 10565df..b9814d8 100644 (file)
@@ -483,6 +483,7 @@ fully support the editing toolbar, but was found to be too confusing.
   if the comment included a section link. Use clone() to make a safe copy.
 * Add wfClone() wrapper since we're still using PHP 4 on some servers.
 * Fixed installer bugs 921 and 3914 (issues with using root and so forth)
+* Remove obsolete killthread.php
 
 
 === Caveats ===
index 71593e5..3d2c0fa 100644 (file)
@@ -1112,25 +1112,6 @@ class Database {
                return mysql_select_db( $db, $this->mConn );
        }
 
-       /**
-        * Starts a timer which will kill the DB thread after $timeout seconds
-        */
-       function startTimer( $timeout ) {
-               global $IP;
-               if( function_exists( 'mysql_thread_id' ) ) {
-                       # This will kill the query if it's still running after $timeout seconds.
-                       $tid = mysql_thread_id( $this->mConn );
-                       exec( "php $IP/includes/killthread.php $timeout $tid &>/dev/null &" );
-               }
-       }
-
-       /**
-        * Stop a timer started by startTimer()
-        * Currently unimplemented.
-        *
-        */
-       function stopTimer() { }
-
        /**
         * Format a table name ready for use in constructing an SQL query
         *
index b934fa4..8aec858 100644 (file)
@@ -279,14 +279,6 @@ class DatabaseOracle extends Database {
                return true;
        }
 
-       /** @todo FIXME */
-       function startTimer( $timeout ) {
-               wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
-               /*$tid = mysql_thread_id( $this->mConn );
-               exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
-       }
-
-       /** */
        function tableName($name, $forddl = false) {
                # First run any transformations from the parent object
                $name = parent::tableName( $name );
index d21fc1f..9f3fb50 100644 (file)
@@ -227,13 +227,6 @@ class DatabasePgsql extends Database {
                return $retVal;
        }
 
-       /** @todo FIXME */
-       function startTimer( $timeout ) {
-               wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' );
-               /*$tid = mysql_thread_id( $this->mConn );
-               exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/
-       }
-
        function tableName( $name ) {
                # First run any transformations from the parent object
                $name = parent::tableName( $name );
diff --git a/includes/killthread.php b/includes/killthread.php
deleted file mode 100644 (file)
index b12eccb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * Script to kill a MySQL thread after a specified timeout
- * @package MediaWiki
- * @subpackage Database
- */
-
-/**
- *
- */
-if( php_sapi_name() != 'cli' ) {
-       die('');
-}
-
-define( 'MEDIAWIKI', 1 );
-$wgCommandLineMode = true;
-
-unset( $IP );
-ini_set( 'allow_url_fopen', 0 ); # For security...
-require_once( '../LocalSettings.php' );
-
-if( !$wgAllowSysopQueries ) {
-       die( "Queries disabled.\n" );
-}
-
-require_once( 'Setup.php' );
-
-$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
-$wgArticle = new Article($wgTitle);
-
-if ( !$argv[1] || !$argv[2] ) {
-       exit();
-}
-
-$tid = (int)$argv[2];
-
-# Wait for timeout (this process may be killed during this time)
-$us = floor( $argv[1] * 1000000 ) % 1000000;
-$s = floor( $argv[1] );
-usleep( $us );
-sleep( $s );
-
-# Kill DB thread
-$conn = Database::newFromParams( $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname );
-$conn->query( 'KILL '.$tid );
-
-?>