
/*****************************************************************//**
Based on an index object, this function builds the entry to be inserted
in the SYS_INDEXES system table.
@return the tuple which should be inserted */
static
dtuple_t*
dict_create_sys_indexes_tuple(
/*==========================*/
const dict_index_t* index, /*!< in: index */
mem_heap_t* heap) /*!< in: memory heap from
which the memory for the built
tuple is allocated */
{
dict_table_t* sys_indexes;
dict_table_t* table;
dtuple_t* entry;
dfield_t* dfield;
byte* ptr;
ut_ad(mutex_own(&(dict_sys->mutex)));
ut_ad(index);
ut_ad(heap);
sys_indexes = dict_sys->sys_indexes;
table = dict_table_get_low(index->table_name);
entry = dtuple_create(heap, 7 + DATA_N_SYS_COLS);
dict_table_copy_types(entry, sys_indexes);
/* 0: TABLE_ID -----------------------*/
dfield = dtuple_get_nth_field(entry, 0/*TABLE_ID*/);
ptr = mem_heap_alloc(heap, 8);
mach_write_to_8(ptr, table->id);
dfield_set_data(dfield, ptr, 8);
/* 1: ID ----------------------------*/
dfield = dtuple_get_nth_field(entry, 1/*ID*/);
ptr = mem_heap_alloc(heap, 8);
mach_write_to_8(ptr, index->id);
dfield_set_data(dfield, ptr, 8);
/* 4: NAME --------------------------*/
dfield = dtuple_get_nth_field(entry, 2/*NAME*/);
dfield_set_data(dfield, index->name, ut_strlen(index->name));
/* 5: N_FIELDS ----------------------*/
dfield = dtuple_get_nth_field(entry, 3/*N_FIELDS*/);
ptr = mem_heap_alloc(heap, 4);
mach_write_to_4(ptr, index->n_fields);
dfield_set_data(dfield, ptr, 4);
/* 6: TYPE --------------------------*/
dfield = dtuple_get_nth_field(entry, 4/*TYPE*/);
ptr = mem_heap_alloc(heap, 4);
mach_write_to_4(ptr, index->type);
dfield_set_data(dfield, ptr, 4);
/* 7: SPACE --------------------------*/
#if DICT_SYS_INDEXES_SPACE_NO_FIELD != 7
#error "DICT_SYS_INDEXES_SPACE_NO_FIELD != 7"
#endif
dfield = dtuple_get_nth_field(entry, 5/*SPACE*/);
ptr = mem_heap_alloc(heap, 4);
mach_write_to_4(ptr, index->space);
dfield_set_data(dfield, ptr, 4);
/* 8: PAGE_NO --------------------------*/
#if DICT_SYS_INDEXES_PAGE_NO_FIELD != 8
#error "DICT_SYS_INDEXES_PAGE_NO_FIELD != 8"
#endif
dfield = dtuple_get_nth_field(entry, 6/*PAGE_NO*/);
ptr = mem_heap_alloc(heap, 4);
mach_write_to_4(ptr, FIL_NULL);//此时page_no的值表示还未定义
dfield_set_data(dfield, ptr, 4);
/*--------------------------------*/
return(entry);
}
/** 'null' (undefined) page
offset in the context of file spaces */
#define FIL_NULL ULINT32_UNDEFINED
> mysqld.exe!dict_create_sys_indexes_tuple(const dict_index_struct * index=0x1f1e4ad8, mem_block_info_struct * heap=0x1f1cd550) 行365 C
mysqld.exe!dict_build_index_def_step(que_thr_struct * thr=0x1f199cf8, ind_node_struct * node=0x1f1cd310) 行587 + 0x10 字节 C
mysqld.exe!dict_create_index_step(que_thr_struct * thr=0x1f199cf8) 行1080 + 0xd 字节 C
mysqld.exe!que_thr_step(que_thr_struct * thr=0x1f199cf8) 行1257 + 0x9 字节 C
mysqld.exe!que_run_threads_low(que_thr_struct * thr=0x1f199cf8) 行1305 + 0x9 字节 C
mysqld.exe!que_run_threads(que_thr_struct * thr=0x1f199cf8) 行1342 + 0x9 字节 C
mysqld.exe!row_create_index_for_mysql(dict_index_struct * index=0x1f1e4ad8, trx_struct * trx=0x1f1e46f0, const unsigned long * field_lengths=0x1f1dba48) 行2107 + 0x9 字节 C
mysqld.exe!create_index(trx_struct * trx=0x1f1e46f0, TABLE * form=0x2203cdfc, unsigned long flags=1, const char * table_name=0x2203c554, unsigned int key_num=0) 行6776 + 0x11 字节 C++
mysqld.exe!ha_innobase::create(const char * name=0x2203da3c, TABLE * form=0x2203cdfc, st_ha_create_information * create_info=0x2203eaa8) 行7267 + 0x1f 字节 C++
mysqld.exe!handler::ha_create(const char * name=0x2203da3c, TABLE * form=0x2203cdfc, st_ha_create_information * info=0x2203eaa8) 行3577 + 0x1e 字节 C++
mysqld.exe!ha_create_table(THD * thd=0x1f170880, const char * path=0x2203da3c, const char * db=0x1f1f2bf0, const char * table_name=0x1f1f2820, st_ha_create_information * create_info=0x2203eaa8, bool update_create_info=false) 行3784 + 0x1d 字节 C++
mysqld.exe!rea_create_table(THD * thd=0x1f170880, const char * path=0x2203da3c, const char * db=0x1f1f2bf0, const char * table_name=0x1f1f2820, st_ha_create_information * create_info=0x2203eaa8, List
mysqld.exe!mysql_create_table_no_lock(THD * thd=0x1f170880, const char * db=0x1f1f2bf0, const char * table_name=0x1f1f2820, st_ha_create_information * create_info=0x2203eaa8, Alter_info * alter_info=0x2203ea48, bool internal_tmp_table=false, unsigned int select_field_count=0, bool * is_trans=0x2203dc93) 行4294 + 0x38 字节 C++
mysqld.exe!mysql_create_table(THD * thd=0x1f170880, TABLE_LIST * create_table=0x1f1f2848, st_ha_create_information * create_info=0x2203eaa8, Alter_info * alter_info=0x2203ea48) 行4388 + 0x27 字节 C++
mysqld.exe!mysql_execute_command(THD * thd=0x1f170880) 行2559 + 0x1e 字节 C++
mysqld.exe!mysql_parse(THD * thd=0x1f170880, char * rawbuf=0x1f1f2758, unsigned int length=50, Parser_state * parser_state=0x2203f760) 行5627 + 0x9 字节 C++
mysqld.exe!dispatch_command(enum_server_command command=COM_QUERY, THD * thd=0x1f170880, char * packet=0x1f1ea469, unsigned int packet_length=50) 行1037 + 0x22 字节 C++
mysqld.exe!do_command(THD * thd=0x1f170880) 行773 + 0x1b 字节 C++
mysqld.exe!do_handle_one_connection(THD * thd_arg=0x1f170880) 行840 + 0x9 字节 C++
mysqld.exe!handle_one_connection(void * arg=0x1f170880) 行759 + 0x9 字节 C++
mysqld.exe!pfs_spawn_thread(void * arg=0x1f1ce0d8) 行1015 + 0x9 字节 C++
mysqld.exe!pthread_start(void * p=0x1f1d5f78) 行61 + 0x9 字节 C
mysqld.exe!_callthreadstartex() 行348 + 0xf 字节 C
mysqld.exe!_threadstartex(void * ptd=0x1f1ee4b0) 行331 C
kernel32.dll!76daed6c()
[下面的框架可能不正确和/或缺失,没有为 kernel32.dll 加载符号]
ntdll.dll!7723377b()
ntdll.dll!7723374e()