#include <table.h>
Collaboration diagram for st_table:

Definition at line 294 of file table.h.
| st_table::st_table | ( | ) | [inline] |
| void st_table::clear_column_bitmaps | ( | void | ) |
Definition at line 3792 of file table.cc.
References st_bitmap::bitmap, bzero, st_table_share::column_bitmap_size, column_bitmaps_set(), def_read_set, def_write_set, and s.
03793 { 03794 /* 03795 Reset column read/write usage. It's identical to: 03796 bitmap_clear_all(&table->def_read_set); 03797 bitmap_clear_all(&table->def_write_set); 03798 */ 03799 bzero((char*) def_read_set.bitmap, s->column_bitmap_size*2); 03800 column_bitmaps_set(&def_read_set, &def_write_set); 03801 }
Here is the call graph for this function:

Definition at line 425 of file table.h.
References handler::column_bitmaps_signal(), file, read_set, and write_set.
Referenced by clear_column_bitmaps(), QUICK_RANGE_SELECT::init_ror_merged_scan(), mark_columns_used_by_index(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), handler::read_multi_range_first(), use_all_columns(), write_record(), and QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT().
00427 { 00428 read_set= read_set_arg; 00429 write_set= write_set_arg; 00430 if (file) 00431 file->column_bitmaps_signal(); 00432 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::default_column_bitmaps | ( | ) | [inline] |
Definition at line 443 of file table.h.
References def_read_set, def_write_set, read_set, and write_set.
Referenced by reopen_table(), restore_column_maps_after_mark_index(), and setup_tmp_table_column_bitmaps().
00444 { 00445 read_set= &def_read_set; 00446 write_set= &def_write_set; 00447 }
Here is the caller graph for this function:

Definition at line 2516 of file table.cc.
References FALSE, field, List< T >::push_back(), and TRUE.
Referenced by Materialized_cursor::open().
02517 { 02518 /* 02519 All Item_field's created using a direct pointer to a field 02520 are fixed in Item_field constructor. 02521 */ 02522 for (Field **ptr= field; *ptr; ptr++) 02523 { 02524 Item_field *item= new Item_field(*ptr); 02525 if (!item || item_list->push_back(item)) 02526 return TRUE; 02527 } 02528 return FALSE; 02529 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::mark_auto_increment_column | ( | void | ) |
Definition at line 3897 of file table.cc.
References bitmap_set_bit(), handler::column_bitmaps_signal(), DBUG_ASSERT, Field::field_index, file, found_next_number_field, mark_columns_used_by_index_no_reset(), st_table_share::next_number_index, st_table_share::next_number_key_offset, read_set, s, and write_set.
Referenced by mark_columns_needed_for_insert().
03898 { 03899 DBUG_ASSERT(found_next_number_field); 03900 /* 03901 We must set bit in read set as update_auto_increment() is using the 03902 store() to check overflow of auto_increment values 03903 */ 03904 bitmap_set_bit(read_set, found_next_number_field->field_index); 03905 bitmap_set_bit(write_set, found_next_number_field->field_index); 03906 if (s->next_number_key_offset) 03907 mark_columns_used_by_index_no_reset(s->next_number_index, read_set); 03908 file->column_bitmaps_signal(); 03909 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::mark_columns_needed_for_delete | ( | void | ) |
Definition at line 3930 of file table.cc.
References bitmap_set_bit(), handler::column_bitmaps_signal(), field, file, HA_PRIMARY_KEY_REQUIRED_FOR_DELETE, HA_REQUIRES_KEY_COLUMNS_FOR_DELETE, handler::ha_table_flags(), mark_columns_used_by_index_no_reset(), Table_triggers_list::mark_fields_used(), MAX_KEY, PART_KEY_FLAG, st_table_share::primary_key, read_set, s, TRG_EVENT_DELETE, triggers, and handler::use_hidden_primary_key().
Referenced by mysql_delete().
03931 { 03932 if (triggers) 03933 triggers->mark_fields_used(TRG_EVENT_DELETE); 03934 if (file->ha_table_flags() & HA_REQUIRES_KEY_COLUMNS_FOR_DELETE) 03935 { 03936 Field **reg_field; 03937 for (reg_field= field ; *reg_field ; reg_field++) 03938 { 03939 if ((*reg_field)->flags & PART_KEY_FLAG) 03940 bitmap_set_bit(read_set, (*reg_field)->field_index); 03941 } 03942 file->column_bitmaps_signal(); 03943 } 03944 if (file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) 03945 { 03946 /* 03947 If the handler has no cursor capabilites, we have to read either 03948 the primary key, the hidden primary key or all columns to be 03949 able to do an delete 03950 */ 03951 if (s->primary_key == MAX_KEY) 03952 file->use_hidden_primary_key(); 03953 else 03954 { 03955 mark_columns_used_by_index_no_reset(s->primary_key, read_set); 03956 file->column_bitmaps_signal(); 03957 } 03958 } 03959 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::mark_columns_needed_for_insert | ( | void | ) |
Definition at line 4023 of file table.cc.
References found_next_number_field, mark_auto_increment_column(), Table_triggers_list::mark_fields_used(), TRG_EVENT_INSERT, and triggers.
Referenced by mysql_insert(), and mysql_load().
04024 { 04025 if (triggers) 04026 { 04027 /* 04028 We don't need to mark columns which are used by ON DELETE and 04029 ON UPDATE triggers, which may be invoked in case of REPLACE or 04030 INSERT ... ON DUPLICATE KEY UPDATE, since before doing actual 04031 row replacement or update write_record() will mark all table 04032 fields as used. 04033 */ 04034 triggers->mark_fields_used(TRG_EVENT_INSERT); 04035 } 04036 if (found_next_number_field) 04037 mark_auto_increment_column(); 04038 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::mark_columns_needed_for_update | ( | void | ) |
Definition at line 3980 of file table.cc.
References bitmap_set_bit(), handler::column_bitmaps_signal(), DBUG_ENTER, DBUG_VOID_RETURN, field, file, HA_PRIMARY_KEY_REQUIRED_FOR_DELETE, HA_REQUIRES_KEY_COLUMNS_FOR_DELETE, handler::ha_table_flags(), Bitmap< 64 >::is_overlapping(), mark_columns_used_by_index_no_reset(), Table_triggers_list::mark_fields_used(), MAX_KEY, merge_keys, st_table_share::primary_key, read_set, s, TRG_EVENT_UPDATE, triggers, and handler::use_hidden_primary_key().
03981 { 03982 DBUG_ENTER("mark_columns_needed_for_update"); 03983 if (triggers) 03984 triggers->mark_fields_used(TRG_EVENT_UPDATE); 03985 if (file->ha_table_flags() & HA_REQUIRES_KEY_COLUMNS_FOR_DELETE) 03986 { 03987 /* Mark all used key columns for read */ 03988 Field **reg_field; 03989 for (reg_field= field ; *reg_field ; reg_field++) 03990 { 03991 /* Merge keys is all keys that had a column refered to in the query */ 03992 if (merge_keys.is_overlapping((*reg_field)->part_of_key)) 03993 bitmap_set_bit(read_set, (*reg_field)->field_index); 03994 } 03995 file->column_bitmaps_signal(); 03996 } 03997 if (file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) 03998 { 03999 /* 04000 If the handler has no cursor capabilites, we have to read either 04001 the primary key, the hidden primary key or all columns to be 04002 able to do an update 04003 */ 04004 if (s->primary_key == MAX_KEY) 04005 file->use_hidden_primary_key(); 04006 else 04007 { 04008 mark_columns_used_by_index_no_reset(s->primary_key, read_set); 04009 file->column_bitmaps_signal(); 04010 } 04011 } 04012 DBUG_VOID_RETURN; 04013 }
Here is the call graph for this function:

| void st_table::mark_columns_used_by_index | ( | uint | index | ) |
Definition at line 3838 of file table.cc.
References bitmap_clear_all, column_bitmaps_set(), DBUG_ENTER, DBUG_VOID_RETURN, handler::extra(), file, HA_EXTRA_KEYREAD, mark_columns_used_by_index_no_reset(), and tmp_set.
Referenced by QUICK_RANGE_SELECT::init_ror_merged_scan().
03839 { 03840 MY_BITMAP *bitmap= &tmp_set; 03841 DBUG_ENTER("st_table::mark_columns_used_by_index"); 03842 03843 (void) file->extra(HA_EXTRA_KEYREAD); 03844 bitmap_clear_all(bitmap); 03845 mark_columns_used_by_index_no_reset(index, bitmap); 03846 column_bitmaps_set(bitmap, bitmap); 03847 DBUG_VOID_RETURN; 03848 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3878 of file table.cc.
References bitmap_set_bit(), st_key_part_info::fieldnr, key_info, st_key::key_part, and st_key::key_parts.
Referenced by handler::get_auto_increment(), mark_auto_increment_column(), mark_columns_needed_for_delete(), mark_columns_needed_for_update(), mark_columns_used_by_index(), prepare_for_position(), and handler::read_multi_range_first().
03880 { 03881 KEY_PART_INFO *key_part= key_info[index].key_part; 03882 KEY_PART_INFO *key_part_end= (key_part + 03883 key_info[index].key_parts); 03884 for (;key_part != key_part_end; key_part++) 03885 bitmap_set_bit(bitmap, key_part->fieldnr-1); 03886 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void st_table::prepare_for_position | ( | void | ) |
Definition at line 3813 of file table.cc.
References handler::column_bitmaps_signal(), DBUG_ENTER, DBUG_VOID_RETURN, file, HA_PRIMARY_KEY_IN_READ_INDEX, handler::ha_table_flags(), mark_columns_used_by_index_no_reset(), MAX_KEY, st_table_share::primary_key, read_set, and s.
Referenced by QUICK_RANGE_SELECT::init_ror_merged_scan(), QUICK_INDEX_MERGE_SELECT::read_keys_and_merge(), and register_used_fields().
03814 { 03815 DBUG_ENTER("st_table::prepare_for_position"); 03816 03817 if ((file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) && 03818 s->primary_key < MAX_KEY) 03819 { 03820 mark_columns_used_by_index_no_reset(s->primary_key, read_set); 03821 /* signal change */ 03822 file->column_bitmaps_signal(); 03823 } 03824 DBUG_VOID_RETURN; 03825 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2546 of file table.cc.
References DBUG_ASSERT, and field.
02547 { 02548 List_iterator_fast<Item> it(*item_list); 02549 for (Field **ptr= field; *ptr; ptr++) 02550 { 02551 Item_field *item_field= (Item_field*) it++; 02552 DBUG_ASSERT(item_field != 0); 02553 item_field->reset_field(*ptr); 02554 } 02555 }
| void st_table::restore_column_maps_after_mark_index | ( | ) |
Definition at line 3862 of file table.cc.
References handler::column_bitmaps_signal(), DBUG_ENTER, DBUG_VOID_RETURN, default_column_bitmaps(), handler::extra(), file, HA_EXTRA_NO_KEYREAD, and key_read.
03863 { 03864 DBUG_ENTER("st_table::restore_column_maps_after_mark_index"); 03865 03866 key_read= 0; 03867 (void) file->extra(HA_EXTRA_NO_KEYREAD); 03868 default_column_bitmaps(); 03869 file->column_bitmaps_signal(); 03870 DBUG_VOID_RETURN; 03871 }
Here is the call graph for this function:

| void st_table::use_all_columns | ( | ) | [inline] |
Definition at line 439 of file table.h.
References st_table_share::all_set, column_bitmaps_set(), and s.
Referenced by create_myisam_from_heap(), db_show_routine_status(), get_schema_column_record(), grant_load(), handle_grant_table(), delayed_insert::handle_inserts(), my_tz_init(), mysql_alter_table(), mysql_checksum_table(), mysql_install_plugin(), mysql_uninstall_plugin(), mysqld_list_fields(), Events::open_event_table(), Log_to_csv_event_handler::open_log_table(), open_proc_table_for_read(), open_proc_table_for_update(), plugin_load(), ha_tina::repair(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), tz_load_from_open_tables(), update_user_table(), handler::use_hidden_primary_key(), and write_record().
00440 { 00441 column_bitmaps_set(&s->all_set, &s->all_set); 00442 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const char* st_table::alias |
Definition at line 323 of file table.h.
Referenced by add_not_null_conds(), ha_myisam::analyze(), ha_myisam::check(), check_lock_and_start_stmt(), create_table_from_items(), find_field_in_table(), Field::init(), sp_rcontext::init_var_table(), Field::make_field(), mysql_alter_table(), mysql_delete(), mysql_ha_flush_table(), mysql_prepare_update(), mysqld_show_create(), reopen_table(), reopen_tables(), ha_myisam::repair(), Table_triggers_list::set_table(), Item_func_sp::sp_result_field(), store_create_info(), table_check_intact(), and table_is_used().
Definition at line 402 of file table.h.
Referenced by mysql_schema_table(), and Item_field::set_field().
Definition at line 400 of file table.h.
Referenced by fill_record(), read_fixed_length(), read_sep_field(), set_field_to_null_with_conversions(), and handler::update_auto_increment().
| key_part_map st_table::const_key_parts[MAX_KEY] |
Definition at line 337 of file table.h.
Referenced by make_join_statistics(), and test_if_order_by_key().
Definition at line 391 of file table.h.
Referenced by join_read_const_table(), reopen_name_locked_table(), reopen_table(), test_if_ref(), Item_field::used_tables(), and Item_equal::val_int().
Definition at line 377 of file table.h.
Referenced by handle_delayed_insert(), sp_rcontext::init_var_table(), mysql_load(), Item_func_sp::sp_result_field(), and Field_blob::store().
Definition at line 373 of file table.h.
Referenced by ha_myisam::check(), close_handle_and_leave_table_as_lock(), close_old_data_files(), close_thread_table(), create_myisam_tmp_table(), drop_locked_tables(), handler::ha_open(), init_read_record(), QUICK_RANGE_SELECT::init_ror_merged_scan(), mysql_admin_table(), open_tmp_table(), remove_table_from_cache(), reopen_table(), reopen_tables(), and wait_while_table_is_used().
Definition at line 326 of file table.h.
Referenced by clear_column_bitmaps(), default_column_bitmaps(), handler::ha_reset(), and setup_tmp_table_column_bitmaps().
Definition at line 326 of file table.h.
Referenced by clear_column_bitmaps(), default_column_bitmaps(), handler::ha_reset(), and setup_tmp_table_column_bitmaps().
Definition at line 306 of file table.h.
Referenced by Item_sum_count_distinct::add(), Item_sum_distinct::add(), add_ref_to_table_cond(), calc_used_field_length(), Item_sum_distinct::calculate_val_and_count(), handler::check_old_types(), check_quick_keys(), check_view_insertability(), compare_record(), compare_tables(), composite_key_cmp(), copy_event_to_schema_table(), Table_triggers_list::create_trigger(), db_create_event(), db_create_routine(), db_drop_events_from_table(), db_find_routine(), db_find_routine_aux(), db_update_event(), ha_tina::encode_quote(), Field::eq(), events_table_index_read_for_db(), evex_db_find_event_by_name(), evex_fill_row(), filesort(), fill_item_list(), fill_open_tables(), ha_tina::find_current_row(), find_field_in_table(), find_field_in_table_sef(), find_key_for_maxmin(), Item_func_match::fix_fields(), get_access(), get_all_tables(), get_best_group_min_max(), delayed_insert::get_local_table(), get_referential_constraints_record(), ha_archive::get_row(), get_schema_column_record(), get_schema_key_column_usage_record(), get_schema_partitions_record(), get_schema_stat_record(), get_schema_tables_record(), get_schema_views_record(), GRANT_NAME::GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), handler::ha_check_for_upgrade(), handle_grant_table(), sp_rcontext::init_var_items(), iter_schema_engines(), Event_timed::load_from_row(), Log_to_csv_event_handler::log_general(), Log_to_csv_event_handler::log_slow(), mark_columns_needed_for_delete(), mark_columns_needed_for_update(), my_tz_init(), mysql_alter_table(), mysql_checksum_table(), mysql_insert(), mysql_install_plugin(), mysql_load(), mysql_uninstall_plugin(), mysqld_list_fields(), plugin_load(), Table_triggers_list::prepare_record1_accessors(), print_field_values(), Table_triggers_list::process_triggers(), ha_archive::real_write_row(), reopen_table(), replace_column_table(), replace_db_table(), replace_routine_table(), replace_table_table(), replace_user_table(), reset_item_list(), Field_iterator_table::set(), Field_iterator_table::set_table(), sp_rcontext::set_variable(), Item_sum_count_distinct::setup(), show_plugins(), show_status_array(), sp_drop_db_routines(), store_constraints(), store_create_info(), store_key_column_usage(), store_schema_partitions_record(), store_schema_proc(), store_schema_shemata(), store_trigger(), table_check_intact(), Item_sum_distinct::unique_walk_function(), Event_timed::update_fields(), update_schema_privilege(), update_user_table(), uses_only_table_name_fields(), and ha_archive::write_row().
