/* The default type of hash_table is HASH_TABLE_SYNC_NONE i.e.: the caller is responsible for access control to the table. */ table->type = HASH_TABLE_SYNC_NONE; table->array = array;//hash表头指向hash表 table->n_cells = prime;//设置 table->heap = NULL; ut_d(table->magic_n = HASH_TABLE_MAGIC_N);
/* Initialize the cell array */ hash_table_clear(table); //memset 0x00整个hash表
/*******************************************************************//** Inserts a struct to a hash table. */ /* HASH_INSERT(lock_t, hash, lock_sys->rec_hash,lock_rec_fold(space, page_no), lock);