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
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 + 10 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC