Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130656 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 69A481A00BC for ; Thu, 16 Apr 2026 00:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1776299043; bh=RFIMRbskYvUJU0kLo77LvquEHMUgLZnmIMQBM8TpYrk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=CVZNaZnFekK1CsShtHg9zSW+3TkE9if8lIxHD5FTdT9cPGXOkYjuLagQCHKcB847H dHgcSTC8RtsySiCOhmjlbYg3KOWj/8qqpBpclZzd10viKqZI0TfS5tz362Dy88fIJs ocTMBQni5XNs7sqIksLaftlrLzOhU9vzKhQmcC8uiFV8oRHJVR659nIh9Dt16qXBbk Y5Z5YGvAyhRlHpiTOgcMxfjpYHv5lBrvjkHKCkiGcniqkx+WHS3o81R7x3kVxd45zj N5yrr6c//hfkeIjfGHCTExni4iC9tH2H7u6kVi7LeV5COeMM0mRjxKRg13ZTofzhNZ BU2Hb1iPSAWJw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5B199180050 for ; Thu, 16 Apr 2026 00:24:01 +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=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from franklin.smtp.mailx.hosts.net.nz (franklin.smtp.mailx.hosts.net.nz [43.245.52.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 16 Apr 2026 00:24:00 +0000 (UTC) Received: from 122-57-27-239-adsl.sparkbb.co.nz ([122.57.27.239] helo=[192.168.1.68]) by franklin.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1wDAWM-00HXen-1N for internals@lists.php.net; Thu, 16 Apr 2026 12:23:50 +1200 Message-ID: <9c129841-9ec5-48e5-b6a1-b2589acdd04d@varteg.nz> Date: Thu, 16 Apr 2026 12:23:38 +1200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC][Discussion] Add MariaDB-specific features to mysqlnd and mysqli To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Hosts-DKIM-Check: none From: Weedpacket@varteg.nz (Morgan) On 2026-04-16 01:39, Georg Richter wrote: > > If mysqli were to automatically inject START TRANSACTION and COMMIT, it > could unexpectedly commit a user's existing work or interfere with their > manual transaction logic. > Couldn't a SAVEPOINT command be injected instead, with a RELEASE SAVEPOINT on success and ROLLBACK TO SAVEPOINT on error? Of course now the driver has to be aware of any current transaction to know it's to use savepoints instead of a whole transaction... > Furthermore, an 'automatic' transaction would > be a false promise on engines like MyISAM, where BEGIN and COMMIT are > simply ignored, still resulting in partial inserts. > At which point the recommendation to users to wrap bulk executions in such commands is ineffective anyway. But if they're using a nontransactional engine they should already be aware of these pitfalls.