Closed
Bug 218897
Opened 21 years ago
Closed 21 years ago
tinderbox3 login script has a perl parse error
Categories
(Webtools Graveyard :: Tinderbox, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bear, Assigned: mcafee)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030612 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030612 when clicking on the Login link from the admin.pl script I get the following error: DBD::Pg::db do failed: ERROR: parser: parse error at or near ")" at character 148 at Tinderbox3/Login.pm line 53. Reproducible: Always Steps to Reproduce: 1. browse to the tinderbox3 admin.pl cgi script 2. Click on the Login link 3. Enter any email/password values and click on the login button Actual Results: DBD::Pg::db do failed: ERROR: parser: parse error at or near ")" at character 148 at Tinderbox3/Login.pm line 53.
Reporter | ||
Comment 1•21 years ago
|
||
ok, took a look at the Login.pm code and found that Tinderbox3::DB::sql_current_timestamp() is returning an invalid function for postgresql. I also noted that it does not have the same db type check that other methods in Tinderbox3::DB have. Once I changed line 58 of Login.pm to read: $dbh->do("INSERT INTO tbox_session (login, session_id, activity_time) VALUES (?, ?, current_timestamp)", undef, $login, $new_session_id); it worked. yes I know that makes it pgsql specific. so that gets me past the login issue, but then I get more errors further downstream.
Comment 2•21 years ago
|
||
Checked in the following change to DB.pm to make sql_current_timestamp work again on Pg: Index: Tinderbox3/DB.pm @@ -368,7 +368,11 @@ } sub sql_current_timestamp { - return "current_timestamp()"; + if ($dbtype eq "Pg") { + return "current_timestamp"; + } elsif ($dbtype eq "mysql") { + return "current_timestamp()"; + } } Sorry for not attaching the diff itself, jkeiser and I discussed it over IRC earlier, and he OKed the checkin, so I did -- we were unaware of the open bug report.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•