xref: /PHP-5.4/ext/pdo_mysql/tests/bug_51670.phpt (revision 8f128b2b)
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 dirname(__FILE__) . '/config.inc';
7require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
8PDOTest::skip();
9?>
10--FILE--
11<?php
12require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
13$db = PDOTest::test_factory(dirname(__FILE__) . '/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--EXPECTF--
23done!
24
25