mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
a7e352b54d
This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
67 lines
2.3 KiB
C++
67 lines
2.3 KiB
C++
#ifndef SQL_VIEW_INCLUDED
|
|
#define SQL_VIEW_INCLUDED
|
|
|
|
/* -*- C++ -*- */
|
|
/* Copyright (c) 2004, 2010, Oracle and/or its affiliates.
|
|
Copyright (c) 2015, MariaDB
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; version 2 of the License.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include "sql_class.h" /* Required by sql_lex.h */
|
|
#include "sql_lex.h" /* enum_view_create_mode, enum_drop_mode */
|
|
|
|
/* Forward declarations */
|
|
|
|
class File_parser;
|
|
|
|
|
|
/* Function declarations */
|
|
|
|
bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
|
|
enum_view_create_mode mode);
|
|
|
|
bool mysql_create_view(THD *thd, TABLE_LIST *view,
|
|
enum_view_create_mode mode);
|
|
|
|
bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
|
|
bool open_view_no_parse);
|
|
|
|
|
|
bool mysql_drop_view(THD *thd, TABLE_LIST *view, enum_drop_mode drop_mode);
|
|
|
|
bool check_key_in_view(THD *thd, TABLE_LIST * view);
|
|
|
|
bool insert_view_fields(THD *thd, List<Item> *list, TABLE_LIST *view);
|
|
|
|
int view_checksum(THD *thd, TABLE_LIST *view);
|
|
int view_check(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt);
|
|
int view_repair(THD *thd, TABLE_LIST *view, HA_CHECK_OPT *check_opt);
|
|
|
|
extern TYPELIB updatable_views_with_limit_typelib;
|
|
|
|
bool check_duplicate_names(THD *thd, List<Item>& item_list,
|
|
bool gen_unique_view_names);
|
|
bool mysql_rename_view(THD *thd, const LEX_CSTRING *new_db, const LEX_CSTRING *new_name,
|
|
TABLE_LIST *view);
|
|
|
|
void make_valid_column_names(THD *thd, List<Item> &item_list);
|
|
|
|
#define VIEW_ANY_ACL (SELECT_ACL | UPDATE_ACL | INSERT_ACL | DELETE_ACL)
|
|
|
|
extern const LEX_CSTRING view_type;
|
|
|
|
void make_valid_column_names(List<Item> &item_list);
|
|
|
|
#endif /* SQL_VIEW_INCLUDED */
|