[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-bugs
Subject:    [DOC-BUGS] Doc #68808 [Com]: Release savepoint states that it rolls back the transaction
From:       "ghostaldev at gmail dot com" <php-bugs () lists ! php ! net>
Date:       2015-01-30 11:37:08
Message-ID: 201501301137.t0UBb8cc006819 () sgrv20 ! php ! net
[Download RAW message or body]

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

-- 
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic