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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexander dot thiem at ingres dot com
New email:
PHP Version: OS:

 

 [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: Mon Apr 22 13:01:30 2024 UTC