|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-27 11:05 UTC] wez@php.net
[2006-03-28 02:50 UTC] danhen at web dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 16:00:02 2025 UTC |
Description: ------------ A queryqueue like this produces Errormessages when used with PDO::query(): SQLite Version 2 Databases: SELECT sql FROM sqlite_master WHERE name = 'test' AND type = 'table' --OK BEGIN TRANSACTION --OK CREATE TEMPORARY TABLE test_backup AS SELECT * FROM test --OK DROP TABLE test Array ( [0] => HY000 [1] => 1 [2] => SQL logic error or missing database ) CREATE TABLE test (foo VARCHAR(123), bar VARCHAR(125), baz VARCHAR(142)) Array ( [0] => HY000 [1] => 1 [2] => table test already exists ) INSERT INTO test (foo, bar, baz) SELECT foo, bar, baz FROM test_backup --OK because table has no PRIMARY KEY COMMIT --OK SQLite Version 3 reports: SELECT sql FROM sqlite_master WHERE name = 'test' AND type = 'table' --OK BEGIN TRANSACTION --OK CREATE TEMPORARY TABLE test_backup AS SELECT * FROM test --OK DROP TABLE test Array ( [0] => HY000 [1] => 1 [2] => Database table is locked ) CREATE TABLE test (foo VARCHAR(123), bar VARCHAR(125), baz VARCHAR(142)) Array ( [0] => HY000 [1] => 1 [2] => table test already exists ) INSERT INTO test (foo, bar, baz) SELECT foo, bar, baz FROM test_backup --OK because table has no PRIMARY KEY COMMIT --OK The 'old' sqlite extensions works fine with this code also pdo_sqlite does when the connection is closed and reopened right before beginning the transaction. Running this code on the same connection causes the written messages. closeCursor() is called between the different statements and the Statement-objects are unset()'ed. PHP-Version is 5.1.2 (it isn't in the dropdown) I dont now if it is a PDO_SQLite Bug or a bug in SQlite itself.