php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56575 INSERT query fails after SELECT MIN or SELECT MAX on primary key
Submitted: 2005-10-03 06:36 UTC Modified: 2006-02-27 07:34 UTC
From: veter at oxarchdigital dot com Assigned:
Status: No Feedback Package: PDO_SQLITE (PECL)
PHP Version: 5.0.3 OS: Win32
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: veter at oxarchdigital dot com
New email:
PHP Version: OS:

 

 [2005-10-03 06:36 UTC] veter at oxarchdigital dot com
Description:
------------
Reproducible on all versions of PHP 5 including latest CVS.
PECL Module version: 0.9 $Id: pdo_sqlite.c,v 1.10 2005/07/27 04:07:11 wez Exp $
SQLite Library: 3.2.5undefined

Any INSERT operation on any sqlite table will fail after previous SELECT MIN() or SELECT MAX() on the table's primary key.

Reproduce code:
---------------
http://81.179.48.50/~veter/sqlite-bug.zip


Expected result:
----------------
executing query 0: 
CREATE TABLE log_events (
ID integer primary key,
msg text)

 executing query 1: 
SELECT MAX(ID) FROM log_events

 executing query 2: 
INSERT INTO log_events(msg) VALUES ('line 2')

Actual result:
--------------
executing query 0: 
CREATE TABLE log_events (
ID integer primary key,
msg text)

 executing query 1: 
SELECT MAX(ID) FROM log_events

 executing query 2: 
INSERT INTO log_events(msg) VALUES ('line 2')
FAILURE: 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-26 23:45 UTC] wez@php.net
Please try a php 5.1 snapshot from:
http://snaps.php.net/win32/php5.1-win32-latest.zip
 [2006-02-27 07:34 UTC] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 06 16:01:25 2021 UTC