1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
This commit is contained in:
unknown
2004-11-21 20:08:12 +02:00
52 changed files with 1333 additions and 306 deletions

View File

@ -274,6 +274,11 @@ typedef struct st_schema_table
struct st_lex;
class select_union;
struct Field_translator
{
Item *item;
const char *name;
};
typedef struct st_table_list
{
@ -308,11 +313,13 @@ typedef struct st_table_list
/* link to select_lex where this table was used */
st_select_lex *select_lex;
st_lex *view; /* link on VIEW lex for merging */
Item **field_translation; /* array of VIEW fields */
Field_translator *field_translation; /* array of VIEW fields */
/* ancestor of this table (VIEW merge algorithm) */
st_table_list *ancestor;
/* most upper view this table belongs to */
st_table_list *belong_to_view;
/* list of join table tree leaves */
st_table_list *next_leaf;
Item *where; /* VIEW WHERE clause condition */
Item *check_option; /* WITH CHECK OPTION condition */
LEX_STRING query; /* text of (CRETE/SELECT) statement */
@ -332,6 +339,7 @@ typedef struct st_table_list
*/
uint8 effective_with_check;
uint effective_algorithm; /* which algorithm was really used */
uint privilege_backup; /* place for saving privileges */
GRANT_INFO grant;
thr_lock_type lock_type;
uint outer_join; /* Which join type */
@ -366,6 +374,11 @@ typedef struct st_table_list
void cleanup_items();
bool placeholder() {return derived || view; }
void print(THD *thd, String *str);
void save_and_clear_want_privilege();
void restore_want_privilege();
bool check_single_table(st_table_list **table, table_map map);
bool set_insert_values(MEM_ROOT *mem_root);
void clear_insert_values();
} TABLE_LIST;
class Item;
@ -400,14 +413,14 @@ public:
class Field_iterator_view: public Field_iterator
{
Item **ptr, **array_end;
Field_translator *ptr, *array_end;
public:
Field_iterator_view() :ptr(0), array_end(0) {}
void set(TABLE_LIST *table);
void next() { ptr++; }
bool end_of_fields() { return ptr == array_end; }
const char *name();
Item *item(THD *thd) { return *ptr; }
Item *item(THD *thd) { return ptr->item; }
Field *field() { return 0; }
};