|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-01-12 10:18 UTC] 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) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
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.