Menu

#861 (ok 4.3) Simulate UPDATE queries

Next_release
fixed
1
2014-12-05
2006-01-20
Rik Meijer
No

A cool feature would be the possibility to simulate a
UPDATE query, often I have to run such a query on
important data (which I naturally backup first), but it
would spare a lot of time when the query could be
simulated.

An easy fix would be when I have a query like:
UPDATE `important_table` SET
`more_important_row`='newvalue' WHERE
`more_important_row`='oldvalue'

The simulation would be something like:
SELECT *, 'newvalue' as `more_important_row` FROM
`important_table` WHERE `more_important_row`='oldvalue'

As you can see the simulation is only to check the
WHERE part of the query, but may be there are other
uses for it?

Discussion

  • jganders

    jganders - 2006-01-31

    Logged In: YES
    user_id=1369576

    Also See request 1420869.
    For InnoDB tables you could issue a rollback after the
    update/delete, essentially voiding the transaction.

     
  • Marc Delisle

    Marc Delisle - 2013-12-05
    • assigned_to: Marc Delisle
    • Group: --> Needs_decision
     
  • Marc Delisle

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

    Aayush - 2014-03-15

    will this be something like rollback option in InnoDB for other tables where transactions (if user specifies) will be simulated first and a simulated output will be displayed. so if user commits that then only actual query will be passed to bring change.?
    in this way a rollback type property can be simulated in all tables, off course only for one transaction at a time.
    please comment if i am getting this right or not??

     
  • Marc Delisle

    Marc Delisle - 2014-03-16

    Aayush,
    you're right.

     
  • Marc Delisle

    Marc Delisle - 2014-06-07
    • summary: Simulate UPDATE queries --> (ok 4.3) Simulate UPDATE queries
    • status: open --> resolved
    • Group: Needs_decision --> Next_release
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-12-05
    • Status: resolved --> fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.