Comments (4)
mysqli::savepoint
and mysqli::release_savepoint
are pretty useless without mysqli::rollback_to
, so deprecate former 2 or add rollback_to
. And the reason to add rollback_to
is to have exactly the same escaping/handling of the $name
. This is like adding array_push
without array_pop
.
$name
parameter in begin_transaction
/commit
/rollback
is a separate issue, and as I've mentioned: deprecate that and see if anybody will notice.
from php-src.
existing rollback with $name is doing nothing (only adding comment)
I wonder why that is only a comment. Wasn't ROLLBACK TO
available on all supported servers when that had been implemented?
Anyhow, I think it makes sense to introduce this functionality; not sure about the details. It might be considered to re-purpose mysqli::rollback()
for this.
from php-src.
I have no idea why this is implemented as a comment, maybe for debugging or to be similar to other api or maybe named transactions were planed at the time. Though I wasn't able to find anything similar being used in the wild. Also seems like ROLLBACK TO
was available at that time, but there is distinction to mention:
ROLLBACK
and ROLLBACK TO
are in fact different statements - the first one is reverting whole transaction, the second one is only reverting to the named savepoint. ROLLBACK
have options [NO] CHAIN
and [NO] RELEASE
($flag
argument) which ROLLBACK TO
does not. It's probably better to keep them as separate functions.
Edit: if nobody knows what is the purpose of that comment maybe it's better to deprecate $name
in begin_transaction
/commit
/rollback
. In the worst case, somebody will tell us what this was for, after seeing deprecation warning 😏
from php-src.
I wouldn't support adding a new function that abstracts a very simple SQL command. There's no reason to do it in standard mysqli/mysqlnd. The only reason why we even have transaction-related methods in mysqli is because of this plugin: https://php-legacy-docs.zend.com/manual/php4/en/book.mysqlnd-ms I doubt anyone is actively using or maintaining this plugin, so we can't even ask them if such function would be useful to them. I don't have any other justification for adding this function.
Regarding deprecation, I wouldn't mind that, but a similar problem arises here. Do we know of any plugins actually using this param? PHP doesn't seem to use it nor does mysqlnd out of the box. Have any mysqlnd plugins ever made any use of it?
from php-src.
Related Issues (20)
- heap-buffer-overflow with opcache when extending an internal class with class constant having attributes HOT 1
- Add SO_LINGER option for streams HOT 1
- pcntl_fork children are utilizing just a single core on FreeBSD 13.3+ HOT 5
- Set declare(strict_types=1) as Default Behavior
- Segmentation fault on unknown address 0x0001ffff8041 with XML extension under certain memory limit HOT 2
- Unpacking via list() produces NULLs in foreach HOT 1
- Floating point bug in range operation on Apple Silicon hardware HOT 12
- Phar timestamp is 32-bit
- DateTime with Timezone have different timestamps for End of Year. Only on certain years and time zones HOT 4
- PHP-FPM requests are stuck and childs are killed after elapsing of the timeout HOT 3
- ¿Por qué cambia el resultado de un objeto date para la zona horaria America/Mexico_City entre las versiones 7 y 8 de PHP? HOT 2
- ccache in GitHub Actions is likely ineffective for master HOT 1
- ccache should not create caches for PRs HOT 3
- Missing visibility check for private abstract trait methods HOT 1
- Improve commit messages for upgrade notes HOT 5
- Maximum call stack size reached case triggers stack overflow from ASan HOT 1
- make error HOT 3
- Show decimal number instead of scientific notation in systemd status (health report notification)
- Add "JSON_TOLERANT" flag to json_decode HOT 2
- PHP version 8.2.18 breaks with error "Deprecated: Use of "static" in callables is deprecated" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-src.