php / doc-en

English PHP documentation
482 stars 720 forks source link

mysqli::rollback() & mysqli::commit() $name param #1588

Open bkdotcom opened 2 years ago

bkdotcom commented 2 years ago

So...

kamil-tekiela commented 2 years ago

Relevant: https://wiki.php.net/rfc/improve_mysqli#the_never-finished_features

Although I was never able to figure out how it works or even if it works, it doesn't necessarily mean that it's completely broken.

bkdotcom commented 2 years ago

@kamil-tekiela interesting...

mysqli::savepoint and mysqli::release_savepoint()

indeed they just seem to abstract simple queries

I turned on mysql statement logging and this is what I got

Query   START TRANSACTION
Query   INSERT INTO `bob` (`t`) VALUES ("test 1")
Query   SAVEPOINT `foo`
Query   INSERT INTO `bob` (`t`) VALUES ("test 2")
Query   RELEASE SAVEPOINT `foo`
Query   ROLLBACK /*foo*/
Query   COMMIT /*comment*/
cmb69 commented 2 years ago

See also https://github.com/php/php-src/issues/7818.