You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.9 KiB

  1. #ifndef SQL_VIEW_INCLUDED
  2. #define SQL_VIEW_INCLUDED
  3. /* -*- C++ -*- */
  4. /* Copyright (C) 2004 MySQL AB
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; version 2 of the License.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. */
  16. #include "sql_class.h" /* Required by sql_lex.h */
  17. #include "sql_lex.h" /* enum_view_create_mode, enum_drop_mode */
  18. /* Forward declarations */
  19. class File_parser;
  20. /* Function declarations */
  21. bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
  22. enum_view_create_mode mode);
  23. bool mysql_create_view(THD *thd, TABLE_LIST *view,
  24. enum_view_create_mode mode);
  25. bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
  26. uint flags);
  27. bool mysql_drop_view(THD *thd, TABLE_LIST *view, enum_drop_mode drop_mode);
  28. bool check_key_in_view(THD *thd, TABLE_LIST * view);
  29. bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view);
  30. int view_checksum(THD *thd, TABLE_LIST *view);
  31. extern TYPELIB updatable_views_with_limit_typelib;
  32. bool check_duplicate_names(List<Item>& item_list, bool gen_unique_view_names);
  33. bool mysql_rename_view(THD *thd, const char *new_db, const char *new_name,
  34. TABLE_LIST *view);
  35. #define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL)
  36. extern const LEX_STRING view_type;
  37. #endif /* SQL_VIEW_INCLUDED */