btr_cur_optimistic_insert{
...
/*检查分裂页时是否有足够的空间预留给未来记录的update*/
if (leaf && !zip_size && dict_index_is_clust(index)
上海龙凤1314 shlf && page_get_n_recs(page) >= 2
上海龙凤1314 shlf && dict_index_get_space_reserve()+ rec_size > max_size
上海龙凤1314 shlf &&(btr_page_get_split_rec_to_right(cursor, &dummy)
||btr_page_get_split_rec_to_left(cursor, &dummy))) {
上海龙凤1314 shlf gotofail;
上海龙凤1314 shlf }
...
}
dict_index_get_space_reserve()+ rec_size > max_size
上海龙凤1314 shlf dict_index_get_space_reserve()=1024,即当1024+记录大小rec_size大于当前page空闲空间max_size时,乐观插入失败,进入悲观插入阶段,发生B+分裂