summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pdo_dblib/tests/bug_68957.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/pdo_dblib/tests/bug_68957.phpt b/ext/pdo_dblib/tests/bug_68957.phpt
new file mode 100644
index 0000000000..3d6e2fd13d
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_68957.phpt
@@ -0,0 +1,29 @@
+--TEST--
+PDO_DBLIB bug #68957 PDO::query doesn't support several queries
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+
+$query = "declare @myInt int = 1; select @myInt;";
+$stmt = $db->query($query);
+$stmt->nextRowset(); // Added line
+$rows = $stmt->fetchAll();
+print_r($rows);
+
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [computed0] => 1
+ [0] => 1
+ )
+
+)
+