Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121813 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21572 invoked from network); 27 Nov 2023 08:58:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Nov 2023 08:58:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4AA418004D for ; Mon, 27 Nov 2023 00:59:02 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 27 Nov 2023 00:59:02 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 364065C0046; Mon, 27 Nov 2023 03:58:54 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 27 Nov 2023 03:58:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beccati.com; h= 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:sender:subject:subject:to:to; s=fm2; t= 1701075534; x=1701161934; bh=D6NMtFdz4Rj7K3kTsvbbaE2fl4FqamLN6k0 pjWkLjMM=; b=kUJAKOH/5TWcfghh984PRCXNFlsMmc9LYgCpV87XRrG+PT37me4 0hs7Rk7tAmHxr62fAdelPZztApGEqBhDQRvRQqP0qUsNltORnvWRhpkMiCLJkki2 fZzWOSF38V+8Th6xZG5ftd/uCebdULTJUIJ4TZMhGJvmX0/ikBQ1PJ9z4jl/nwXj NyMrHarUAn9/tqpWZ3gEPUbf7dK8G83Uh36yNyS/4nc+S3Y8Kq2HILvMAi7wyLQA 3tWYLh0eBEawQbTEqcQUbB6o3W0TtEtlS8eDYDr1XZD84Rmtab8L8hJH2npwUswQ jiMZHrxu4hVNyG/WwhiR+k3UKVqp31CZdlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701075534; x= 1701161934; bh=D6NMtFdz4Rj7K3kTsvbbaE2fl4FqamLN6k0pjWkLjMM=; b=A R1bg4pggxXLXRo0naxUYLTVzjB/+kLc6NcR80whrf2Ofz4OUuzraP2U+PvjAmZnI JFvN2k40drzmxP9gHAkcqBxbpu/psREgcUvZVCqRdD11uoVUAnmUBqBQCetG7IHc GiAJQdJkf5bSPL5GZiXvYkJoNF0TbUge2SuyExFPbXJtFy9u+SC9p2ZpwgeBWRL3 QvTJhUtCX/UMit9byWmpXVt2GzJRoNEwUkEqM2cX7pg9jlA7IIpSt0MEskP+enSx wBF6nQxXuF97LAMdCJq8zqS6WcIwvbmYIA3PrUWaQ03uofYdGbD1gE/wPGNksorH IB6N79sqKc/TmUg2RF0kQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeitddguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeforght thgvohcuuegvtggtrghtihcuoehmrghtthgvohessggvtggtrghtihdrtghomheqnecugg ftrfgrthhtvghrnheptdfhveeigfffiefhvefgjeevgefhgeegjefhjeegueethfekteei kedvheeftdejnecuffhomhgrihhnpegsvggttggrthhirdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrthhtvghosegsvggttggr thhirdgtohhm X-ME-Proxy: Feedback-ID: ie60946b7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Nov 2023 03:58:52 -0500 (EST) Message-ID: Date: Mon, 27 Nov 2023 09:58:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Saki Takamachi , PHP internals References: <17F3158B-EB1C-4546-A24D-F7DA957BA4B7@sakiot.com> Content-Language: it In-Reply-To: <17F3158B-EB1C-4546-A24D-F7DA957BA4B7@sakiot.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PDO] I want to unify the behavior when changing the autocommit mode setting while a transaction is open. From: matteo@beccati.com (Matteo Beccati) Hi Saki, Il 26/11/2023 03:30, Saki Takamachi ha scritto: > The behavior in this case varies depending on the DB driver and is not unified. MySQL, OCI, ODBC, and Firebird currently support PDO autocommit mode. > > - MySQL always sets the new mode regardless of the state of the transaction, resulting in an implicit commit. > - OCI does an explicit commit and sets the new autocommit mode. > - Firebird raises an error. > - ODBC does not implement this behavior in the first place (it is a bug) > > I believe that code that changes the autocommit mode with a transaction open is usually just forgetting to close the transaction. Therefore, in such cases, I would like to unify the behavior by generating an error like Firebird. > > I would appreciate any feedback on this proposal and whether this change requires an RFC. PDO's main goal was to make building db drivers easier, and it's not meant to be a full DB abstraction layer. As such, it is not expected that all databases behave the same, especially for exotic functionality, such as autocommit. My 2c Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/