php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58116 Sequence handling is broken
Submitted: 2008-03-25 05:08 UTC Modified: 2009-05-18 06:14 UTC
From: alexander dot thiem at ingres dot com Assigned:
Status: Not a bug Package: ingres (PECL)
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 - 45 = ?
Subscribe to this entry?

 
 [2008-03-25 05:08 UTC] alexander dot thiem at ingres dot com
Description:
------------
Inserting into a table with an auto-sequence and then trying to get the inserted id fails with fatal error when using the code below.




Reproduce code:
---------------
create table my_table (i integer with default my_seq.nextval)

<?php
$link = ingres2_connect("database");
ingres2_autocommit($link);
ingres2_query($link, "insert into my_table values (default)");
$res = ingres2_query($link, "select current value for my_seq");
$row = ingres2_fetch_array($res);
?>

Expected result:
----------------
It should return the last ID for that sequence

Actual result:
--------------
It gives a fatal error with internal commit

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-18 06:14 UTC] grant dot croker at ingres dot com
Thank you for taking the time to write to us, but this is not
a bug.

Unfortunately this is expected with Ingres and auto-commit enabled.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 11:01:31 2024 UTC