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

From: Date: Fri, 30 Jan 2015 11:37:08 +0000
Subject: Doc #68808 [Com]: Release savepoint states that it rolls back the transaction
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11902@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 Comment by: ghostaldev at gmail dot com 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: 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. Previous Comments: ------------------------------------------------------------------------ [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 (#11902) next »