Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93089 invoked from network); 24 Apr 2012 12:41:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2012 12:41:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes.schlueter@oracle.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johannes.schlueter@oracle.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain oracle.com designates 141.146.126.227 as permitted sender) X-PHP-List-Original-Sender: johannes.schlueter@oracle.com X-Host-Fingerprint: 141.146.126.227 acsinet15.oracle.com Received: from [141.146.126.227] ([141.146.126.227:22764] helo=acsinet15.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/9A-34190-66F969F4 for ; Tue, 24 Apr 2012 08:41:10 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q3OCf5pt007631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Apr 2012 12:41:06 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q3OCf44o011460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Apr 2012 12:41:05 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q3OCf4VZ029905; Tue, 24 Apr 2012 07:41:04 -0500 Received: from [192.168.2.230] (/88.217.90.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Apr 2012 05:41:03 -0700 To: jpauli Cc: PHP Internals In-Reply-To: References: <1335269202.13732.34.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Organization: Oracle Corporation Date: Tue, 24 Apr 2012 14:41:00 +0200 Message-ID: <1335271260.13732.49.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Subject: Re: [PHP-DEV] Expose mysqlnd API through all MySQL extensions From: johannes.schlueter@oracle.com (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2012-04-24 at 14:27 +0200, jpauli wrote: > Aha, I like when an internals guy teach me internals stuff :) > So, OK for 5.3 , what about supporting that for >=5.4 ? Maybe. ;-) > > > > The other reason is that one idea for mysqlnd was that it doesn't expose > > anything to the userland while ext/mysql is legacy and get's no > > additions and PDO would allow user-defined functions,while that's not > > really nice. > > That was my first question : Is it better to provide mysqlnd API > through all 3 MySQL extensions, or through a common mysqlnd_***() API > ? > I understand your thoughts, but I disagree as I think it would be much > more clean to expose it via mysqlnd_***() API than through each MySQL > ext (and for PDO that would be even more dirty). That would as well > add more and more #ifdef MYSQLND inside their source... > I was thinking the same way libxml2 API is provided inside ext/libxml > instead of through each PHP XML extension API. Well, as said, we couldn't before 5.4. I gave the "historical" reason for the current state. > >> What if I choose to only compile pdo_mysql (against mysqlnd) and not > >> mysqli ?? I then would be able to use mysqlnd, but I would have access > >> to its statistics, as its functions are part of ext/mysqli... Strange > >> as well as embarrassing isn't it ? > > > > You simply shouldn't do that ;-) > > ;-) OK, but that can be done easily. More and more people use > pdo_mysql and could be able to not compile other MySQL extensions (I > got some machines where only pdo_mysql is compiled in) All distros I recently checked put all three mysql extensions in the same package. People who build PHP themselves should be able to fix this easily. So this does not seem to be an issue. (while that's irrelevant for the mysqli vs. myslqnd question) johannes