File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
pdo_dblib /
tests /
bug_38955.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:41 2012 UTC (12 years, 10 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--TEST--
PDO_DBLIB driver does not support transactions
--SKIPIF--
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require dirname(__FILE__) . '/config.inc';
?>
--FILE--
<?php
require dirname(__FILE__) . '/config.inc';
/*We see these rows */
$db->query("CREATE table php_test(val int)");
$db->beginTransaction();
$db->query("INSERT INTO php_test(val) values(1)");
$db->query("INSERT INTO php_test(val) values(2)");
$db->query("INSERT INTO php_test(val) values(3)");
$db->query("INSERT INTO php_test(val) values(4)");
$db->commit();
/*We don't see these rows */
$db->beginTransaction();
$db->query("INSERT INTO php_test(val) values(5)");
$db->query("INSERT INTO php_test(val) values(6)");
$db->query("INSERT INTO php_test(val) values(7)");
$db->query("INSERT INTO php_test(val) values(8)");
$db->rollback();
$rs = $db->query("SELECT * FROM php_test");
$rows = $rs->fetchAll(PDO::FETCH_ASSOC);
var_dump($rows);
$db->query("DROP table php_test");
?>
--EXPECT--
array(4) {
[0]=>
array(1) {
["val"]=>
string(1) "1"
}
[1]=>
array(1) {
["val"]=>
string(1) "2"
}
[2]=>
array(1) {
["val"]=>
string(1) "3"
}
[3]=>
array(1) {
["val"]=>
string(1) "4"
}
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>