Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78572 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30033 invoked from network); 3 Nov 2014 11:56:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2014 11:56:00 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:36935] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/92-08476-F4D67545 for ; Mon, 03 Nov 2014 06:55:59 -0500 Received: (qmail 18740 invoked from network); 3 Nov 2014 11:55:55 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 3 Nov 2014 11:55:55 -0000 Message-ID: <54576D48.3030008@beccati.com> Date: Mon, 03 Nov 2014 12:55:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Rowan Collins , PHP Internals CC: Anthony Ferrara References: <543FE883.2070401@lerdorf.com> <54574850.2020200@beccati.com> <81A50472-F8B2-425F-97AD-713D1F0C07F4@gmail.com> In-Reply-To: <81A50472-F8B2-425F-97AD-713D1F0C07F4@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH - PR] Disable ATTR_EMULATE_PREPARES by default for PDO_Mysql From: php@beccati.com (Matteo Beccati) On 03/11/2014 12:40, Rowan Collins wrote: > When using a one-shot call to query() with multiple statements (e.g. > create temp table; populate temp table; select results) it's actually > necessary with Postgres to switch on emulation, and for that > emulation to allow multiple queries even though the DBMS wouldn't. We > discovered this in moving from ext/postgres, where pg_query() doesn't > attempt to prepare the query, so allows strings containing multiple > statements. We therefore needed a compatible mode in order to switch > to PDO. Both pg_query and EMULATE_PREPARES in pdo_pgsql use PQexec, that allows multiple statements being sent at once. Going from memory it is also used with PGSQL_DISABLE_PREPARES (5.6+) if there are no bound parameters. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/