Closed
Bug 98368
Opened 24 years ago
Closed 23 years ago
The DBI connect in globals.pl does not use the db_port defined in localconfig
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: gene-bmo, Assigned: justdave)
References
Details
Attachments
(1 file, 2 obsolete files)
|
953 bytes,
patch
|
bbaetz
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
In globals.pl, the DBI->connect does not use the db_port variable defined in
localconfig. Which seems strange to me since checksetup.pl does use it.
| Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
A $::driver variable will need to be added when new databases are brought into
the mix, such as Pg (PostgreSQL). It will need to be added to localconfig,
checksetup.pl and globals.
$::driver = 'mysql';
$::db =
DBI->connect("DBI:$::driver:host=$::db_host;database=$name;port=$::db_port",
$::db_user, $::db_pass)
|| die "Bugzilla is currently broken. Please try again later. " .
"If the problem persists, please contact " . Param("maintainer") .
". The error you should quote is: " . $DBI::errstr;
Updated•24 years ago
|
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
Comment 3•24 years ago
|
||
Unfortunately this will not work for Oracle. Oracles connectstring is not the
same as Mysql and PostgreSQL. MySQL and PostgreSQL both support the format
DBI->connect('dbi:driver:dbname=dbname;host=hostname;dbport=dbport', 'user',
'password');
Whereas Oracle uses the following
DBI->connect('dbi:driver:oracle_sid', 'username', 'password');
There may be something I am doing incorrectly but I have tried it different ways
without success. Oracles networking information is stored in it's own
configuration files which can be found by placing $ENV{} variables in
globals.pl. So much for DBI giving db independence cause there will need to be
yet another conditional code block for use with Oracle.
Comment 4•23 years ago
|
||
This should probably add something into checksetup.pl to automatically add
db_port to new localconfig files.
Comment 5•23 years ago
|
||
Ignore that last comment, I must have just had some good drugs.
Comment 6•23 years ago
|
||
*** Bug 100778 has been marked as a duplicate of this bug. ***
Comment 7•23 years ago
|
||
Comment on attachment 48299 [details] [diff] [review]
Patch for globals.pl
r=bbaetz, since its idential to the patch on the dupe.
We can worry about oracle when we actually support it.
Attachment #48299 -
Flags: review+
| Assignee | ||
Comment 8•23 years ago
|
||
Comment on attachment 48299 [details] [diff] [review]
Patch for globals.pl
this entire section of the code has been completely redone since 2.14 was
release (this patch appears to be against 2.14) and the patch has bitrotted.
Attachment #48299 -
Flags: review-
| Assignee | ||
Comment 9•23 years ago
|
||
Attachment #48299 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•23 years ago
|
||
the section of code I was thinking of that had been redone was actually
checksetup.pl... my new patch isn't very different, it just applies cleanly. :)
| Assignee | ||
Comment 11•23 years ago
|
||
Attachment #65959 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 65960 [details] [diff] [review]
doh! silly typo
justdave's problem was the tabs->spaces changes, and my local version of patch
defaulting to ignore whitespace, because of all the conflicts I got - I forgot
to disable that.
r=bbaetz
Note to testers - mysql ignores the port option if you're using localhost,
since it uses the socket instead.
Attachment #65960 -
Flags: review+
| Assignee | ||
Comment 13•23 years ago
|
||
Comment on attachment 65960 [details] [diff] [review]
doh! silly typo
This is actually Gene's patch, I just cleaned it for the tip.
r=justdave
Attachment #65960 -
Flags: review+
Comment 14•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•23 years ago
|
||
*** Bug 162406 has been marked as a duplicate of this bug. ***
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•