• Dmitry Lenev's avatar
    Patch that addresses bug #53976 "ALTER TABLE RENAME · a81da06f
    Dmitry Lenev authored
    is allowed on views (not documented, broken)".
    
    Remove support of ALTER TABLE RENAME for views as:
    a) this feature was not documented,
    c) does not add any compatibility with other databases,
    b) its implementation doesn't follow metadata locking
       protocol by accessing .FRM without holding any
       metadata lock,
    c) its implementation complicates ALTER TABLE's code
       by introducing  yet another separate branch to it.
    
    After this patch one can rename a view by using the
    documented way - RENAME TABLE statement.
    
    mysql-test/r/rename.result:
      Adjusted existing test case for bug #14959 "ALTER TABLE isn't
      able to rename a view" after fixing bug #53976: "ALTER TABLE
      RENAME is allowed on views (not documented, broken)".
    mysql-test/r/view.result:
      Adjusted test case after removing support for renaming
      of views through ALTER TABLE ... RENAME.
    mysql-test/t/rename.test:
      Adjusted existing test case for bug #14959 "ALTER TABLE isn't
      able to rename a view" after fixing bug #53976: "ALTER TABLE
      RENAME is allowed on views (not documented, broken)".
    mysql-test/t/view.test:
      Adjusted test case after removing support for renaming
      of views through ALTER TABLE ... RENAME.
    sql/sql_table.cc:
      Removed support for ALTER TABLE ... RENAME for views.
      This feature was not properly documented and its
      implementation was not following metadata locking
      protocol.
    a81da06f
rename.result 1.57 KB