mysql中的块block究竟是什么概念?
最近在看mysql存储引擎源代码的时候,发现block这个单词出现的比较频繁。如:在Myisamdef.h里面有如下结构和定义:typedef struct st_mi_block_info { /* Parameter to _mi_get_block_info */
uchar header;
ulong rec_len;
ulong data_len;
ulong block_len;
ulong blob_len;
my_off_t filepos;
my_off_t next_filepos;
my_off_t prev_filepos;
uint second_read;
uint offset;
} MI_BLOCK_INFO;
/* bits in return from _mi_get_block_info */
#define BLOCK_FIRST 1
#define BLOCK_LAST 2
#define BLOCK_DELETED 4
#define BLOCK_ERROR 8 /* Wrong data */
#define BLOCK_SYNC_ERROR 16 /* Right data at wrong place */
#define BLOCK_FATAL_ERROR 32 /* hardware-error */
上面的每一个成员代表什么呢?block究竟是什么一个概念呢?它与数据存取有关吧?数据在硬盘上是如何存储的?
谢谢各位! 数据是以块形式存入磁盘的。 我想也是,同时Oracle也是以Block的形式存取。
回复 2# fire9 的帖子
能详细点吗?每一块到底是多大?块与块之间有没有间隙?即使你是复制过来的资料我也要感谢你。
页:
[1]