xref: /PHP-8.2/ext/pdo_mysql/tests/bug70066.phpt (revision 72f47c0c)
1--TEST--
2Bug #70066: Unexpected "Cannot execute queries while other unbuffered queries"
3--EXTENSIONS--
4pdo
5pdo_mysql
6--SKIPIF--
7<?php
8require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
9MySQLPDOTest::skip();
10?>
11--FILE--
12<?php
13
14require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
15
16$pdo = MySQLPDOTest::factory();
17$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
18$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
19
20$db = $pdo->query('SELECT DATABASE()')->fetchColumn(0);
21// USE is not supported in the prepared statement protocol,
22// so this will fall back to emulation.
23$pdo->query('USE ' . $db);
24
25?>
26===DONE===
27--EXPECT--
28===DONE===
29