Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127674 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 580541A00BC for ; Mon, 16 Jun 2025 13:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750080441; bh=xM372RW+gu+2oIU3jpbV2kFXWKtCTlMIm5YEs7VLOls=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=lXj3kGpcc92HVAP5bMF5+K+//kflecnElKi2LY8JbaCh/h2VOTo/ZSuX5QeZMokpI lsvzZUegSTx0VZ7iEaI6YBsdux+KS7MonmYfNb3DqgxzP7P79funsmczgDcLJQKPLk 7ayp0EGhDFoxqL5SlQPvWzLw70blGjgQ4ej0teZZ8GpNpQG8noYqaC2fX0PyY7c3jN l3qg32ZHwtIkAIS2HENtW6jLr+50IbyfXUujloDmZ0T7lzKy9I4dyUO4TsHP7kW7ze nC6OF/1zOK2tFH0df0Fu7XoyuFvIMuhUxDhM8hpNGKCLJCL9xU37z+3TgsiplXhxih lHAAq50Vk8mzw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 397541801E4 for ; Mon, 16 Jun 2025 13:27:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 16 Jun 2025 13:27:20 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id CA201114022A; Mon, 16 Jun 2025 09:29:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Mon, 16 Jun 2025 09:29:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beccati.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1750080558; x=1750166958; bh=fgW+oFz+jfTwMMpKFcFW9fnl6A1toxk5yFnZy56U8b4=; b= D5Y35OPGy1JiLoa4w7TQBygymSu1Tbhfhhk1/q6M4VknPpOHpM74kM8x3CEwg8Gf Y7MZcGgjDeQZukN+dVRhUn2fmWv7Jgv0P+MNpCWFS5CFeQq9J+qFxNwFFDIl0mRU RCCHhiM2IS84J61N7UGIrWqmKVp9Flh89lF0I4kvc13FOQEC7FXfgcZg5d5pmO8S +2JYWC9OXHj9Zyz2Fudxd8dZpYZDPkVzvH1q8vssOkJ65aIsxsZEO0fofdMwb/vO Vpf2oWUInx5FUT6fY/ElQUy2KFGTscYlz24Z8MlNh0aQ1LwcrWQXfVh40Gt/Dkrp Ft5F2cllNhcOyACqr/T4Zw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1750080558; x= 1750166958; bh=fgW+oFz+jfTwMMpKFcFW9fnl6A1toxk5yFnZy56U8b4=; b=T 2anNeV8b9vlZwrFw4d7F6Xs4BnmL9XowqD+At88DK8boWuU9C//K2aQ/x5/ofsO7 tPS0As/K2C1FhhBW4kLRapqE3EJWv1z5XO5NuYxxTF2zmAgmxIvFF/VwHWwqNM+A ElMc3Gugka0SQk5RtmzsG8L0kZ08/92krnDhMrz3O8iwZ7eCyI5oOV2rm9rJukAR aFqpm/jdSdxVBmr19FqY1BP6uGgOekeVrhWlgZOQeDyZFAajE4udD0uSQ865cD+2 GZkh0Ni92pBOIMmrixmkIVhm6lVfa447vlrn1ZwJw46C+FTrcblg7BIGjQtCGong rOpg9a30gufe0+yGLzMxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvieejtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfhuffvvehfjggtgfesthejredttddv jeenucfhrhhomhepofgrthhtvghouceuvggttggrthhiuceophhhphessggvtggtrghtih drtghomheqnecuggftrfgrthhtvghrnhepkefghfffteefvedvkeeivdekvdfhffehtdej vdehfeeiheehgfeiteegtdegieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpsg gvtggtrghtihdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehphhhpsegsvggttggrthhirdgtohhmpdhnsggprhgtphhtthhopeefpd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehgphgsrdhm ohgvpdhrtghpthhtoheptggrlhhvihhnsegtmhhptghtrdhinhhfohdprhgtphhtthhope hinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i6f4c46c2:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Jun 2025 09:29:17 -0400 (EDT) Message-ID: Date: Mon, 16 Jun 2025 15:29:16 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Interest in a binary parameter type in PDO? To: "Gina P. Banyard" , Calvin Buckley Cc: php internals References: <193E3B72-AE8B-4686-8ACB-9CB68E3947BC@cmpct.info> Content-Language: it In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: php@beccati.com (Matteo Beccati) Hi, as mentioned in https://github.com/php/php-src/pull/15949 I still think that PARAM_LOB can safely be used as identifier for binary data, as pdo_mysql and pdo_pgsql do. Cheers On 15/06/2025 16:52, Gina P. Banyard wrote: > On Wednesday, 23 October 2024 at 17:36, Calvin Buckley wrote: > >> Hi internals, >> >> I've been debugging some recent issues users have had, as well as >> discussing some related ones. I've come to the conclusion there's a lot >> issues with applications trying to access binary data via PDO drivers. >> >> For example >> >> - Binary data when quoting in SQL Server can easily get mangled, as the >> quoter can't handle binary data and truncates the string. It's >> possible other drivers are like this too. >> - ODBC drivers can be unpredictable behaviour wise when binding binary >> data as SQL_C_CHAR (like what the get_col handler does). In the case >> of one driver, it will hex encode the data and can confuse the size >> handling in the get_col handler. >> >> I've thought about overriding the LOB semantics for quick fixes, but >> this isn't the right solution, as a LOB and binary data are orthogonal; >> i.e. CLOBs are LOB strings and VARBINARY doesn't have LOB semantics. A >> binary type (or modifier, i.e. like intl/natl, not to bikeshed tho) can >> also be used w/ string columns in the database to possibly override i.e. >> automatic charset encoding changes from an ODBC driver. >> >> I had previously made an issue and PR (links below), but I'm discussing >> on internals to revitalize the conversation after being motivated by >> recent issues. I'd like to hear from users, database extn. developers, >> and userland database library extension developers if this is the right >> approach, and if I should move forward dusting off the PR and probably >> writing an RFC. Said PR includes the changes needed for DBLIB, ODBC, and >> SQLite driver wise, as well as some tests. MySQL/Postgres/Firebird >> support would need to be added. >> >> ~calvinb >> >> [issue]: https://github.com/php/php-src/issues/11462 >> [pr]: https://github.com/php/php-src/pull/11674 > > Sorry for the late reply, > > I think this makes a lot of sense and would be in favour of including this in PDO. > > Best regards, > > Gina P. Banyard -- Matteo Beccati Development & Consulting - http://www.beccati.com/ -- Matteo Beccati Development & Consulting - http://www.beccati.com/