Menu

#869 (ok 4.3) Run SQL query: Allow rollback for InnoDB tables

Next_release
fixed
1
2014-12-05
2006-01-31
jganders
No

When running a DML statement such as 'update' in the
SQL window it would be nice to see a checkbox that says
"Rollback updates/deletes when finished". This would be
directly next to or below the existing checkbox "Show
this query here again"

This way you could run an update SQL and see the
'affected rows' value without actually committing the
transaction. Seeing the 'affected rows' kinda
indicates the relative success or failure of your DML.

Of course, the ability to rollback or commit
transaction only applies to InnoDB type tables...

Discussion

  • Marc Delisle

    Marc Delisle - 2006-04-11
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2006-04-11

    Logged In: YES
    user_id=210714

    Not easy to implement: we have to check every table name in
    the query, some might be InnoDB and some not!
    If we don't do that and offer the "rollback" checkbox, we
    cannot garantee a rollback will occur.

     
  • Marc Delisle

    Marc Delisle - 2006-11-19
    • assigned_to: lem9 --> nobody
     
  • Marc Delisle

    Marc Delisle - 2006-11-19

    Logged In: YES
    user_id=210714
    Originator: NO

    Suggested by jganders:
    You'd have get the table name string from the sql, then
    explode the string by commas. Foreach element you'd have to
    lookup the table type, and you're almost there; allow the
    rollback option when all tables are InnoDB!
    Update and delete ops can have multiple tables, inserts can not.
    I dont know if this helps.

     
  • Marc Delisle

    Marc Delisle - 2013-12-05
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-12-05
    • labels: Data insertion/extraction/manipulation --> Data insertion/extraction/manipulation, GSOC 2014
     
  • Ashutosh Dhundhara

    Hello Marc,
    under Simulation of DML Queries, do we only need to get the affected rows and tables and their count ?
    Or
    also get some other things like foreign key dependencies that will be violated ?

     
  • Marc Delisle

    Marc Delisle - 2014-03-18

    Well, the more information about the update that the user receives, the better.

     
  • Ashutosh Dhundhara

    Hi Marc,
    do we need to implement this feature only for DML queries?

     
  • Marc Delisle

    Marc Delisle - 2014-06-19

    Hi Ashutosh,
    It would be also useful for DDL.

     
  • Ashutosh Dhundhara

    Hi Marc,
    I was looking in MySQL documentation and found [1]. I observed that most of DDL statements cause an 'implicit' commit and can't be rolled back. So I think this feature will work best with DML.

    [1] : http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html

     

    Last edit: Ashutosh Dhundhara 2014-06-20
  • Marc Delisle

    Marc Delisle - 2014-06-20

    Hi Ashutosh,
    I agree with your suggestion.

     
  • Marc Delisle

    Marc Delisle - 2014-06-22
    • summary: Run SQL query: Allow rollback for InnoDB tables --> (ok 4.3) Run SQL query: Allow rollback for InnoDB tables
    • status: open --> resolved
    • Group: Needs_decision --> Next_release
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-12-05
    • Status: resolved --> fixed