[Rt-commit] r4073 - in rt/branches/3.4-RELEASE: . sbin

jesse at bestpractical.com jesse at bestpractical.com
Mon Nov 14 13:37:01 EST 2005


Author: jesse
Date: Mon Nov 14 13:37:01 2005
New Revision: 4073

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/sbin/rt-setup-database.in
Log:
 r18895 at truegrounds:  jesse | 2005-11-14 13:35:29 -0500
 RT-Ticket: 7136
 RT-Status: resolved
 RT-Update: correspond
 
 Stuart Knight reports:
 
 As part of the "initdb" processing, the scripts went through and created a new database user, in my case called RT3.
 
 When it came time to create the tables, the script was still logged on as the dba user "system", so all of tables/sequences were created under "system"'s schema.
 
 I followed through the rt-setup-database script, and spotted that there was a database disconnect, followed by an immediate reconnect, as the same user. (in the case of Oracle this still being the "dba" account)
 
 Putting an extra validation check in here for Oracle, and then connecting as the intended database user fixed up the issue.
 


Modified: rt/branches/3.4-RELEASE/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.4-RELEASE/sbin/rt-setup-database.in	(original)
+++ rt/branches/3.4-RELEASE/sbin/rt-setup-database.in	Mon Nov 14 13:37:01 2005
@@ -130,7 +130,13 @@
     unless ($RT::DatabaseType eq 'SQLite') {
 
         $dbh->disconnect;
+
+	if ($RT::DatabaseType eq "Oracle") {
+        $dbh = DBI->connect( $Handle->DSN, ${RT::DatabaseUser}, ${RT::DatabasePassword} ) || die $DBI::errstr;
+	} else {
+	
         $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} ) || die $DBI::errstr;
+	}
     }
     print "Now populating database schema.\n";
     insert_schema();


More information about the Rt-commit mailing list