Skip to content

Commit

Permalink
Merge branch 'PHP-5.6' into PHP-7.0
Browse files Browse the repository at this point in the history
* PHP-5.6:
  add test for bug #73068
  • Loading branch information
weltling committed Sep 13, 2016
2 parents 941b56d + 248f8c3 commit 5163925
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ext/sqlite3/tests/bug73068.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--TEST--
Bug #73068 SQLite3 may fail to DELETE
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php

$db = new \SQLite3(':memory:') ;

$db->exec("CREATE TABLE IF NOT EXISTS t1(a INT UNIQUE, b INT)");
$db->exec("INSERT OR REPLACE INTO t1(a,b) VALUES('1','2')");

$r = $db->query("SELECT * FROM t1 WHERE a='1' AND b='2'");
var_dump($r->fetchArray());

$db->exec("DELETE FROM t1 WHERE a='1' AND b='2'");

$r = $db->query("SELECT * FROM t1;");
var_dump($r->fetchArray());

$db->close();

?>
==OK==
--EXPECT--
array(4) {
[0]=>
int(1)
["a"]=>
int(1)
[1]=>
int(2)
["b"]=>
int(2)
}
bool(false)
==OK==

0 comments on commit 5163925

Please sign in to comment.