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 ===
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
*
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 );
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 );
+++ /dev/null
-<?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 );
-
-?>