xref: /php-src/ext/pdo_mysql/tests/bug70066.phpt (revision 4bb75d56)
1--TEST--
2Bug #70066: Unexpected "Cannot execute queries while other unbuffered queries"
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$pdo = MySQLPDOTest::factory();
14
15$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
17
18$db = $pdo->query('SELECT DATABASE()')->fetchColumn(0);
19// USE is not supported in the prepared statement protocol,
20// so this will fall back to emulation.
21$pdo->query('USE ' . $db);
22?>
23===DONE===
24--EXPECT--
25===DONE===
26