View Issue Details

IDProjectCategoryView StatusLast Update
0011573mantisbtupgradepublic2013-08-09 13:50
Reportersimtel Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0 
Summary0011573: Cannot upgrade from 1.1.x to 1.2.0 using PostgreSQL and an unprivileged user
Description

If you try to upgrade from 1.1.x to 1.2.0, you cannot use a DB user that only has access to mantis' db. The upgrade process won't even start, complaining that it doesn't have access to the template1 db.

The problem comes from this section in admin/install.php:

<!-- connect to db -->
<tr>
<td bgcolor="#ffffff">
Attempting to connect to database as admin
</td>
<?php
$t_db_open = false;
$g_db = ADONewConnection( $f_db_type );
$t_result = $g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password );

if( $t_result ) {

    # check if db exists for the admin
    $t_result = $g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password, $f_database_name );

The first connect will fail, because the database name is not provided. It's actually an useless check. The only result worth checking is the second one.

i.e. I have a mantis user that is the owner of the mantis database: it can do anything on that db, but it can do nothing on other databases.

There's no reason to force the upgrade process to run as superuser: for one, it might not be possible in some environments where the DBA won't allow it.

TagsNo tags attached.

Relationships

duplicate of 0012248 closeddregad Problem updating from 1.1.8 to 1.2.0 

Activities

There are no notes attached to this issue.