r88120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88119‎ | r88120 | r88121 >
Date:22:39, 14 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix pg bug
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php
@@ -310,11 +310,11 @@
311311 * @param array $columns The field names to put indexes on
312312 * @param DatabaseBase or Database $db
313313 */
314 - public static function setupIndex( $tableName, array $columns, $db ) {
 314+ public static function setupIndex( $rawTableName, array $columns, $db ) {
315315 // TODO: $verbose is not a good global name!
316316 global $wgDBtype, $verbose;
317317
318 - $tableName = $db->tableName( $tableName );
 318+ $tableName = $db->tableName( $rawTableName );
319319
320320 if ( $wgDBtype == 'postgres' ) { // postgresql
321321 $sql = "SELECT i.relname AS indexname,"
@@ -356,7 +356,7 @@
357357 $column = $index;
358358 }
359359
360 - $db->query( "CREATE $type {$tableName}_index{$key} ON $tableName USING btree(" . $column . ")", __METHOD__ );
 360+ $db->query( "CREATE $type {$rawTableName}_index{$key} ON $tableName USING btree(" . $column . ")", __METHOD__ );
361361 }
362362 }
363363 } else { // MySQL

Status & tagging log