Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20110 invoked from network); 6 Dec 2016 17:15:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Dec 2016 17:15:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 185.153.204.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 185.153.204.204 mail4.serversure.net Linux 2.6 Received: from [185.153.204.204] ([185.153.204.204:35387] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/54-11772-042F6485 for ; Tue, 06 Dec 2016 12:15:46 -0500 Received: (qmail 16865 invoked by uid 89); 6 Dec 2016 17:15:41 -0000 Received: by simscan 1.3.1 ppid: 16859, pid: 16862, t: 0.0423s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 6 Dec 2016 17:15:41 -0000 To: internals@lists.php.net References: <758680d9-cfe2-4a93-3831-7aa03b4bc9db@nunninger.info> Message-ID: <933676c1-e828-9eb5-405e-13242fee39a7@lsces.co.uk> Date: Tue, 6 Dec 2016 17:15:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] Debugging PDO Prepared Statement Emulation v2 From: lester@lsces.co.uk (Lester Caine) On 06/12/16 16:30, Adam Baratz wrote: >> This issue is not difficult to solve in userland, at least well enough for >> debugging in my experience. Here's an older example I wrote up on my blog >> that worked (but I'm told is broken right now): https://daveyshafik.com/ >> archives/605-debugging-pdo-prepared-statements.html >> > I want to be able to write .phpt tests that validate how values are getting > interpolated into emulated prepares. Since this creates a separate code > path, it wouldn't let me validate what gets sent to the server. > PDO::quote() doesn't necessarily produce the same output as > pdo_parse_params(). The whole point of testing is that it tests real results not testing 'test code' that tries to emulate the real world. The whole point of 'emulated prepare statements' is that it creates a SQL query that the target database engine can actually work with rather than one that a more capable database engine will process. Testing the innards of some driver is simply wrong, one tests the whole process is working! And IDEALLY the test suit for PDO should work which ever target is selected, but that is not lightly to happen any time soon. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk