• unknown's avatar
    BUG#17591: Updatable view not possible with trigger or stored function · 7a5a2544
    unknown authored
    When a view was used inside a trigger or a function, lock type for
    tables used in a view was always set to READ (thus making the view
    non-updatable), even if we were trying to update the view.
    
    The solution is to set lock type properly.
    
    
    mysql-test/r/view.result:
      Add result for bug#17591: Updatable view not possible with trigger
      or stored function.
    mysql-test/t/view.test:
      Add test case for bug#17591: Updatable view not possible with trigger
      or stored function.
    sql/sql_view.cc:
      Move the code that sets requested lock type before the point where
      we exit from mysql_make_view() when we process a placeholder for
      prelocked table.
    7a5a2544
sql_view.cc 50.2 KB