php / php/doc-en

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

Open
#1,588 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Extension: mysqli
Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

So...

  • mysqli has a savepoint($name) method
    https://www.php.net/manual/en/mysqli.savepoint.php
    which creates a savepoint with specified name (SAVEPOINT `foo`)

  • mysqli has a rollback method with optional $name param
    https://www.php.net/manual/en/mysqli.rollback.php
    but the name param is effectively worthless.. rather than create a ROLLBACK TO :foo statement,(as anyone would reasonably expect), instead the method creates a ROLLBACK /foo/` statement (name simply in a comment).. psych!
    is there a @todo in the php code ?
    we have savepoint($name), and rollback(...$name) that doesn't seem to behave as expected

  • mysqli has a commit method with optional $name param
    https://www.php.net/manual/en/mysqli.commit.php
    what is the point?
    mysql doesn't have a "commit to name" or "commit since name" functionality
    like mysqli::rollback, this simply adds a comment to the query (COMMIT /*foo*/)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mysqli::savepoint(), mysqli::rollback(), and mysqli::commit() manual pages linked in the issue, then compare their descriptions with the reported SQL behavior. Check the PHP implementation or existing documentation context to determine what the optional name parameters mean; the documentation is done when their purpose and behavior are accurately explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.