37
37
void set_item_name(Item *item,char *pos,uint32_t length);
38
38
bool add_field_to_list(Session *session, LEX_STRING *field_name, enum enum_field_types type,
39
char *length, char *decimal,
40
uint32_t type_modifier,
41
enum column_format_type column_format,
42
Item *default_value, Item *on_update_value,
44
char *change, List<String> *interval_list,
45
const CHARSET_INFO * const cs);
39
char *length, char *decimal,
40
uint32_t type_modifier,
41
enum column_format_type column_format,
42
Item *default_value, Item *on_update_value,
44
char *change, List<String> *interval_list,
45
const CHARSET_INFO * const cs);
46
46
CreateField * new_create_field(Session *session, char *field_name, enum_field_types type,
47
char *length, char *decimals,
48
uint32_t type_modifier,
49
Item *default_value, Item *on_update_value,
50
LEX_STRING *comment, char *change,
51
List<String> *interval_list, CHARSET_INFO *cs);
47
char *length, char *decimals,
48
uint32_t type_modifier,
49
Item *default_value, Item *on_update_value,
50
LEX_STRING *comment, char *change,
51
List<String> *interval_list, CHARSET_INFO *cs);
52
52
void store_position_for_column(const char *name);
53
bool add_to_list(Session *session, SQL_LIST &list,Item *group,bool asc);
54
53
bool push_new_name_resolution_context(Session *session,
55
54
TableList *left_op,
56
55
TableList *right_op);
57
56
void add_join_on(TableList *b,Item *expr);
58
57
void add_join_natural(TableList *a,TableList *b,List<String> *using_fields,
60
void unlink_open_table(Session *session, Table *find);
61
void drop_open_table(Session *session, Table *table, const char *db_name,
62
const char *table_name);
64
60
SQL_SELECT *make_select(Table *head, table_map const_tables,
65
61
table_map read_tables, COND *conds,
101
97
bool get_key_map_from_key_list(key_map *map, Table *table,
102
98
List<String> *index_list);
103
99
bool insert_fields(Session *session, Name_resolution_context *context,
104
const char *db_name, const char *table_name,
100
const char *db_name, const char *table_name,
105
101
List_iterator<Item> *it, bool any_privileges);
106
102
bool setup_tables(Session *session, Name_resolution_context *context,
107
103
List<TableList> *from_clause, TableList *tables,
132
128
int setup_conds(Session *session, TableList *leaves, COND **conds);
133
int setup_ftfuncs(Select_Lex* select);
134
int init_ftfuncs(Session *session, Select_Lex* select, bool no_order);
135
void wait_for_condition(Session *session, pthread_mutex_t *mutex,
136
pthread_cond_t *cond);
137
int open_tables_from_list(Session *session, TableList **tables, uint32_t *counter, uint32_t flags);
138
129
/* open_and_lock_tables with optional derived handling */
139
int open_and_lock_tables_derived(Session *session, TableList *tables, bool derived);
140
bool open_normal_and_derived_tables(Session *session, TableList *tables, uint32_t flags);
141
int lock_tables(Session *session, TableList *tables, uint32_t counter, bool *need_reopen);
142
int decide_logging_format(Session *session);
143
Table *open_temporary_table(Session *session, const char *path, const char *db,
144
const char *table_name, bool link_in_list,
145
open_table_mode open_mode);
146
bool rm_temporary_table(StorageEngine *base, char *path);
147
void free_io_cache(Table *entry);
148
void intern_close_table(Table *entry);
149
void close_temporary_tables(Session *session);
150
void close_tables_for_reopen(Session *session, TableList **tables);
151
130
TableList *find_table_in_list(TableList *table,
152
131
TableList *TableList::*link,
153
132
const char *db_name,
154
133
const char *table_name);
155
134
TableList *unique_table(Session *session, TableList *table, TableList *table_list,
156
135
bool check_alias);
157
Table *find_temporary_table(Session *session, const char *db, const char *table_name);
158
Table *find_temporary_table(Session *session, TableList *table_list);
159
int drop_temporary_table(Session *session, TableList *table_list);
160
void close_temporary_table(Session *session, Table *table, bool free_share,
162
void close_temporary(Table *table, bool free_share, bool delete_table);
163
bool rename_temporary_table(Table *table, const char *new_db, const char *table_name);
164
136
void remove_db_from_cache(const char *db);
165
137
bool is_equal(const LEX_STRING *a, const LEX_STRING *b);
183
155
#define WFRM_PACK_FRM 4
184
156
#define WFRM_KEEP_SHARE 8
186
bool close_cached_tables(Session *session, TableList *tables,
187
bool wait_for_refresh, bool wait_for_placeholders);
188
void copy_field_from_tmp_record(Field *field,int offset);
189
bool fill_record(Session * session, List<Item> &fields, List<Item> &values, bool ignore_errors);
158
bool fill_record(Session* session, List<Item> &fields, List<Item> &values, bool ignore_errors);
190
159
bool fill_record(Session *session, Field **field, List<Item> &values, bool ignore_errors);
191
160
bool list_open_tables(const char *db, const char *wild, bool(*func)(Table *table, open_table_list_st& open_list), Table *display);