Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60932 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22963 invoked from network); 22 Jun 2012 02:19:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jun 2012 02:19:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.51 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.51 mail-qa0-f51.google.com Received: from [209.85.216.51] ([209.85.216.51:36203] helo=mail-qa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/F4-21324-226D3EF4 for ; Thu, 21 Jun 2012 22:19:14 -0400 Received: by qaea16 with SMTP id a16so127096qae.10 for ; Thu, 21 Jun 2012 19:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8/p0+YNNfUI2DkfpJxq6UhSOx3u3MRYHPPEGgM4l0Dg=; b=a27lkrU4py38uPMCgV0MPvq+Srm6z1rrQPiu5K1QDnF0m3wKg4Wj3JtmJUSlEQWLN0 hMLwZPqcT5+arcONyuL5WrBMqV42bhC9ta1j9jf7SwVyCOXkwg8NOiB09iJNzNZplOob 8Tiw/83y0KS85xOMjHMd+7Ou+jxWCHzOeGaEsV11Fk/7ByKqhhLrwPIxkCfK1DTKNkiY BTADF7+eXH0Qk4XuRPla/Qro0IgqO3OFHQc/lVAS4+dj2P+X99zFuL6+QRiC7Cex7TQ0 PGFjikbuD974JT/wfGiVj5OkfUEi+z0aW64bdKGEURMsxa8u1+fhnyz+KMM9tSwMGB56 tDLQ== MIME-Version: 1.0 Received: by 10.224.77.19 with SMTP id e19mr3428022qak.49.1340331551748; Thu, 21 Jun 2012 19:19:11 -0700 (PDT) Received: by 10.229.232.11 with HTTP; Thu, 21 Jun 2012 19:19:11 -0700 (PDT) In-Reply-To: <4FE2C5D7.2040606@phpdoc.de> References: <4FDB5604.5000704@oracle.com> <4FDB62C2.6090702@oracle.com> <4FDC3396.10406@phpdoc.de> <4FE0F301.70808@oracle.com> <4FE2C5D7.2040606@phpdoc.de> Date: Thu, 21 Jun 2012 22:19:11 -0400 Message-ID: To: Ulf Wendel Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH - PR] Disable ATTR_EMULATE_PREPARES by default for PDO_Mysql From: ircmaxell@gmail.com (Anthony Ferrara) As it turns out, the testing of this is far more difficult than I originally suspected. Not because it fails, but because emulated queries were behaving badly to begin with, so a number of tests were testing bad behavior. For example, bug 44327: https://github.com/ircmaxell/php-src/blob/master/ext/pdo_mysql/tests/bug443= 27.phpt It runs the following code: $stmt =3D $db->prepare('foo'); @$stmt->execute(); $row =3D $stmt->fetch(); var_dump($row->queryString); And expects: Notice: Trying to get property of non-object in %s on line %d NULL Whereas the proper behavior is for the syntax error to be thrown from `prepare`. PDO emulation doesn't do that, because it doesn't parse until `execute`, hence the error delays until that point. When I run it, I get: Warning: PDO::prepare(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'foo' at line 1 in %s on line %d Because it's sent back at prepare() instead of at execute (and prepare doesn't have an @). There are at least a few more failures of this nature. To fix this, is going to take some significant refactoring of a number of tests. Plus, without this patch, I'm still getting 2 warnings and 6 failures: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Number of tests : 166 157 Tests skipped : 9 ( 5.4%) -------- Tests warned : 2 ( 1.2%) ( 1.3%) Tests failed : 6 ( 3.6%) ( 3.8%) Expected fail : 1 ( 0.6%) ( 0.6%) Tests passed : 148 ( 89.2%) ( 94.3%) --------------------------------------------------------------------- Time taken : 43 seconds =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D EXPECTED FAILED TEST SUMMARY --------------------------------------------------------------------- PECL Bug #7976 (Calling stored procedure several times) [ext/pdo_mysql/tests/bug_pecl_7976.phpt] XFAIL REASON: Works with mysqlnd. It is not supported by libmysql. For libmysql is good enough to see no crash. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILED TEST SUMMARY --------------------------------------------------------------------- Bug #39858 (Lost connection to MySQL server during query by a repeated call stored proced) [ext/pdo_mysql/tests/bug_39858.phpt] PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries) [ext/pdo_mysql/tests/bug_41997.phpt] MySQL PDO->__construct() - Generic + DSN [ext/pdo_mysql/tests/pdo_mysql___construct.phpt] MySQL PDO->exec(), affected rows [ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt] MySQL PDOStatement->nextRowSet() [ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt] MySQL Prepared Statements and different column counts [ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WARNED TEST SUMMARY --------------------------------------------------------------------- Bug #44454 (Unexpected exception thrown in foreach() statement) [ext/pdo_mysql/tests/bug_44454.phpt] (warn: XFAIL section but test passes) MySQL PDO->prepare(), emulated PS [ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt] (warn: XFAIL section but test passes) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Whereas with the patch, there are a few more failures: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Number of tests : 166 157 Tests skipped : 9 ( 5.4%) -------- Tests warned : 2 ( 1.2%) ( 1.3%) Tests failed : 18 ( 10.8%) ( 11.5%) Expected fail : 1 ( 0.6%) ( 0.6%) Tests passed : 136 ( 81.9%) ( 86.6%) --------------------------------------------------------------------- Time taken : 53 seconds =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D So to do this, I'd need to fix those as well... (at least all but the XFAIL= ) So I'm going to keep at it, but it's going to take a while (and would like some insight into if this is the best approach to fixing the tests)... Thanks, Anthony On Thu, Jun 21, 2012 at 2:57 AM, Ulf Wendel wrote: > Am 20.06.2012 08:39, schrieb Pierre Joye: > >> hi Chris, >> >> On Tue, Jun 19, 2012 at 11:45 PM, Christopher Jones >> =A0wrote: >> >>> We should take this offline - I can see cases where I'd strongly >>> disagree. >> >> >> I see no reason to move a discussion offline or off list, this is a >> topic that interests many other readers or developers. > > > Agreed. There was enough trouble around PDO and discussions going on in t= he > hidden. > > However, this does not impact the original topic. > > Ulf > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >