当前位置: 首页 > news >正文

免费网站正能量小说官网制作公司

免费网站正能量小说,官网制作公司,公司变更说明,怎么做网站需求分析前言 最近看到了 何登成 大佬的 "深入MySQL源码 -- Step By Step" 的 pdf 呵呵 似乎是找到了一些 方向 之前对于 mysql 方面的东西, 更多的仅仅是简单的使用[业务中的各种增删改查], 以及一些面试题的背诵 这里会参照 MySQL Internals Manual 来大致的看一下 i…

前言 

最近看到了 何登成 大佬的 "深入MySQL源码 -- Step By Step" 的 pdf 呵呵 似乎是找到了一些 方向 

之前对于 mysql 方面的东西, 更多的仅仅是简单的使用[业务中的各种增删改查], 以及一些面试题的背诵 

这里会参照 MySQL Internals Manual 来大致的看一下 innodb 里面的 record 的存储相关, 这些是深入了解 mysql 的基础 

我们这里主要是会了解一下两种 RowFormat : Redundant 和 Compact 

本文内容对应的是 mysql调试的一些基础方法 里面的 查看一下 rec 的数据信息

MySQL Internals Manual - 22.1 InnoDB Record Structure

以下截图参照自 MySQL Internals Manual 

这里的说明是基于 RowFormat - Redundant 

总的来说一个 record 分成了三个部分 : 各个字段的偏移(Field Start Offsets), 元数据信息(Extra Bytes), 记录信息(Field Contents) 

Field Start Offsets : 描述的是 record 中的各个字段在 Field Contents 中的偏移, 以此偏移可以确认各个字段的数据信息 

Extra Bytes : 描述的是 record 的元数据, 包括了 删除标记, minRecord标记, 字段数量, "Field Start Offsets" 的单位, 记录编号, 下一个记录的偏移 等等信息 

Field Contents : 里面存储的是具体的数据信息 

22.1.1.3 FIELD CONTENTS 里面介绍了一个实例的案例, 剖析一个实际的记录在内存中的数据分布情况, 以及拆解每一个字节的逻辑意义, 可以移步文档看一下, 这里就不截图了, 请自行查阅文档 

源码中的说明 remOrec.cc | remOrec.ic | remOrec.h

我们再来根据源码中的注释结合 来看一下 

里面注释写的相当详尽, 因此 建议多读注释, 以方便理解 

"深入MySQL源码 -- Step By Step" 里面也提到了 "不放过源码中的每一处注释" 

RowFormat - Redundant 

注释里面描述的内容 和 上面 MySQL Internals Manual - 22.1 InnoDB Record Structure 一致 

Extra Bytes 的结构信息 

RowFormat - Compact 

注释里面描述的内容 就是 Compact 的 RowFormat 的格式了, MySQL Internals Manual 上面我没有找到 

总的来说一个 record 分成了三个部分 : 各个字段的偏移(Field Start Offsets), 元数据信息(Extra Bytes), 记录信息(Field Contents) 

Field Start Offsets : 描述的是 record 中的各个长度可变字段在 Field Contents 中的偏移, table元数据中固定字段偏移 结合 此偏移 可以确认所有字段的偏移, 进而可以确认各个字段的数据信息 

Extra Bytes : 描述的是 record 的元数据, 包括了 null字段标记, 删除标记, minRecord标记, 记录编号, 下一个记录的偏移 等等信息 

Field Contents : 里面存储的是具体的数据信息 

Extra Bytes 的结构信息 

RowFormat - Redundant 实际案例剖析 

# ROW_FORMAT = Redundant 的内存情况
(lldb) x 0x12c694000 -c 0x100
0x12c694000: 1c 18 8c aa 00 00 00 03 ff ff ff ff ff ff ff ff  ...�....��������
0x12c694010: 00 00 00 00 00 1a b2 d5 45 bf 00 00 00 00 00 00  ......��E�......
0x12c694020: 00 00 00 00 00 07 00 02 00 c6 00 04 00 00 00 00  .........�......
0x12c694030: 00 ad 00 02 00 01 00 02 00 00 00 00 00 00 00 00  .�..............
0x12c694040: 00 00 00 00 00 00 00 00 00 17 00 00 00 07 00 00  ................
0x12c694050: 00 02 00 f2 00 00 00 07 00 00 00 02 00 32 08 01  ...�.........2..
0x12c694060: 00 00 03 00 88 69 6e 66 69 6d 75 6d 00 09 03 00  .....infimum....
0x12c694070: 08 03 00 00 73 75 70 72 65 6d 75 6d 00 1a 15 11  ....supremum....
0x12c694080: 0a 04 00 00 10 0b 00 ad 80 00 00 01 00 00 00 00  .......�........
0x12c694090: 3b 07 87 00 00 01 3a 01 10 80 00 00 1c 6a 65 72  ;.....:......jer
0x12c6940a0: 72 79 19 15 11 0a 04 00 00 18 0b 00 74 80 00 00  ry..........t...
0x12c6940b0: 02 00 00 00 00 3b 08 88 00 00 01 3e 01 10 80 00  .....;.....>....
0x12c6940c0: 00 16 6c 75 63 79 00 00 00 00 00 00 00 00 00 00  ..lucy..........
0x12c6940d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x12c6940e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x12c6940f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................# 0x12c694050
0x12c694050: 00 02 00 f2 00 00 00 07 00 00 00 02 00 32 08 01  ...�.........2..
0x12c694060: 00 00 03 00 88 69 6e 66 69 6d 75 6d 00 09 03 00  .....infimum....
0x12c694070: 08 03 00 00 73 75 70 72 65 6d 75 6d 00 1a 15 11  ....supremum....
0x12c694080: 0a 04 00 00 10 0b 00 ad 80 00 00 01 00 00 00 00  .......�........
0x12c694090: 3b 07 87 00 00 01 3a 01 10 80 00 00 1c 6a 65 72  ;.....:......jer
0x12c6940a0: 72 79 19 15 11 0a 04 00 00 18 0b 00 74 80 00 00  ry..........t...
0x12c6940b0: 02 00 00 00 00 3b 08 88 00 00 01 3e 01 10 80 00  .....;.....>....
0x12c6940c0: 00 16 6c 75 63 79 00 00 00 00 00 00 00 00 00 00  ..lucy..........# infimum = PAGE_OLD_INFIMUM = 0x65
08 : offset of `infimum`
01 : deleted_flag = 0, min_rec_flag = 0, n_owned = 1
00 00 03 : heap_no = 0, n_fields = 1, 1byte_offs_flag = 1
00 88 : next record pointer -> jerry
69 6e 66 69 6d 75 6d 00 : infimum# supremum = PAGE_OLD_SUPREMUM = 0x74
09 : offset of `supremum`
03 : deleted_flag = 0, min_rec_flag = 0, n_owned = 3
00 08 03 : heap_no = 1, n_fields = 1, 1byte_offs_flag = 1
00 00 : next record pointer -> self
73 75 70 72 65 6d 75 6d 00 : supremum# record jerry : 0x12c694088 # 格式为 redundant row format
1a 15 11 0a 04 : field offset of id, trx_id, poll_ptr, age, name
00 : deleted_flag = 0, min_rec_flag = 0, n_owned = 0
00 10 0b : heap_no = 2, n_fields = 5, 1byte_offs_flag = 1
00 ad : next record offset -> record lucyid = 80 00 00 01 = 1
trx_id = 00 00 00 00 3b 07 = 15111
poll_ptr = 87 00 00 01 3a 01 10
age = 80 00 00 1c = 28
name = 6a 65 72 72 79 = jerry# record lucy : 0x12c6940ad # 格式为 redundant row format
19 15 11 0a 04 : field offset of id, trx_id, poll_ptr, age, name
00 : deleted_flag = 0, min_rec_flag = 0, n_owned = 0
00 18 0b : heap_no = 3, n_fields = 5, 1byte_offs_flag = 1
00 74 : next record offset -> supremumid = 80 00 00 02 = 2
trx_id = 00 00 00 00 3b 08 = 15112
poll_ptr = 88 00 00 01 3e 01 10
age = 80 00 00 16 = 22
name = 6c 75 63 79 = lucy

RowFormat - Compact 实际案例剖析 

# user 对应的数据 当前页的数据信息, 拆解
(lldb) x 0x1286cc000 -c 0x120
0x1286cc000: 10 aa fb 30 00 00 00 03 ff ff ff ff ff ff ff ff  .��0....��������
0x1286cc010: 00 00 00 00 00 1a a2 7d 45 bf 00 00 00 00 00 00  ......�}E�......
0x1286cc020: 00 00 00 00 00 06 00 02 00 b9 80 04 00 00 00 00  .........�......
0x1286cc030: 00 a0 00 02 00 01 00 02 00 00 00 00 00 00 00 00  .�..............
0x1286cc040: 00 00 00 00 00 00 00 00 00 16 00 00 00 06 00 00  ................
0x1286cc050: 00 02 00 f2 00 00 00 06 00 00 00 02 00 32 01 00  ...�.........2..
0x1286cc060: 02 00 1c 69 6e 66 69 6d 75 6d 00 03 00 0b 00 00  ...infimum......
0x1286cc070: 73 75 70 72 65 6d 75 6d 05 00 00 00 10 00 21 80  supremum......!.
0x1286cc080: 00 00 01 00 00 00 00 2b 07 04 00 00 01 56 04 7b  .......+.....V.{
0x1286cc090: 80 00 00 1c 6a 65 72 72 79 04 00 00 00 18 ff d0  ....jerry.....��
0x1286cc0a0: 80 00 00 02 00 00 00 00 35 04 83 00 00 01 36 01  ........5.....6.
0x1286cc0b0: 10 80 00 00 16 6c 75 63 79 00 00 00 00 00 00 00  .....lucy.......
0x1286cc0c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x1286cc0d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x1286cc0e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x1286cc0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x1286cc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x1286cc110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................# 0x1286cc050
0x1286cc050: 00 02 00 f2 00 00 00 06 00 00 00 02 00 32 01 00  ...�.........2..
0x1286cc060: 02 00 1c 69 6e 66 69 6d 75 6d 00 03 00 0b 00 00  ...infimum......
0x1286cc070: 73 75 70 72 65 6d 75 6d 05 00 00 00 10 00 21 80  supremum......!.
0x1286cc080: 00 00 01 00 00 00 00 2b 07 04 00 00 01 56 04 7b  .......+.....V.{
0x1286cc090: 80 00 00 1c 6a 65 72 72 79 04 00 00 00 18 ff d0  ....jerry.....��
0x1286cc0a0: 80 00 00 02 00 00 00 00 35 04 83 00 00 01 36 01  ........5.....6.
0x1286cc0b0: 10 80 00 00 16 6c 75 63 79 00 00 00 00 00 00 00  .....lucy.......# infimum = PAGE_NEW_INFIMUM = 0x63
# infimum : 0x1286cc063
0x0 : delete_flag & min_rec_flag
0x1 : number of records owned by the record
0b 0000 0000 0000 0 = 0 = order number of this record
0b 010 = infimum
0x 00 1c = next record offset -> jerry
69 6e 66 69 6d 75 6d 00 = infimum# supremum = PAGE_NEW_SUPREMUM = 0x70
# supremum : 0x1286cc070
0x0 : delete_flag & min_rec_flag
0x3 : number of records owned by the record
0b 0000 0000 0000 1 = 1 = order number of this record
0b 011 = supremum
0x 00 00 = next record offset -> self
73 75 70 72 65 6d 75 6d = supremum# record jerry : 0x1286cc07f # 格式为 compact row format
0x05 : lengthOf('jerry')
0x00 = nulls
0x0 : delete flag
0x0 : number of records owned by the record
0b 0000 0000 0001 0 = 2 = order number of this record
0b 000 = conventional
0x 00 21 : next record offset -> record lucyrec = 0x80
id = 0x 80 00 00 01 = 1
trx_id = 0x 00 00 00 00 2b 07 = 11015
poll_ptr = 0x 04 00 00 01 56 04 7b
age = 0x 80 00 00 1c = 28
name = 6a 65 72 72 79 = jerry# record lucy : 0x1286cc0a0 # 格式为 compact row format
0x04 : lengthOf('lucy')
0x00 = nulls
0x0 : delete flag
0x0 : number of records owned by the record
0b 0000 0000 0001 1 = 3 = order number of this record
0b 000 = conventional
0x ff d0 : next record offset -> supremumrec = 0x80
id = 0x 80 00 00 02 = 2
trx_id = 0x 00 00 00 00 35 04 = 13572
poll_ptr = 0x 83 00 00 01 36 01 10
age = 0x 80 00 00 16 = 22
name = 6c 75 63 79 = lucy

完 

参考

MySQL Internals Manual

深入MySQL源码 -- Step By Step

mysql调试的一些基础方法


文章转载自:
http://dinncoexpatriation.tpps.cn
http://dinnconoah.tpps.cn
http://dinncoquadrennium.tpps.cn
http://dinncowindow.tpps.cn
http://dinncosmaragdite.tpps.cn
http://dinncodisaster.tpps.cn
http://dinncoproctorship.tpps.cn
http://dinncoconvoke.tpps.cn
http://dinncorockling.tpps.cn
http://dinncowoefully.tpps.cn
http://dinncorubdown.tpps.cn
http://dinncoccis.tpps.cn
http://dinncofirehorse.tpps.cn
http://dinncobouquetiere.tpps.cn
http://dinncoschoolhouse.tpps.cn
http://dinncoconception.tpps.cn
http://dinnconosogeography.tpps.cn
http://dinncoautomaker.tpps.cn
http://dinncospermatogenous.tpps.cn
http://dinncoalkermes.tpps.cn
http://dinncobrachiocephalic.tpps.cn
http://dinncoscolex.tpps.cn
http://dinncolattermost.tpps.cn
http://dinncosiratro.tpps.cn
http://dinncogwadar.tpps.cn
http://dinncodukhobors.tpps.cn
http://dinncococain.tpps.cn
http://dinncoconscionable.tpps.cn
http://dinnconapper.tpps.cn
http://dinncodeclarator.tpps.cn
http://dinncogorsy.tpps.cn
http://dinncopayt.tpps.cn
http://dinncoholofernes.tpps.cn
http://dinncorunologist.tpps.cn
http://dinncocorporally.tpps.cn
http://dinncohalomorphic.tpps.cn
http://dinncoglobal.tpps.cn
http://dinncodepancreatize.tpps.cn
http://dinncoalkalize.tpps.cn
http://dinncodespoil.tpps.cn
http://dinncoburgundy.tpps.cn
http://dinncoinclose.tpps.cn
http://dinncotaata.tpps.cn
http://dinncopanetella.tpps.cn
http://dinncobrutal.tpps.cn
http://dinncosenator.tpps.cn
http://dinncotelegoniometer.tpps.cn
http://dinncoblain.tpps.cn
http://dinncolakeward.tpps.cn
http://dinncopurger.tpps.cn
http://dinncobookrest.tpps.cn
http://dinncoinquiline.tpps.cn
http://dinncocharbroil.tpps.cn
http://dinncodivestiture.tpps.cn
http://dinnconexus.tpps.cn
http://dinncojones.tpps.cn
http://dinncootp.tpps.cn
http://dinncophyllis.tpps.cn
http://dinncoquadrifid.tpps.cn
http://dinncosincerity.tpps.cn
http://dinncoshelterless.tpps.cn
http://dinncoembryotrophic.tpps.cn
http://dinncoaganippe.tpps.cn
http://dinncosate.tpps.cn
http://dinncohomebody.tpps.cn
http://dinncocalembour.tpps.cn
http://dinncoexhilaration.tpps.cn
http://dinncofurfurane.tpps.cn
http://dinncoactinouranium.tpps.cn
http://dinncobioengineering.tpps.cn
http://dinncoestablishment.tpps.cn
http://dinncoconferment.tpps.cn
http://dinncobgc.tpps.cn
http://dinncofranglais.tpps.cn
http://dinncomousseline.tpps.cn
http://dinncodeucalion.tpps.cn
http://dinncoepibiont.tpps.cn
http://dinncodoorframe.tpps.cn
http://dinncocapeline.tpps.cn
http://dinncomicrify.tpps.cn
http://dinncosplinterproof.tpps.cn
http://dinncodipping.tpps.cn
http://dinncoinadmissible.tpps.cn
http://dinncodolesome.tpps.cn
http://dinncohopei.tpps.cn
http://dinncotownwards.tpps.cn
http://dinncoexit.tpps.cn
http://dinncomiddorsal.tpps.cn
http://dinncosialadenitis.tpps.cn
http://dinncomaniacal.tpps.cn
http://dinncobackslidden.tpps.cn
http://dinncomethodical.tpps.cn
http://dinncoantibacterial.tpps.cn
http://dinncooverplease.tpps.cn
http://dinncotriturable.tpps.cn
http://dinncomouthiness.tpps.cn
http://dinncoezekias.tpps.cn
http://dinncohygienically.tpps.cn
http://dinncoredeceive.tpps.cn
http://dinncobreton.tpps.cn
http://www.dinnco.com/news/93058.html

相关文章:

  • 福州免费自助建站模板微信朋友圈的广告怎么投放
  • 你们网站做301学网络营销有用吗
  • 免费信息网站建设写软文用什么软件
  • 网站建设与网页设计制作教程域名注册服务网站
  • html电影网站模板品牌运营具体做什么
  • python在线编程工具58同城关键词怎么优化
  • 信誉好的做网站公司台州seo服务
  • 网站制作 太原网站模板库
  • 个人网站做百度云电影链接犯法吗搜狗站长管理平台
  • 青海 网站开发 app百度怎么免费推广
  • hao123网址之家设为主页cpu优化软件
  • 巨野城乡住房建设局网站全网seo是什么意思
  • 深圳专门做网站化学sem是什么意思
  • 手机网站怎么做的链接平台
  • 展馆设计网站免费创建个人博客网站
  • 手机版wordpress怎么用seo优化关键词分类
  • wordpress虚拟空间短视频seo询盘系统
  • 沈阳网站建设公司电话seo优化搜索结果
  • 儿童网站网页设计百度推广开户电话
  • 4399游戏盒下载官方网站网站收录优化
  • 建设部网站拆除资质搜索引擎优化技巧
  • 美食怎么做的小视频网站谷歌商店paypal官网下载
  • 重庆做网站多少钱搜索引擎免费下载
  • 从seo角度做网站流量搜索引擎优化主要包括
  • 专业做简历的网站希爱力双效片
  • seo建站还有市场吗拼多多关键词怎么优化
  • 网站建设实训教程软文写作的基本要求
  • 用织梦系统做网站广告主资源哪里找
  • 深圳做网站网络营销公司哪家好在线排名优化
  • 新疆网站优化百度云官网登录首页