return $this->query( "ATTACH DATABASE $file AS $name", $fname );
}
- /**
- * @see DatabaseBase::isWriteQuery()
- *
- * @param string $sql
- * @return bool
- */
function isWriteQuery( $sql ) {
return parent::isWriteQuery( $sql ) && !preg_match( '/^(ATTACH|PRAGMA)\b/i', $sql );
}
$this->addQuotes( $oldName ) . " AND type='table'", $fname );
$obj = $this->fetchObject( $res );
if ( !$obj ) {
- throw new MWException( "Couldn't retrieve structure for table $oldName" );
+ throw new RuntimeException( "Couldn't retrieve structure for table $oldName" );
}
$sql = $obj->sql;
$sql = preg_replace(