Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#295 editing a view drops old view if syntax error

3.6.2
closed-fixed
Jakub Vrána
Common (150)
5
2013-01-31
2013-01-16
Anonymous
No

Editing a view drops old view if syntax error.

Droping old view and creating a new one should be an atomic operation.

Discussion

  • Jakub Vrána
    Jakub Vrána
    2013-01-31

    Thank you for the report, I've fixed it in Git. You can download the "Current development version" from http://www.adminer.org/#download

     
  • Jakub Vrána
    Jakub Vrána
    2013-01-31

    • status: open --> closed-fixed
     
  • Jakub Vrána
    Jakub Vrána
    2013-01-31

    • labels: 1629034 --> Common
     

  • Anonymous
    2013-05-02

    This is still broken in 3.6.4 as far as I'm concerned.
    http://screencloud.net/v/sLGd

    If I click alter view, it's empty.

     
  • Jakub Vrána
    Jakub Vrána
    2013-05-04

    Altering views in MySQL terminates transaction. Adminer tries to recreate the original view if creating the new one fails. If even the original view couldn't be created then there's not much to do.

    Another solution would be to try to create the new view before dropping the old one with some temporary name and if it passes then drop the temporary view, drop the old one and create the new one with the correct name.