xref: /php-src/ext/odbc/tests/bug46050.phpt (revision b5a14e6c)
1--TEST--
2Bug #46050 (odbc_next_result corrupts prepared resource)
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9include __DIR__ . "/config.inc";
10$conn = odbc_connect($dsn, $user, $pass);
11$stmt = odbc_prepare($conn, "SELECT 1");
12var_dump(odbc_execute($stmt));
13var_dump(odbc_fetch_array($stmt));
14var_dump(odbc_next_result($stmt));
15var_dump(odbc_execute($stmt));
16var_dump(odbc_fetch_array($stmt));
17?>
18--EXPECT--
19bool(true)
20array(1) {
21  ["1"]=>
22  string(1) "1"
23}
24bool(false)
25bool(true)
26array(1) {
27  ["1"]=>
28  string(1) "1"
29}
30