MySQL的非叶子节点指针是什么
发表于:2025-11-11 作者:千家信息网编辑
千家信息网最后更新 2025年11月11日,本篇文章为大家展示了MySQL的非叶子节点指针是什么,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。这个指针为8字节:4(唯一定位字段个数)+4(page no
千家信息网最后更新 2025年11月11日MySQL的非叶子节点指针是什么
本篇文章为大家展示了MySQL的非叶子节点指针是什么,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
这个指针为8字节:4(唯一定位字段个数)+4(page no)。函数为dict_index_build_node_ptr。仅此记录,后续研究
/**********************************************************************//**Builds a node pointer out of a physical record and a page number.@return own: node pointer */dtuple_t*dict_index_build_node_ptr(/*======================*/ const dict_index_t* index, /*!< in: index */ const rec_t* rec, /*!< in: record for which to build node pointer */ ulint page_no,/*!< in: page number to put in node pointer */ mem_heap_t* heap, /*!< in: memory heap where pointer created */ ulint level) /*!< in: level of rec in tree: 0 means leaf level */{ dtuple_t* tuple; dfield_t* field; byte* buf; ulint n_unique; if (dict_index_is_ibuf(index)) { /* In a universal index tree, we take the whole record as the node pointer if the record is on the leaf level, on non-leaf levels we remove the last field, which contains the page number of the child page */ ut_a(!dict_table_is_comp(index->table)); n_unique = rec_get_n_fields_old(rec); if (level > 0) { ut_a(n_unique > 1); n_unique--; } } else { n_unique = dict_index_get_n_unique_in_tree_nonleaf(index);// 唯一定位 到叶子节点的字段个数 } tuple = dtuple_create(heap, n_unique + 1); //建立元组 /* When searching in the tree for the node pointer, we must not do comparison on the last field, the page number field, as on upper levels in the tree there may be identical node pointers with a different page number; therefore, we set the n_fields_cmp to one less: */ dtuple_set_n_fields_cmp(tuple, n_unique); //比较字段为 数据域 dict_index_copy_types(tuple, index, n_unique); //进行类型复制 buf = static_cast(mem_heap_alloc(heap, 4)); //分配内存 mach_write_to_4(buf, page_no);//写入 叶子节点page no field = dtuple_get_nth_field(tuple, n_unique); //字段个数 能够唯一定位的字段个数 dfield_set_data(field, buf, 4);//写入字段个数 dtype_set(dfield_get_type(field), DATA_SYS_CHILD, DATA_NOT_NULL, 4); rec_copy_prefix_to_dtuple(tuple, rec, index, n_unique, heap); //复制数据 dtuple_set_info_bits(tuple, dtuple_get_info_bits(tuple) | REC_STATUS_NODE_PTR); ut_ad(dtuple_check_typed(tuple)); return(tuple);} 上述内容就是MySQL的非叶子节点指针是什么,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注行业资讯频道。
字段
个数
叶子
节点
指针
定位
内容
技能
数据
知识
简明
简明扼要
内存
函数
字节
就是
文章
更多
篇文章
类型
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
天津服务器公司有哪些品牌服务器
网络安全黑料是真实吗
服务器为什么有二个网口
cpf网络安全游戏
网络安全制度建设实施方案
星巴克建立的顾客数据库
四川成都app软件开发公司
浪潮服务器维修维保哪家好
重钢电子公司软件开发工资
和龙软件开发费用多少
思想认识网络安全
pd怎么连接数据库
网络安全的利大于弊
linux下的网络安全
企业服务器数据管理
软件开发项目 奖金金额
国网网络安全实战攻防新闻
服务器托管多少钱
上海智能软件开发概念设计
以下不是数据库加密技术的是
神通数据库过期
平安普惠软件开发多少月薪水
组织编制系统网络安全
数据库导出错误12154
qq服务器进不去了
家长微信宣传网络安全
服务器工作时间长了会卡吗
怎么在离线服务器里有皮肤
关系型数据库最多可以创建
制作网页必须使用数据库吗