1--TEST--
2ibase_rollback(): Basic test
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7
8require("interbase.inc");
9
10$x = ibase_connect($test_base);
11
12ibase_query('INSERT INTO test1 VALUES (100, 2)');
13ibase_query('INSERT INTO test1 VALUES (100, 2)');
14ibase_query('INSERT INTO test1 VALUES (100, 2)');
15
16$rs = ibase_query('SELECT COUNT(*) FROM test1 WHERE i = 100');
17var_dump(ibase_fetch_row($rs));
18
19var_dump(ibase_rollback($x));
20
21$rs = ibase_query('SELECT COUNT(*) FROM test1 WHERE i = 100');
22var_dump(ibase_fetch_row($rs));
23
24var_dump(ibase_rollback($x));
25var_dump(ibase_rollback());
26
27?>
28--EXPECTF--
29array(1) {
30  [0]=>
31  int(3)
32}
33bool(true)
34array(1) {
35  [0]=>
36  int(0)
37}
38bool(true)
39
40Warning: ibase_rollback(): invalid transaction handle (expecting explicit transaction start)  in %s on line %d
41bool(false)
42