Bug 138071 - ERROR: attachments_attach_id_seq.currval is not yet defined in this session
ERROR: attachments_attach_id_seq.currval is not yet defined in this session
Status: CLOSED RAWHIDE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
2.18
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: David Lawrence
David Lawrence
:
Depends On:
Blocks: BZ_218_Beta3
  Show dependency treegraph
 
Reported: 2004-11-04 08:58 EST by James Laska
Modified: 2013-09-02 02:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-11 13:50:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Laska 2004-11-04 08:58:06 EST
Trying to create a new bug, with an attachment I get the following software error:

Software error:

DBD::Pg::st execute failed: ERROR:  attachments_attach_id_seq.currval is not yet
defined in this session [for Statement "SELECT
currval('attachments_attach_id_seq')"] at Bugzilla/DBcompat.pm line 112
	Bugzilla::DBcompat::LastKey('attachments','attach_id') called at
/var/www/bugzilla/beta2/post_bug.cgi line 678

For help, please send mail to the webmaster (bugzilla@redhat.com), giving this
error message and the time and date of the error.
Comment 1 James Laska 2004-11-04 08:59:28 EST
When I try to attach to the bug after it is filed ...

Software error:

DBD::Pg::st execute failed: ERROR:  attachments_attach_id_seq.currval is not yet
defined in this session [for Statement "SELECT
currval('attachments_attach_id_seq')"] at Bugzilla/DBcompat.pm line 112
	Bugzilla::DBcompat::LastKey('attachments','attach_id') called at
/var/www/bugzilla/beta2/attachment.cgi line 888
	main::insert('\x{89}PNG\x{d}\x{a}\x{1a}\x{a}\x{0}\x{0}\x{0}\x{d}IHDR\x{0}\x{0}\x{4}\x{0}\x{0}\x{0}\x{3}\x{0}\x{8}\x{2}\x{0}\x{0}\x{0}5\x{d8}\x{82}Z\x{0}\x{0}\x{0}\x{3}sBIT\x{8}\x{8}\x{8}\x{db}\x{e1}O\x{e0}\x{0}\x{0}
\x{0}IDATx\x{9c}\x{ec}\x{bd}_...') called at
/var/www/bugzilla/beta2/attachment.cgi line 125

For help, please send mail to the webmaster (bugzilla@redhat.com
Comment 2 David Lawrence 2004-11-04 13:47:33 EST
Need to have fixed by beta3
Comment 3 David Lawrence 2004-11-04 14:36:23 EST
(In reply to comment #0)
> Trying to create a new bug, with an attachment I get the following software error:
> 
> Software error:
> 
> DBD::Pg::st execute failed: ERROR:  attachments_attach_id_seq.currval is not yet
> defined in this session [for Statement "SELECT
> currval('attachments_attach_id_seq')"] at Bugzilla/DBcompat.pm line 112
> 	Bugzilla::DBcompat::LastKey('attachments','attach_id') called at
> /var/www/bugzilla/beta2/post_bug.cgi line 678
> 
> For help, please send mail to the webmaster (bugzilla@redhat.com), giving this
> error message and the time and date of the error.


If you visit this bug did the attachment actually get added to the new bug? What
is the bug number?
Comment 4 David Lawrence 2004-11-04 14:48:40 EST
Found the reason for the error message, strange how it doesnt happen all the
time.  Somehow the session is ending before the get last id key is being called.

Explanation:

You attempted to execute <sequence name>.CURRVAL before using <sequence
name>.NEXTVAL in the current session.

User Action:

Execute <sequence name>.NEXTVAL before executing <sequence name>.CURRVAL
Comment 5 David Lawrence 2004-11-11 13:33:50 EST
Ping
Comment 6 James Laska 2004-11-11 13:43:11 EST
did you change anything?  It seems to have worked when I tried this yesterday
(or day before).
Comment 7 David Lawrence 2004-11-11 13:50:29 EST
I have changed the way LastKey() behaves which may help with this since it was
working in differnt section of code instead of the same db handle that was in
post_bug.cgi. So we will close this and reopen if you see it again.

Note You need to log in before you can comment on or make changes to this bug.