Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.1
    • Component/s: OTHER
    • Labels:

      Description

      Code contribution, New BSD license.

      Missing functionality: implement ATOMIC support which should create an anonymous savepoint at start of block and rollback on failure. commit if AUTOCOMMIT or remove anonymous savepoint if already in transaction.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              colin Colin Charles added a comment -

              Was contributed upstream also http://bugs.mysql.com/bug.php?id=70948

              Show
              colin Colin Charles added a comment - Was contributed upstream also http://bugs.mysql.com/bug.php?id=70948
              Hide
              serg Sergei Golubchik added a comment - - edited

              Okay. This is more than simply BEGIN...END, as it also includes output placeholders for prepared statements (e.g. in PREPARE "SELECT...INTO ?"). Which looks like a cool, but different feature.

              And it's unfortunately less than I expected, as it only covers (and tests) BEGIN...END (and DECLARE), but not IF and loops.

              Antony T Curtis, what did you need this feature for, I mean, in that exactly scope?
              Do you want to work more on it, or you'd prefer if I take it as is and finalize it myself ?

              Show
              serg Sergei Golubchik added a comment - - edited Okay. This is more than simply BEGIN...END , as it also includes output placeholders for prepared statements (e.g. in PREPARE "SELECT...INTO ?" ). Which looks like a cool, but different feature. And it's unfortunately less than I expected, as it only covers (and tests) BEGIN...END (and DECLARE), but not IF and loops. Antony T Curtis , what did you need this feature for, I mean, in that exactly scope? Do you want to work more on it, or you'd prefer if I take it as is and finalize it myself ?
              Hide
              serg Sergei Golubchik added a comment -

              Ah, and there's also SET ? = expr syntax.
              Antony T Curtis — why did you do that? Any use cases?

              Show
              serg Sergei Golubchik added a comment - Ah, and there's also SET ? = expr syntax. Antony T Curtis — why did you do that? Any use cases?
              Hide
              serg Sergei Golubchik added a comment -

              I've now pushed a — significantly reworked — patch to github. Without SET ? = expr syntax, but with SELECT ... INTO ?. Without BEGIN ATOMIC (it wasn't atomic in the contributed patch either, in mine it is not accepted at all). And with support for IF, CASE, LOOP, REPEAT, WHILE.

              Show
              serg Sergei Golubchik added a comment - I've now pushed a — significantly reworked — patch to github. Without SET ? = expr syntax, but with SELECT ... INTO ? . Without BEGIN ATOMIC (it wasn't atomic in the contributed patch either, in mine it is not accepted at all). And with support for IF , CASE , LOOP , REPEAT , WHILE .
              Hide
              serg Sergei Golubchik added a comment -

              Elena Stepanova, could you please do some testing of this feature?

              Show
              serg Sergei Golubchik added a comment - Elena Stepanova , could you please do some testing of this feature?
              Hide
              elenst Elena Stepanova added a comment -

              Assorted notes

              New status variable: Com_compound_sql

              From http://dev.mysql.com/doc/refman/5.6/en/sql-syntax-compound-statements.html

              • RETURN does not work (expectedly)
              • (for outermost blocks) labels, ITERATE, LEAVE do not work
              Show
              elenst Elena Stepanova added a comment - Assorted notes New status variable: Com_compound_sql From http://dev.mysql.com/doc/refman/5.6/en/sql-syntax-compound-statements.html RETURN does not work (expectedly) (for outermost blocks) labels, ITERATE , LEAVE do not work
              Hide
              elenst Elena Stepanova added a comment -

              Ran some manual and automated tests, haven't got anything except for the issues listed in "Issue Links" section. Please push, and I will include new functionality in my general auto tests.

              Show
              elenst Elena Stepanova added a comment - Ran some manual and automated tests, haven't got anything except for the issues listed in "Issue Links" section. Please push, and I will include new functionality in my general auto tests.
              Hide
              sanja Oleksandr Byelkin added a comment -

              OK to push

              Show
              sanja Oleksandr Byelkin added a comment - OK to push

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  atcurtis Antony T Curtis
                • Votes:
                  3 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 2 weeks
                    2w
                    Remaining:
                    Time Spent - 3 days, 7 hours Remaining Estimate - 1 week, 1 day, 1 hour
                    1w 1d 1h
                    Logged:
                    Time Spent - 3 days, 7 hours Remaining Estimate - 1 week, 1 day, 1 hour
                    3d 7h