From 7f10ea430ce2be4c4708dbdf949cd4a1058bcd3d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Nov 2005 06:17:38 +0200 Subject: [PATCH] Clear variable mysql-test/r/view_grant.result: Drop things that may be left from old runs mysql-test/t/view_grant.test: Drop things that may be left from old runs --- mysql-test/r/view_grant.result | 2 ++ mysql-test/t/view_grant.test | 6 ++++++ sql/sql_view.cc | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index e2ee02351d7..cb1ac88ea8e 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -1,3 +1,5 @@ +drop database if exists mysqltest; +drop view if exists v1; grant create view on test.* to test@localhost; show grants for test@localhost; Grants for test@localhost diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index 04d6d2f323b..559b5247406 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -1,6 +1,12 @@ # Can't test with embedded server -- source include/not_embedded.inc +--disable_warnings +drop database if exists mysqltest; +drop view if exists v1; +--enable_warnings + + # simple test of grants grant create view on test.* to test@localhost; show grants for test@localhost; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index c3ce543da54..02bbe2bc3dc 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1175,7 +1175,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) for (view= views; view; view= view->next_local) { TABLE_SHARE *share; - bool type; + bool type= 0; strxnmov(path, FN_REFLEN-1, mysql_data_home, "/", view->db, "/", view->table_name, reg_ext, NullS); (void) unpack_filename(path, path);