View Issue Details

IDProjectCategoryView StatusLast Update
0006519mantisbtdb oraclepublic2014-05-16 15:01
ReporterWillimaendu Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.0rc4 
Fixed in Version1.1.0a1 
Summary0006519: Error on opening Change Log
Description

I use Mantis with an MS SQL-Server 2000 over ODBC. When I'm opening the Change Log it produces an error:
APPLICATION ERROR #1100
Problem 0 not found.

So, I looked into the code and saw that you have after the loop the following statement $t_result->fields ...
In database_api.php there is a function db_fetch_array in which is little but important comment:

mysql obeys FETCH_MODE_BOTH, hence ->fields works, other drivers do not support this

I think that's the problem

TagsNo tags attached.

Relationships

parent of 0007032 closedvboctor Port: Error on opening Change Log 

Activities

Willimaendu

Willimaendu

2005-12-20 08:58

reporter   ~0011821

I replaced the code for loop with the following. Now it works for MS SQL2k...

        for (;!$t_result->EOF;) {
            # hide private bugs if user doesn't have access to view them.
            $t_row = db_fetch_array( $t_result );

            if ( !$t_can_view_private && ( $t_row['view_state'] == VS_PRIVATE ) ) {
                continue;
            }

            # check limit_Reporter (Issue #4770)
            # reporters can view just issues they reported
            if ( ON === $t_limit_reporters && $t_user_access_level_is_reporter &&
                 !bug_is_user_reporter( $t_row['id'], $t_user_id )) {
              continue;
            }

            $t_issue_id = $t_row['id'];

            if ( !helper_call_custom_function( 'changelog_include_issue', array( $t_issue_id ) ) ) {
                continue;
            }

            # Print the header for the version with the first changelog entry to be added.
            if ( $t_first_entry && !$t_version_header_printed ) {
                if ( $i > 0 ) {
                    echo '<br />';
                }

                print_version_header( $t_version_id );

                $t_version_header_printed = true;
                $t_first_entry = false;
            }

            helper_call_custom_function( 'changelog_print_issue', array( $t_issue_id ) );
        }
mechantflou

mechantflou

2006-03-30 05:10

reporter   ~0012443

With Oracle I had the same problem, this is the solution :

for ( $t_result = db_query( $query ); !$t_result->EOF; $t_result->MoveNext() ) {

hide private bugs if user doesn't have access to view them.

            if ( !$t_can_view_private && ( $t_result->fields['view_state'] == VS_PRIVATE ) ) {
                continue;
            }
            # check limit_Reporter (Issue #4770)
            # reporters can view just issues they reported
            if ( ON === $t_limit_reporters && $t_user_access_level_is_reporter &&
                 !bug_is_user_reporter( $t_result->fields['id'], $t_user_id )) {
              continue;
            }
            //$t_issue_id = $t_result->fields['id'];
            //MODIFICATION probleme de valeur ID vide BUG non trouve
            //SOLUTION------------------------------
            $row=db_fetch_array($t_result);
            $t_issue_id =$row['id'];
        //---------------------------------------

            if ( !helper_call_custom_function( 'changelog_include_issue', array( $t_issue_id ) ) ) {
                continue;
            }

            # Print the header for the version with the first changelog entry to be added.
            if ( $t_first_entry && !$t_version_header_printed ) {
                if ( $i > 0 ) {
                    echo '<br />';
                }

                print_version_header( $t_version_id );

                $t_version_header_printed = true;
                $t_first_entry = false;
            }

            helper_call_custom_function( 'changelog_print_issue', array( $t_issue_id ) );
        }
vboctor

vboctor

2006-04-25 08:08

manager   ~0012714

This is fixed as part 0006888. I didn't mark this as duplicate and set the category to "db oracle" so that the changelog reflects that it is fixed for both MS SQL and Oracle. The fix will be included in Mantis 1.1 and is available in CVS.

grangeway

grangeway

2014-05-16 15:01

reporter   ~0040499

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