View Issue Details

IDProjectCategoryView StatusLast Update
0009792mantisbtdb mssqlpublic2014-05-16 15:00
Reportercorny Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.4 
Fixed in Version1.2.0a3 
Summary0009792: SQL function DESCRIBE does not exist for MSSQL 2000
Description

In admin/upgrade_inc.php function admin_check_applied() on line 35


    $result = db_query( "DESCRIBE $c_table_name $c_field_name" );

the command DESCRIBED is used. This command does not exist in MSSQL 2000.

I'm not sure about the purpose of admin_check_applied(). If it only check the existence of a table and a cell then line 35 could be replaced with this fragment which looks into INFORMATION_SCHEMA.COLUMNS to gather the info:


    global $g_db_type;

    if( $g_db_type == 'mssql' ) {

        $query = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='$c_table_name'" ;

        if ($c_field_name!=''){

            $query = $query." AND COLUMN_NAME = '$c_field_name'";

        }       

        $query = $query.";";

        $result = db_query( $query );

    } else {

        $result = db_query( "DESCRIBE $c_table_name $c_field_name" );

    }

Would someone check this please.

Steps To Reproduce

Delete table mantis_upgrade_table and do a upgrade on MSSQL 2000. The missing table should be created then.

TagsNo tags attached.

Activities

thraxisp

thraxisp

2008-11-09 15:57

reporter   ~0019825

Last edited: 2008-11-09 15:59

This function is no longer used in the 1.1 stream. It is part of a legacy updater used to go from old releases to 1.0.0. It has been removed completely from the 1.2 stream.

You should not be using the admin/upgrade.php page at all, instead, use admin/install.php for both new installs and upgrades.

thraxisp

thraxisp

2008-11-09 17:04

reporter   ~0019826

Won't backport the changes from 1.2.x to 1.1.5

grangeway

grangeway

2014-05-16 15:00

reporter   ~0040397

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul