Doc #68808 [Opn]: Release savepoint states that it rolls back the transaction

From: Date: Thu, 19 Mar 2015 20:41:18 +0000
Subject: Doc #68808 [Opn]: Release savepoint states that it rolls back the transaction
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12013@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68808&edit=1 ID: 68808 Updated by: cmb@php.net Reported by: jesper at prisjakt dot nu Summary: Release savepoint states that it rolls back the transaction Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I have submitted a respective patch via PHDOE. > It's interesting too that there appears to be no function to > ACTUALLY rollback to a given savepoint. Feel free to file a respective feature request. :) Previous Comments: ------------------------------------------------------------------------ [2015-01-30 11:37:08] ghostaldev at gmail dot com Here is a test to confirm. The table ends up as: apple potato orange "pomegranate" is missing, because it has been rolled back, but potato is included, because release_savepoint() actually has the effect of "forgetting" that savepoint, but NOT rolling back the work. $db->begin_transaction(); $db->query('INSERT INTO utility_belt SET item="apple"'); $db->savepoint('vegetables'); $db->query('INSERT INTO utility_belt SET item="potato"'); $db->release_savepoint('vegetables'); $db->savepoint('nope'); $db->query('INSERT INTO utility_belt SET item="pomegranate"'); $db->query('ROLLBACK TO nope'); // No rollback to savepoint function..? $db->query('INSERT INTO utility_belt SET item="orange"'); $db->commit(); It's interesting too that there appears to be no function to ACTUALLY rollback to a given savepoint. ------------------------------------------------------------------------ [2015-01-12 10:18:55] jesper at prisjakt dot nu Description: ------------ --- From manual page: http://www.php.net/mysqli.release-savepoint --- The documentation states: mysqli::release_savepoint -- mysqli_release_savepoint — Rolls back a transaction to the named savepoint However, this is not what RELEASE SAVEPOINT does (http://dev.mysql.com/doc/refman/5.0/en/savepoint.html) (and a quick test verifies that this function does not roll back either) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68808&edit=1

« previous php.doc.bugs (#12013) next »