My Project
|
00001 #ifndef SQL_VIEW_INCLUDED 00002 #define SQL_VIEW_INCLUDED 00003 00004 /* -*- C++ -*- */ 00005 /* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; version 2 of the License. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software Foundation, 00018 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 00019 00020 #include "sql_class.h" /* Required by sql_lex.h */ 00021 #include "sql_lex.h" /* enum_view_create_mode, enum_drop_mode */ 00022 00023 /* Forward declarations */ 00024 00025 class File_parser; 00026 00027 00028 /* Function declarations */ 00029 00030 bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, 00031 enum_view_create_mode mode); 00032 00033 bool mysql_create_view(THD *thd, TABLE_LIST *view, 00034 enum_view_create_mode mode); 00035 00036 bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, 00037 bool open_view_no_parse); 00038 00039 bool mysql_drop_view(THD *thd, TABLE_LIST *view, enum_drop_mode drop_mode); 00040 00041 bool check_key_in_view(THD *thd, TABLE_LIST * view); 00042 00043 bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view); 00044 00045 int view_checksum(THD *thd, TABLE_LIST *view); 00046 00047 extern TYPELIB updatable_views_with_limit_typelib; 00048 00049 bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names); 00050 bool mysql_rename_view(THD *thd, const char *new_db, const char *new_name, 00051 TABLE_LIST *view); 00052 00053 #define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL) 00054 00055 extern const LEX_STRING view_type; 00056 00057 #endif /* SQL_VIEW_INCLUDED */