Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113803 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45070 invoked from network); 26 Mar 2021 16:34:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Mar 2021 16:34:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6451180505 for ; Fri, 26 Mar 2021 09:30:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 26 Mar 2021 09:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1616776214; bh=CNiCyzOkVpxuSV3UR915q97sTxyZZBFBQsAQd245BXc=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=AYPVqBec/ELRMom7m/WN/mI8St0a4ZNrVZyBVdzpPlme9QdHG0QSFAPHzITBsaccz +H82Ec6UmmfYqih776bPGLS8LIr5C6CzkBt6BZcLEVWdoeA9iRCqEdaTeU6skzO4xv uLRvrX6pXA1gehSexoydybr6HfgGO2CNzZtc8kSo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.130] ([84.179.253.16]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N2mFY-1ln9dR3Ty8-0134Ks; Fri, 26 Mar 2021 17:30:13 +0100 To: Calvin Buckley , internals@lists.php.net References: Message-ID: <0223e830-4c3e-c49c-7924-4bd48085fa9e@gmx.de> Date: Fri, 26 Mar 2021 17:30:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rM7Z/admG9T487GgR8EHPiy0fCtHUaubekZclKXHJXItVdtDQDw waIDJ2vZmTEEpW9oDREMcoL7aIa++xUHoWgQaqllnJ84ph36KjtFUn7QKBzB1z3it0EqA67 xqlfMkEo7ESXxfnR3KqchW3JJS9NWRlIM+pdE9r99HdVFFAsO2Ol1h1OzI4kmooBi/ZIKaj ATfXZAAeKDGb3TxobRp2w== X-UI-Out-Filterresults: notjunk:1;V03:K0:gvnaGBNl5wA=:mmRU3mEeciEWELxclVTqgK 1WyJ5eHOg/TmWeHCe4CbKKv/XWIkal04TZY2/DV6fvs+jNhm+Wf5F3a/B8FE0r4AlAAusV4QZ 7keLdqTEfnaC4UImtgBD2ThSbv538ZiLJp0D0dMuJlSSJeY01/G8geE7ZYwciO1kwYHE7Hs9B X6+82G71f6z9N0XmHuj38UCgNCw1sbe/xIM7R20B6CwzR5WZPshXB4Hs9zl2TXvcX/vp6TO3n 01plh+SvIT+Flg7qOgOH+ne6qW4lbrP/FAwqQ0C/RFnPHqUPMqeG0eQ1THC5Q09ielZAJlaJw S5OhgIP8ZiGXoOpApmeUBliHT7+WG0cSxBWTNzVSRc65QQjQSochAt1RflMF3jMElLwsbOPdS RPMWr1y7ppizvoSd9HlihimxBwSX5cI1u43yDE0o7dw4KnF1NpOZ5sUvIoeOKWgSwtS+rNY9s /u4vGRde/5FkC3peGOAxTCBGqfWxmIcnOpxHzIpjYwK0ZcAShH6tZzF/Io4QmVZn2+eMMbP67 +DqsD/QR5C+YtYBSbpxmm1xFMXCUADYg64c8f2NJ22j99RcOzKocvWt3zx/0rZov4IAqzq/2H lElxuyPPZ0DSDv3sWDnURn9BMID1DASU+WZxS3HSR+f8rmcUnvKHbMgRJ5UVgzsDfyIepgLrn X9y8NdplObU4URWNnAlVVeFZLKUgXagiUryUe4Yuxxu0E7doYztfCQvhpfizNQUG2dEpJQD/G QG4JqDAUsQB+v/eL3rYtqgXNgeDHVfi8d1QIAgE42jh/PMYUkiHDVX/PMg7zdrpVFrxGQzz3j r78nv9IywTR5h2Y8kEnp/r2kKEes4Czfl9BMteE7SgR+XVRJuxLF39oQr9vflBrWbfglkoavE G5pNpIQGd4jJcVe/Qm8OlaDQlLyOYxzM4Hpu+qL604BFFDwvLqnQv+7m2wDI54Lvq5+eq3CNB ip11NnHnZ+crG6WNtqbGAhqlgRQeTwkOMTAcB/rH3gcNaWPkzdpmH8dSwvzxTRwNqA940fEwv 9fbUmFW7ha1MRX8yp9iEXIFX3sJn2qb6zV2W0AxitqYln9Jxda9LOt7o5Tpw1Ql1eQOk7T9BM JqcAV4sC/kg88Eo2QAavF0cEVWpxLZGavoqUaKjaf01qQQgL2d+HDDpXePJyZNgLzl542pudu 5J46EXX6W4jvcQjvraYP7SLVZFeWZyuw5JsSgeNDaZ50nw3hVBpxBSI5j0sgvV0EiQp/0= Subject: Re: Improvements to PDO_ODBC From: cmbecker69@gmx.de ("Christoph M. Becker") Hi Calvin! On 26.03.2021 at 15:51, Calvin Buckley wrote: > I've been looking into improving PDO_ODBC; specifically, bringing it up > to parity with other drivers, as well as dealing with its quirks. The > company I work for supports PHP on IBM i, and while we maintain the > native database drivers for the platform, we (and IBM) have been > recommending new applications migrate to ODBC. > > However, the procedural ODBC driver does have some limitations like no > in/out parameters (which is a very=C2=A0common thing with stored procedu= res > here, unfortunately). PDO_ODBC does support this, but we've noticed > some issues: Yes, I think PDO_ODBC is the way to go. I'd leave ext/odbc alone regarding new features; I think it's mostly useful to support legacy code. The only general downsides of PDO_ODBC I can think of, are issues with ODBC specific functionality (while PDO offers extension hooks, these are not well-received for a long time), and the unfortunate fact that statements are "going_long" (and stay that way), i.e. for column sizes >=3D 256 use SQLGetData() instead of SQLBindCol() what appears to be subpar performancewise. > * Persistent connections aren't checked, even though the procedural > ODBC driver does. This has bitten some of our clients, so we have a > patch for them that does impement this; this is PR GH-6805. That PR looks basically good to me (I've already commented there that SQL_ATTR_CONNECTION_DEAD is likely the better alternative). > * Many of the connection attributes don't seem to be implemented; some > of these seem trivial to implement, others less so. > * In/out parameters require users to remember to specify size and add > one for the null terminator. I'm not familar with other ODBC drivers > to call this a driver/platform quirk, PDO_ODBC limitation, or > something else, but figuring out a good solution for this would make > life easier for users. TIL. I don't know about other PDO drivers, but this is something that should be improved for PDO_ODBC. I'm not sure about the details, but it should be doable. > * As always, ODBC being a generic abstraction later itself bites us > (i.e no standard way to get last ID). > > I'm curious if anyone has suggestions for what to be done or how to get > these done. Regarding the "how": I think PRs are the way forward. Some might need discussion on this ML or even an RFC; some may be considered bug fixes, and as such should have an accompanying bug ticket, but a PR is a good start. =2D- Christoph M. Becker