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