Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimisation: Added an index on bug_id field in the mantis_bug_file_t…
…able. A admin/upgrades/0_18_inc.php - Added to include upgrades since 0.18.0 M admin/upgrade.php - Add upgrade steps in 0_18_inc.php M core/database_api.php - (db_key_exists_on_field): Checks if there exists a field on the specified table/field of the specified type. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2291 f5dc347c-c33d-0410-90a0-b07cc1902cb9
- Loading branch information
Showing
4 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
# Mantis - a php based bugtracking system | ||
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org | ||
# Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev@lists.sourceforge.net | ||
# This program is distributed under the terms and conditions of the GPL | ||
# See the README and LICENSE files for details | ||
|
||
# Changes applied to 0.18 database | ||
|
||
# -------------------------------------------------------- | ||
# $Id: 0_18_inc.php,v 1.1 2004-01-31 15:10:34 vboctor Exp $ | ||
# -------------------------------------------------------- | ||
?> | ||
<?php | ||
require_once( 'db_table_names_inc.php' ); | ||
|
||
$upgrades = array(); | ||
|
||
$upgrades[] = new FunctionUpgrade( | ||
'0.18-vb-1', | ||
'Add index on bug_id field in mantis_bug_file_table.', | ||
'upgrade_0_18_vb_1' ); | ||
|
||
function upgrade_0_18_vb_1() { | ||
global $t_bug_file_table; | ||
|
||
if ( !db_key_exists_on_field( $t_bug_file_table, 'bug_id', 'MUL' ) ) { | ||
$query = "ALTER TABLE $t_bug_file_table ADD INDEX bug_id ( bug_id )"; | ||
$result = @db_query( $query ); | ||
|
||
if ( false == $result ) { | ||
return false; | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
return $upgrades; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters