659
661
uint64_t setup_tables_done_option);
660
662
void free_underlaid_joins(Session *session, Select_Lex *select);
662
bool handle_derived(LEX *lex, bool (*processor)(Session *session,
664
bool mysql_handle_derived(LEX *lex, bool (*processor)(Session *session,
664
666
TableList *table));
665
bool derived_prepare(Session *session, LEX *lex, TableList *t);
666
bool derived_filling(Session *session, LEX *lex, TableList *t);
667
bool mysql_derived_prepare(Session *session, LEX *lex, TableList *t);
668
bool mysql_derived_filling(Session *session, LEX *lex, TableList *t);
667
669
int prepare_create_field(CreateField *sql_field,
668
670
uint32_t *blob_columns,
669
671
int *timestamps, int *timestamps_with_niladic);
671
bool create_table(Session *session,
672
const identifier::Table &identifier,
673
HA_CREATE_INFO *create_info,
674
message::Table &table_proto,
675
AlterInfo *alter_info,
676
bool tmp_table, uint32_t select_field_count,
677
bool is_if_not_exists);
679
bool create_table_no_lock(Session *session,
680
const identifier::Table &identifier,
681
HA_CREATE_INFO *create_info,
682
message::Table &table_proto,
683
AlterInfo *alter_info,
684
bool tmp_table, uint32_t select_field_count,
685
bool is_if_not_exists);
687
bool create_like_table(Session* session,
688
identifier::Table::const_reference destination_identifier,
689
identifier::Table::const_reference source_identifier,
690
message::Table &create_table_proto,
691
bool is_if_not_exists,
694
bool rename_table(Session &session,
673
bool mysql_create_table(Session *session,
674
TableIdentifier &identifier,
675
HA_CREATE_INFO *create_info,
676
message::Table &table_proto,
677
AlterInfo *alter_info,
678
bool tmp_table, uint32_t select_field_count,
679
bool is_if_not_exists);
681
bool mysql_create_table_no_lock(Session *session,
682
TableIdentifier &identifier,
683
HA_CREATE_INFO *create_info,
684
message::Table &table_proto,
685
AlterInfo *alter_info,
686
bool tmp_table, uint32_t select_field_count,
687
bool is_if_not_exists);
689
bool mysql_create_like_table(Session* session,
690
TableIdentifier &destination_identifier,
691
TableList* table, TableList* src_table,
692
message::Table &create_table_proto,
693
bool is_if_not_exists,
696
bool mysql_rename_table(Session &session,
695
697
plugin::StorageEngine *base,
696
const identifier::Table &old_identifier,
697
const identifier::Table &new_identifier);
698
TableIdentifier &old_identifier,
699
TableIdentifier &new_identifier);
699
bool prepare_update(Session *session, TableList *table_list,
700
Item **conds, uint32_t order_num, Order *order);
701
int update_query(Session *session,TableList *tables,List<Item> &fields,
701
bool mysql_prepare_update(Session *session, TableList *table_list,
702
Item **conds, uint32_t order_num, order_st *order);
703
int mysql_update(Session *session,TableList *tables,List<Item> &fields,
702
704
List<Item> &values,COND *conds,
703
uint32_t order_num, Order *order, ha_rows limit,
705
uint32_t order_num, order_st *order, ha_rows limit,
704
706
enum enum_duplicates handle_duplicates, bool ignore);
705
bool prepare_insert(Session *session, TableList *table_list, Table *table,
707
bool mysql_prepare_insert(Session *session, TableList *table_list, Table *table,
706
708
List<Item> &fields, List_item *values,
707
709
List<Item> &update_fields,
708
710
List<Item> &update_values, enum_duplicates duplic,
709
711
COND **where, bool select_insert,
710
712
bool check_fields, bool abort_on_warning);
711
bool insert_query(Session *session,TableList *table,List<Item> &fields,
713
bool mysql_insert(Session *session,TableList *table,List<Item> &fields,
712
714
List<List_item> &values, List<Item> &update_fields,
713
715
List<Item> &update_values, enum_duplicates flag,
715
717
int check_that_all_fields_are_given_values(Session *session, Table *entry,
716
718
TableList *table_list);
717
int prepare_delete(Session *session, TableList *table_list, Item **conds);
718
bool delete_query(Session *session, TableList *table_list, COND *conds,
719
int mysql_prepare_delete(Session *session, TableList *table_list, Item **conds);
720
bool mysql_delete(Session *session, TableList *table_list, COND *conds,
719
721
SQL_LIST *order, ha_rows rows, uint64_t options,
720
722
bool reset_auto_increment);
721
bool truncate(Session& session, TableList *table_list);
723
bool mysql_truncate(Session& session, TableList *table_list);
722
724
TableShare *get_table_share(Session *session, TableList *table_list, char *key,
723
725
uint32_t key_length, uint32_t db_flags, int *error);
724
726
TableShare *get_cached_table_share(const char *db, const char *table_name);