Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -281,7 +281,7 @@ |
282 | 282 | * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
283 | 283 | * @return Mixed: database result resource (feed to Database::fetchObject or whatever), or false on failure |
284 | 284 | */ |
285 | | - function select( $table, $vars, $conds = '', $fname = 'Database::select', $options = array(), $join_conds = array() ) |
| 285 | + function select( $table, $vars, $conds = '', $fname = 'DatabaseMssql::select', $options = array(), $join_conds = array() ) |
286 | 286 | { |
287 | 287 | $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds ); |
288 | 288 | if ( isset( $options['EXPLAIN'] ) ) { |
— | — | @@ -306,7 +306,7 @@ |
307 | 307 | * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
308 | 308 | * @return string, the SQL text |
309 | 309 | */ |
310 | | - function selectSQLText( $table, $vars, $conds = '', $fname = 'Database::select', $options = array(), $join_conds = array() ) { |
| 310 | + function selectSQLText( $table, $vars, $conds = '', $fname = 'DatabaseMssql::select', $options = array(), $join_conds = array() ) { |
311 | 311 | if ( isset( $options['EXPLAIN'] ) ) { |
312 | 312 | unset( $options['EXPLAIN'] ); |
313 | 313 | } |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | * Returns -1 if count cannot be found |
322 | 322 | * Takes same arguments as Database::select() |
323 | 323 | */ |
324 | | - function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'Database::estimateRowCount', $options = array() ) { |
| 324 | + function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'DatabaseMssql::estimateRowCount', $options = array() ) { |
325 | 325 | $options['EXPLAIN'] = true;// http://msdn2.microsoft.com/en-us/library/aa259203.aspx |
326 | 326 | $res = $this->select( $table, $vars, $conds, $fname, $options ); |
327 | 327 | |
— | — | @@ -337,7 +337,7 @@ |
338 | 338 | * Returns information about an index |
339 | 339 | * If errors are explicitly ignored, returns NULL on failure |
340 | 340 | */ |
341 | | - function indexInfo( $table, $index, $fname = 'Database::indexExists' ) { |
| 341 | + function indexInfo( $table, $index, $fname = 'DatabaseMssql::indexExists' ) { |
342 | 342 | # This does not return the same info as MYSQL would, but that's OK because MediaWiki never uses the |
343 | 343 | # returned value except to check for the existance of indexes. |
344 | 344 | $sql = "sp_helpindex '" . $table . "'"; |
— | — | @@ -376,7 +376,7 @@ |
377 | 377 | * Usually aborts on failure |
378 | 378 | * If errors are explicitly ignored, returns success |
379 | 379 | */ |
380 | | - function insert( $table, $arrToInsert, $fname = 'Database::insert', $options = array() ) { |
| 380 | + function insert( $table, $arrToInsert, $fname = 'DatabaseMssql::insert', $options = array() ) { |
381 | 381 | # No rows to insert, easy just return now |
382 | 382 | if ( !count( $arrToInsert ) ) { |
383 | 383 | return true; |
— | — | @@ -507,7 +507,7 @@ |
508 | 508 | * $conds may be "*" to copy the whole table |
509 | 509 | * srcTable may be an array of tables. |
510 | 510 | */ |
511 | | - function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'Database::insertSelect', |
| 511 | + function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'DatabaseMssql::insertSelect', |
512 | 512 | $insertOptions = array(), $selectOptions = array() ) |
513 | 513 | { |
514 | 514 | $ret = parent::insertSelect( $destTable, $srcTable, $varMap, $conds, $fname, $insertOptions, $selectOptions ); |
— | — | @@ -591,7 +591,7 @@ |
592 | 592 | # It may be more efficient to leave off unique indexes which are unlikely to collide. |
593 | 593 | # However if you do this, you run the risk of encountering errors which wouldn't have |
594 | 594 | # occurred in MySQL |
595 | | - function replace( $table, $uniqueIndexes, $rows, $fname = 'Database::replace' ) { |
| 595 | + function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseMssql::replace' ) { |
596 | 596 | $table = $this->tableName( $table ); |
597 | 597 | |
598 | 598 | if ( count( $rows ) == 0 ) { |
— | — | @@ -641,9 +641,9 @@ |
642 | 642 | } |
643 | 643 | |
644 | 644 | # DELETE where the condition is a join |
645 | | - function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "Database::deleteJoin" ) { |
| 645 | + function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "DatabaseMssql::deleteJoin" ) { |
646 | 646 | if ( !$conds ) { |
647 | | - throw new DBUnexpectedError( $this, 'Database::deleteJoin() called with empty $conds' ); |
| 647 | + throw new DBUnexpectedError( $this, 'DatabaseMssql::deleteJoin() called with empty $conds' ); |
648 | 648 | } |
649 | 649 | |
650 | 650 | $delTable = $this->tableName( $delTable ); |
— | — | @@ -762,7 +762,7 @@ |
763 | 763 | /** |
764 | 764 | * Query whether a given column exists in the mediawiki schema |
765 | 765 | */ |
766 | | - function fieldExists( $table, $field, $fname = 'Database::fieldExists' ) { |
| 766 | + function fieldExists( $table, $field, $fname = 'DatabaseMssql::fieldExists' ) { |
767 | 767 | $table = $this->tableName( $table ); |
768 | 768 | $res = sqlsrv_query( $this->mConn, "SELECT DATA_TYPE FROM INFORMATION_SCHEMA.Columns |
769 | 769 | WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field'" ); |
— | — | @@ -792,7 +792,7 @@ |
793 | 793 | /** |
794 | 794 | * Begin a transaction, committing any previously open transaction |
795 | 795 | */ |
796 | | - function begin( $fname = 'Database::begin' ) { |
| 796 | + function begin( $fname = 'DatabaseMssql::begin' ) { |
797 | 797 | sqlsrv_begin_transaction( $this->mConn ); |
798 | 798 | $this->mTrxLevel = 1; |
799 | 799 | } |
— | — | @@ -800,7 +800,7 @@ |
801 | 801 | /** |
802 | 802 | * End a transaction |
803 | 803 | */ |
804 | | - function commit( $fname = 'Database::commit' ) { |
| 804 | + function commit( $fname = 'DatabaseMssql::commit' ) { |
805 | 805 | sqlsrv_commit( $this->mConn ); |
806 | 806 | $this->mTrxLevel = 0; |
807 | 807 | } |
— | — | @@ -809,7 +809,7 @@ |
810 | 810 | * Rollback a transaction. |
811 | 811 | * No-op on non-transactional databases. |
812 | 812 | */ |
813 | | - function rollback( $fname = 'Database::rollback' ) { |
| 813 | + function rollback( $fname = 'DatabaseMssql::rollback' ) { |
814 | 814 | sqlsrv_rollback( $this->mConn ); |
815 | 815 | $this->mTrxLevel = 0; |
816 | 816 | } |