xref: /php-src/ext/pdo_mysql/tests/bug_51670.phpt (revision 4bb75d56)
1--TEST--
2Bug #51670 (getColumnMeta causes segfault when re-executing query after calling nextRowset)
3--EXTENSIONS--
4pdo_mysql
5--SKIPIF--
6<?php
7require_once __DIR__ . '/inc/mysql_pdo_test.inc';
8MySQLPDOTest::skip();
9?>
10--FILE--
11<?php
12require_once __DIR__ . '/inc/mysql_pdo_test.inc';
13$db = MySQLPDOTest::factory();
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