xref: /PHP-8.3/ext/pdo_mysql/tests/bug_51670.phpt (revision 39131219)
1--TEST--
2Bug #51670 (getColumnMeta causes segfault when re-executing query after calling nextRowset)
3--EXTENSIONS--
4pdo
5pdo_mysql
6--SKIPIF--
7<?php
8require __DIR__ . '/config.inc';
9require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
10PDOTest::skip();
11?>
12--FILE--
13<?php
14require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
15$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
16$query = $db->prepare('SELECT 1 AS num');
17$query->execute();
18if(!is_array($query->getColumnMeta(0))) die('FAIL!');
19$query->nextRowset();
20$query->execute();
21if(!is_array($query->getColumnMeta(0))) die('FAIL!');
22echo 'done!';
23?>
24--EXPECT--
25done!
26