Closed
Bug 585878
Opened 15 years ago
Closed 14 years ago
[Oracle] Filing first bug crashes Bugzilla
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ruslan.popov, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100716 Ubuntu/10.04 (lucid) Firefox/3.6.7
Build Identifier:
New installation of Bugzilla 3.6.2 (3.6.1 do the same) with Oracle 10g2. Schema was created without any errors. Web interface works well. I try to create new bug on Test product and have got the error.
Reproducible: Always
Steps to Reproduce:
1. Create new Bugzilla scheme in Oracle DB.
2. Create new bug for Test product.
Actual Results:
Software error:
DBD::Oracle::db do failed: ORA-01858: a non-numeric character was found where a numeric was expected (DBD ERROR: error possibly near <*> indicator at char 342 in 'INSERT INTO bugs (priority, reporter, keywords, bug_file_loc, product_id, rep_platform, assigned_to, everconfirmed, short_desc, qa_contact, status_whiteboard, bug_severity, bug_status, delta_ts, version, deadline, estimated_time, component_id, target_milestone, alias, op_sys) VALUES (:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:<*>p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21)') [for Statement "INSERT INTO bugs (priority, reporter, keywords, bug_file_loc, product_id, rep_platform, assigned_to, everconfirmed, short_desc, qa_contact, status_whiteboard, bug_severity, bug_status, delta_ts, version, deadline, estimated_time, component_id, target_milestone, alias, op_sys) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"] at Bugzilla/DB/Oracle.pm line 401
Bugzilla::DB::Oracle::do(undef, 'INSERT INTO bugs (priority, reporter, keywords, bug_file_loc,...', undef, '---', 1, '', '', 1, 'PC', ...) called at Bugzilla/Object.pm line 487
Bugzilla::Object::insert_create_data('Bugzilla::Bug', 'HASH(0x28c17c58)') called at Bugzilla/Bug.pm line 499
Bugzilla::Bug::create('Bugzilla::Bug', 'HASH(0x292ab03c)') called at /usr/local/www/data/bugzilla/post_bug.cgi line 171
For help, please send mail to the webmaster (you@your.address), giving this error message and the time and date of the error.
Expected Results:
New bug
Summary: Filing first bug crashes Bugzilla → [Oracle] Filing first bug crashes Bugzilla
Comment 1•15 years ago
|
||
Cannot reproduce on landfill, using Bugzilla 4.1.
Version: unspecified → 3.6.2
Comment 2•15 years ago
|
||
The field in the error message is delta_ts. Per my discussion with the reporter on IRC, the value passed to delta_ts when creating the bug is "10-AUG-10 04.37.53 PM". Is that a valid date format for Oracle? For instance, MySQL passes "2010-08-10 14:39:36". Could it be a problem with NLS_DATE_FORMAT?
| Reporter | ||
Comment 3•15 years ago
|
||
I start debug the code:
sub do {
my $self = shift;
my $sql = shift;
$sql = adjust_statement($sql);
unshift @_, $sql;
open(FILEF,'>>/tmp/zzz');
my($e);
for $e(@_) {
print FILEF "$e\n";
}
close(FILEF);
return $self->SUPER::do(@_);
}
That is the content of /tmp/zzz after trying to add a bug:
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_COMP='ANSI'
ALTER SESSION SET NLS_SORT='BINARY_AI'
UPDATE logincookies SET lastused = NOW()
WHERE cookie = ?
TUN8eVMBPL
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
INSERT INTO bugs (priority, reporter, keywords, bug_file_loc, product_id, rep_platform, assigned_to, everconfirmed, short_desc, qa_contact, status_whiteboard, bug_severity, bug_status, delta_ts, version, deadline, estimated_time, component_id, target_milestone, alias, op_sys) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
---
1
1
PC
1
1
123test
enhancement
NEW
11-AUG-10 10.55.29 AM
unspecified
0
1
---
Windows
Do you fill the difference between:
"YYYY-MM-DD HH24:MI:SS"
and:
"11-AUG-10 10.55.29 AM"
| Reporter | ||
Comment 4•15 years ago
|
||
Trying to patch code:
SELECT localtimestamp(0) => SELECT to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS')
this starts to generate datetime in right format, but produces other errors:
Software error:
The 'hour' parameter (undef) to DateTime::new was an 'undef', which is not one of the allowed types: scalar
at /usr/local/lib/perl5/site_perl/5.10.1/mach/DateTime.pm line 194
DateTime::new(undef, 'HASH(0x29cd7f28)') called at Bugzilla/Util.pm line 460
Bugzilla::Util::datetime_from('11-AUG-10') called at Bugzilla/Bug.pm line 2756
Bugzilla::Bug::comments('Bugzilla::Bug=HASH(0x29aa10f0)', 'HASH(0x29aa17d0)') called at Bugzilla/BugMail.pm line 360
Bugzilla::BugMail::Send(1, 'HASH(0x293d34ec)') called at /usr/local/www/data/bugzilla/post_bug.cgi line 255
For help, please send mail to the webmaster (you@your.address), giving this error message and the time and date of the error.
Why do you preselect datetime from database? Just simple use SYSDATE as value for particular field. For MySQL you may use NOW() in place of SYSDATE.
Comment 5•15 years ago
|
||
Hey xiaoou, still alive?
Comment 6•14 years ago
|
||
I tried with Oracle 10g2 too, and delta_ts has the correct format. Bug creation works without any problem. Looks like something is wrong with your installation (else we would have got much more bug reports for something so major).
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•