MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_view.h
1 #ifndef SQL_VIEW_INCLUDED
2 #define SQL_VIEW_INCLUDED
3 
4 /* -*- C++ -*- */
5 /* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; version 2 of the License.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software Foundation,
18  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
19 
20 #include "sql_class.h" /* Required by sql_lex.h */
21 #include "sql_lex.h" /* enum_view_create_mode, enum_drop_mode */
22 
23 /* Forward declarations */
24 
25 class File_parser;
26 
27 
28 /* Function declarations */
29 
30 bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
31  enum_view_create_mode mode);
32 
33 bool mysql_create_view(THD *thd, TABLE_LIST *view,
34  enum_view_create_mode mode);
35 
36 bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
37  bool open_view_no_parse);
38 
39 bool mysql_drop_view(THD *thd, TABLE_LIST *view, enum_drop_mode drop_mode);
40 
41 bool check_key_in_view(THD *thd, TABLE_LIST * view);
42 
43 bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view);
44 
45 int view_checksum(THD *thd, TABLE_LIST *view);
46 
47 extern TYPELIB updatable_views_with_limit_typelib;
48 
49 bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names);
50 bool mysql_rename_view(THD *thd, const char *new_db, const char *new_name,
51  TABLE_LIST *view);
52 
53 #define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL)
54 
55 extern const LEX_STRING view_type;
56 
57 #endif /* SQL_VIEW_INCLUDED */