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