Commit f6280284 authored by unknown's avatar unknown
Browse files

view.test, view.result:

  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.


sql/sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.
mysql-test/r/view.result:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
mysql-test/t/view.test:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
parent 51f8821a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1945,6 +1945,11 @@ ALTER VIEW v1 AS SELECT s1 AS s1, s2 AS s2 FROM t1;
CALL p1();
s1	s2
1	2
DROP VIEW v1;
CREATE VIEW v1 AS SELECT s2 AS s1, s1 AS s2 FROM t1;
CALL p1();
s1	s2
2	1
DROP PROCEDURE p1;
DROP VIEW v1;
DROP TABLE t1;
+3 −0
Original line number Diff line number Diff line
@@ -1784,6 +1784,9 @@ CREATE PROCEDURE p1 () SELECT * FROM v1;
CALL p1();
ALTER VIEW v1 AS SELECT s1 AS s1, s2 AS s2 FROM t1;
CALL p1();
DROP VIEW v1;
CREATE VIEW v1 AS SELECT s2 AS s1, s1 AS s2 FROM t1;
CALL p1();

DROP PROCEDURE p1;
DROP VIEW v1;
+1 −0
Original line number Diff line number Diff line
@@ -1004,6 +1004,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
    if (my_delete(path, MYF(MY_WME)))
      goto err;
    query_cache_invalidate3(thd, view, 0);
    sp_cache_invalidate();
    VOID(pthread_mutex_unlock(&LOCK_open));
  }
  send_ok(thd);