{"id":266390,"date":"2020-12-23T09:35:20","date_gmt":"2020-12-23T01:35:20","guid":{"rendered":"http:\/\/4563.org\/?p=266390"},"modified":"2020-12-23T09:35:20","modified_gmt":"2020-12-23T01:35:20","slug":"%e5%83%8f-innodb-%e8%bf%99%e7%a7%8d%e5%ba%95%e5%b1%82%e5%ad%98%e5%82%a8%e7%bb%93%e6%9e%84%ef%bc%8c%e5%9c%a8%e4%bb%a3%e7%a0%81%e5%b1%82%e9%9d%a2%e6%98%af%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%9a%84","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=266390","title":{"rendered":"\u50cf InnoDB \u8fd9\u79cd\u5e95\u5c42\u5b58\u50a8\u7ed3\u6784\uff0c\u5728\u4ee3\u7801\u5c42\u9762\u662f\u5982\u4f55\u5b9e\u73b0\u7684\u5462"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u50cf InnoDB \u8fd9\u79cd\u5e95\u5c42\u5b58\u50a8\u7ed3\u6784\uff0c\u5728\u4ee3\u7801\u5c42\u9762\u662f\u5982\u4f55\u5b9e\u73b0\u7684\u5462               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6bd4\u5982\u5f88\u591a\u4e66\u4e0a\u4ee5\u53ca\u6587\u6863\u90fd\u4f1a\u8bb2\u8fd9\u4e2a\u5b58\u50a8\u5f15\u64ce\u7684\u5b58\u50a8\u7ed3\u6784\uff0c\u6bd4\u5982\u8bb0\u5f55\u7684\u7ed3\u6784\uff0c\u9875\u7684\u7ed3\u6784\uff0c\u90a3\u4e48\u8fd9\u4e9b\u4e1c\u897f\u6620\u5c04\u5230\u4ee3\u7801\u5c42\u9762\u662f\u600e\u4e48\u5b9e\u73b0\u7684\u5462\uff1f<\/p>\n<p>\u6bd4\u5982\u4e00\u4e2a\u9875\uff0c\u91cc\u9762\u6709\u5f88\u591a\u4e2a\u8bb0\u5f55\uff0c\u5bf9\u5e94\u5230\u5185\u5b58\u548c\u786c\u76d8\u91cc\uff0c\u662f\u4e00\u5806\u5b57\u8282\uff0c\u90a3\u6211\u4eec\u7684\u7a0b\u5e8f\u4ee3\u7801\u8981\u5904\u7406\u7684\u65f6\u5019\uff0c\u662f\u9700\u8981\u8bb2\u8fd9\u5757\u7684\u5185\u5bb9\u8bfb\u5230\u5185\u5b58\uff0c\u7136\u540e\u7c7b\u4f3c\u53cd\u5e8f\u5217\u5316\u8f6c\u5316\u4e3a\u6211\u4eec\u4ee3\u7801\u4e2d\u7684\u4e00\u4e9b\u7ed3\u6784\u4f53\u6bd4\u5982 Page,Record \u5bf9\u5417\uff1f\u7136\u540e\u64cd\u4f5c\u7684\u903b\u8f91\u5c31\u662f\u5bf9\u8fd9\u4e9b\u5bf9\u8c61\u64cd\u4f5c\uff0c\u6700\u540e\u518d\u5e8f\u5217\u5316\u5237\u56de\u78c1\u76d8\u8fd9\u6837\u5b50\u5417\uff1f<\/p>\n<p>\u6309\u4e66\u4e0a\u7684\u505a\u6cd5\uff0c\u9875\u9762\u7684 UserRecords \u91cc\u7684\u8bb0\u5f55\u5220\u9664\u540e\u53ea\u662f\u4f1a\u5148\u6253\u4e00\u4e2a\u6807\u8bb0\uff0c\u90a3\u4e48\u4e3a\u4ec0\u4e48\u4e0d\u8fd9\u6837\u505a\uff0c\u6bd4\u5982\u8fd9\u4e2a\u9875\u9762\u7684\u8bb0\u5f55\u5728\u6211\u4eec\u4ee3\u7801\u4e2d\u4f53\u73b0\u7684\u5c31\u662f\u4e00\u4e2a LinkList\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5220\u6389\u8981\u5220\u6389\u7684\u8bb0\u5f55\uff0c\u518d\u5e8f\u5217\u5316\u5199\u56de\u78c1\u76d8\u91cc\u3002<\/p>\n<p>\u8fd9\u5757\u60f3\u4e0d\u592a\u6e05\u695a\uff0c\u5e0c\u671b\u5404\u4f4d\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>25<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4851603\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wps353 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1 \u3001\u56e0\u4e3a\u6570\u636e\u5e93\u672c\u8eab\u662f\u4e00\u4e2a\u5f88\u590d\u6742\u7684\u4e1c\u897f\u3002\u8981\u8003\u8651\u5f88\u591a\u5c42\u9762\u4e0a\u7684\u4e1c\u897f\uff0c\u6bd4\u5982\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\uff0cMVCC\uff0c\u9501\u7b49\u7b49\u76f8\u5173\u7684\u60c5\u51b5\u3002\u66b4\u9732\u5916\u9762\u7684\u63a5\u53e3\u770b\u4e0a\u53bb\u90fd\u662f CRUD \u7684\u7b80\u5355\u63a5\u53e3\uff0c\u4f46\u4e8b\u5b9e\u4e0a\u5185\u90e8\u5b9e\u73b0\u6781\u5176\u590d\u6742\uff0c\u8981\u8003\u8651\u5f88\u591a\u4e1c\u897f\u3002<br \/>2 \u3001\u300c\u6309\u4e66\u4e0a\u7684\u505a\u6cd5\uff0c\u9875\u9762\u7684 UserRecords \u91cc\u7684\u8bb0\u5f55\u5220\u9664\u540e\u53ea\u662f\u4f1a\u5148\u6253\u4e00\u4e2a\u6807\u8bb0\uff0c\u90a3\u4e48\u4e3a\u4ec0\u4e48\u4e0d\u8fd9\u6837\u505a\uff0c\u6bd4\u5982\u8fd9\u4e2a\u9875\u9762\u7684\u8bb0\u5f55\u5728\u6211\u4eec\u4ee3\u7801\u4e2d\u4f53\u73b0\u7684\u5c31\u662f\u4e00\u4e2a LinkList\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5220\u6389\u8981\u5220\u6389\u7684\u8bb0\u5f55\uff0c\u518d\u5e8f\u5217\u5316\u5199\u56de\u78c1\u76d8\u91cc\u3002\u300d\u8fd9\u91cc\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u76f4\u63a5\u5220\u9664\u4e86\uff1f\u6253\u4e2a\u6bd4\u65b9\uff0c\u5728 RR \u9694\u79bb\u7ea7\u522b\u4e0b\uff0c\u4e8b\u52a1 A select id=1,\u4e8b\u52a1 B \u7136\u540e delete=1\uff0ccommit;\u7136\u540e\u4e8b\u52a1 A \u5728 select id=1\uff0c\u4f60\u4f1a\u53d1\u73b0\u4e8b\u52a1 B \u7684\u5220\u9664\u6839\u672c\u5bf9\u4e8b\u52a1 A \u6ca1\u4ec0\u4e48\u5f71\u54cd\u3002\u6240\u4ee5\u8fd9\u91cc\u8981\u8003\u8651\u6570\u636e\u5728\u4e0d\u540c\u7684\u9694\u79bb\u7ea7\u522b\u7684\u53ef\u89c1\u6027\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851604\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dynastysea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u6709\u4ec0\u4e48\u5e8f\u5217\u5316\u7684\u64cd\u4f5c\uff0c\u90fd\u662f\u76f4\u63a5\u4fee\u6539\u5185\u5b58\uff0c\u7136\u540e buf \u66f4\u65b0\u5230\u78c1\u76d8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851605\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : la2la <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b9e\u73b0\u592a\u590d\u6742\u4e86\uff0c\u53ef\u4ee5\u7ffb\u7ffb MySQL \u7684\u6e90\u7801\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851606\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dynastysea \u554a \u8fd9\u4e48\u786c\u6838\u7684\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851607\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dynastysea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxCoder \u4e00\u70b9\u4e5f\u4e0d\u786c\u6838\uff0c\u53ef\u80fd\u4f60\u4e0d\u662f C \u7a0b\u5e8f\u5458                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851608\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dynastysea \u80fd\u4e3e\u4e2a\u4f8b\u5b50\u5417 \u201c\u76f4\u63a5\u4fee\u6539\u5185\u5b58\u201d\uff0c \u6211\u4fee\u6539\u6570\u7ec4\u67d0\u4e2a\u503c\u4e5f\u7b97\u4fee\u6539\u662f\u76f4\u63a5\u4fee\u6539\u5185\u5b58\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851609\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dynastysea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxCoder \u5c31\u662f\u8fd9\u4e2a\u610f\u601d\uff0c\u6bd4\u5982\u4f60\u8bf4\u7684 Page \u7ed3\u6784\u4f53\uff0c\u4f60\u6539\u4e86\u5176\u4e2d\u4e00\u4e2a\u5b57\u6bb5\uff0c\u5b83\u662f\u5185\u5b58\u7684\u4e00\u4e2a buf\uff0c\u7136\u540e\u8c03\u7528 write(fd, buf,len)\u66f4\u65b0\u5230\u6587\u4ef6\u5373\u53ef\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851610\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dynastysea \u53ef\u80fd\u6211\u5e8f\u5217\u5316\u7684\u8868\u8fbe\u6709\u7684\u95ee\u9898\uff0c\u6211\u60f3\u8bf4\u7684\u662f\u6bd4\u5982\u6709\u4e00\u4e9b\u6807\u5fd7\u4f4d\u7528\u4e00\u4e2a bit \u6765\u8868\u8fbe\u561b\uff0c\u90a3\u4ee3\u7801\u91cc\u662f\u5426\u53ef\u4ee5\u7528\u4e00\u4e2a bool \u6765\u4ee3\u66ff\uff0c\u7136\u540e\u5f53\u9700\u8981\u5199\u5165\u7684\u65f6\u5019\u518d\u5224\u65ad\uff0c\u6bd4\u5982\u67d0\u4e00\u4e2a\u5b57\u6bb5 15 \u4e2a bit\uff0c\u4ee3\u7801\u91cc\u662f\u5426\u80fd\u7528\u4e00\u4e2a short \u6765\u4ee3\u66ff\uff0c\u5f53\u9700\u8981\u5199\u5165\u7684\u65f6\u5019\u518d\u628a\u8fd9\u4e2a short \u7684 15 \u4e2a bit \u5199\u5165\uff0c<\/p>\n<p>\u8fd8\u662f\u8bf4\u53ea\u662f\u7528 byte \u6570\u7ec4\u4ee3\u66ff\u6574\u4e2a\u7ed3\u6784\uff0c\u7136\u540e\u76f4\u63a5\u64cd\u4f5c\u6bcf\u4e00\u4f4d\uff0c\u6bd4\u5982\u6211\u8981\u8bfb\u53d6 15bits \u8fd9\u4e2a\u5b57\u6bb5\uff0c\u6211\u518d\u53bb\u8ba1\u7b97\u5f97\u5230\u4e00\u4e2a\u503c\uff1f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851611\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : newlife <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u770b\u4e0b boltdb\uff0c\u9879\u76ee\u5f88\u5c0f\uff0c\u51e0\u5343\u884c\u628a\uff0c \u8fd9\u4e2a\u662f go \u5199\u7684\u5355\u6587\u4ef6\u7684 k-v \u6570\u636e\u5e93\uff0c \u7d22\u5f15\u4e5f\u7528\u7684 b+\u6811\u3002\u770b\u5b8c\u4e86\u4f60\u5c31\u53ef\u4ee5\u56de\u7b54\u4f60\u63d0\u51fa\u7684\u95ee\u9898\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851612\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @newlife \u554a\u8fd9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851613\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @newlife \u6211\u89c9\u5f97\u8fd8\u662f\u5148\u5f04\u61c2\u6211\u7684\u95ee\u9898\u5427 \u8fd9\u9879\u76ee\u770b\u8d77\u6765\u8ddf\u6211\u60f3\u7684\u5dee\u7684\u6709\u70b9\u591a\uff0c\u81f3\u5c11\u6211\u770b\u4e0d\u592a\u61c2 page.go \u91cc\u5199\u7684\u5565                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851614\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : extreme <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u4f55\u5b9e\u73b0\uff0c\u770b\u4f60\u9700\u6c42<br \/>\u4f8b\u5982\u4f60\u6709 32 \u4e2a bool \u503c<br \/>\u5047\u5982\u4f60\u60f3\u7701\u50a8\u5b58\u7a7a\u95f4\uff0c\u5f53\u7136\u53ef\u4ee5\u7528 bitmap\uff0c\u4f8b\u5982\u4f60\u7528\u4e00\u4e2a int32 \u5c31\u80fd\u50a8\u5b58\u8fd9 32 \u4e2a bool \u503c<br \/>\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u76f4\u63a5\u9009\u62e9\u4f7f\u7528 32 \u4e2a int8 \u53bb\u8868\u793a\uff0c\u64cd\u4f5c\u8d77\u6765\u65b9\u4fbf\uff0c\u4f46\u662f\u8017\u7a7a\u95f4<\/p>\n<p>\u5982\u679c\u8981\u4f60\u50a8\u5b58\u5341\u4ebf\u4e2a IPv4 \u5730\u5740\uff0c\u4f60\u6253\u7b97\u548b\u5b58\u5462\uff1f<br \/>\u76f4\u63a5\u5b58 int32 \u4f60\u9700\u8981\u63a5\u8fd1 4GB \u50a8\u5b58\u7a7a\u95f4\uff0c\u7528 bitmap \u53ea\u9700\u8981 120MB                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851615\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : neoblackcap <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5185\u5b58\u8ddf\u6570\u636e\u7ed3\u6784\u6ca1\u6709\u4ec0\u4e48\u5173\u7cfb<br \/>\u5f53\u7136\u4f60\u7c97\u7565\u5730\u7406\u89e3\u5b58\u50a8\u5f15\u64ce\u5728\u5904\u7406\u6570\u636e\u7684\u65f6\u5019\u662f\u4f1a\u5e8f\u5217\u5316\u4e0e\u53cd\u5e8f\u5217\uff0c\u8fd9\u5e76\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\u3002<br \/>\u50cf C \u90a3\u6837\u80fd\u76f4\u63a5\u64cd\u4f5c\u5185\u5b58\u7684\u8bed\u8a00\uff0c\u5b57\u8282\u5c31\u662f\u6570\u636e\u7ed3\u6784\uff0c\u53d6\u51b3\u4f60\u5982\u4f55\u201c\u89e3\u91ca\u201d\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851616\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiangbohua <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u611f\u89c9\u7684\u5427\uff0c\u4e0d\u8003\u8651\u4e8b\u52a1\u8fd9\u4e9b\u590d\u6742\u7684\u529f\u80fd\u7684\u8bdd\uff0c\u5176\u5b9e InnoDB \u8fd9\u79cd\u6570\u636e\u5e93\u5f15\u64ce\u505a\u7684\u4e8b\u60c5\uff0c\u4e5f\u5c31\u662f\u901a\u8fc7\u5408\u7406\u7684\u7b97\u6cd5\u5c06\u9700\u8981\u5199\u5165\u7684\u6570\u636e\u5199\u5165\u5408\u9002\u7684\u786c\u76d8\u5757\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851617\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mohanson <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             500 lines \u6709\u4e2a\u53eb dbdb \u7684\u9879\u76ee, \u7528\u7684 btree + \u5355\u6587\u4ef6, \u5165\u95e8\u63a8\u8350<\/p>\n<p>http:\/\/www.aosabook.org\/en\/500L\/dbdb-dog-bed-database.html                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851618\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @extreme <\/p>\n<p>\u6bd4\u5982\u6211\u770b innodb \u4e00\u4e2a page \u91cc\u6709\u591a\u4e2a\u8bb0\u5f55\uff0c\u901a\u8fc7\u4e00\u4e2a\u201c\u4e0b\u4e00\u4e2a\u8bb0\u5f55\u76f8\u5bf9\u504f\u79fb\u91cf\u201d\uff0c\u5c06\u6240\u6709\u8bb0\u5f55\u8fde\u6210\u4e00\u4e2a\u5355\u94fe\u8868\uff0c<\/p>\n<p>\u90a3\u6bd4\u5982\u6211\u7528 c \u8bed\u8a00\u73b0\u5728\u8bfb\u53d6\u8fd9\u4e2a page\uff0c\u4e5f\u5c31\u662f\u5bf9\u5e94\u4e86\u4e00\u4e2a\u5b57\u8282\u6570\u7ec4\u5bf9\u5427\uff0c\u6bd4\u5982\u6211\u73b0\u5728\u8981\u904d\u5386\u8fd9\u4e2a page \u67e5\u627e\u67d0\u4e2a\u8bb0\u5f55\uff0c\u5c31\u662f\u76f4\u63a5\u8fd9\u6837 bytes[i]\u5230 bytes[i+next1]\u5230 bytes[i+next1+next2]\u8fd9\u6837\u76f4\u63a5\u53bb\u64cd\u4f5c\u5bf9\u5427\uff0c\u6bd4\u5982\u904d\u5386\u5230 bytes[x]\uff0c\u7136\u540e\u56e0\u4e3a\u8fd9\u4e2a\u5217\u662f 32 \u4f4d\u6574\u6570\uff0c\u5c31\u9700\u8981\u5f80\u540e\u8bfb 4 \u4e2a\u5b57\u8282\u5230 bytes[x+3]\uff0c\u7136\u540e\u8f6c\u6210\u4e00\u4e2a\u6574\u6570\uff0c\u548c\u6211\u8981\u67e5\u8be2\u7684\u503c\u6bd4\u8f83\u5224\u65ad\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u4ece\u59cb\u81f3\u7ec8\u6211\u90fd\u662f\u76f4\u63a5\u5728\u8fd9\u4e2a\u5b57\u8282\u6570\u7ec4\u91cc\u64cd\u4f5c\u7684\u5bf9\u5417<\/p>\n<p>\u8111\u5b50\u6709\u70b9\u4e71\u8868\u8fbe\u6709\u70b9\u4e71\uff0c\u5e0c\u671b\u5f97\u5230\u89e3\u7b54 orz                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851619\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : extreme <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bf9\u7684\uff0c\u628a\u6570\u636e\u4ece\u786c\u76d8\u8bfb\u53d6\u5230\u5185\u5b58\u5f53\u4e2d\uff0c\u6709\u4e00\u4e2a\u6307\u9488\u5b58\u4e86\u90a3\u4efd\u5185\u5b58\u7684\u8d77\u59cb\u5730\u5740\u3002<br \/>\u90a3\u4e2a\u6307\u9488\u5728 C \u8bed\u8a00\u91cc\u9762\u4e00\u822c\u662f\u4e2a\u201cuint8 *\u201d\u7c7b\u578b\u7684\u6307\u9488\uff0c\u53ef\u4ee5\u5f53\u4f5c\u4e00\u4e2a uint8 \u6570\u7ec4\u6765\u64cd\u4f5c\uff0c\u4e5f\u5c31\u662f\u4f60 Java \u91cc\u9762\u7684\u201c\u5b57\u8282\u6570\u7ec4\u201d\u3002<br \/>\u540e\u9762\u8981\u8bfb\u5199\u90a3\u4efd\u5728\u5185\u5b58\u91cc\u9762\u7684\u6570\u636e\uff0c\u5c31\u901a\u8fc7 uint8 \u7684\u6307\u9488\u53bb\u64cd\u4f5c\u3002<\/p>\n<p>\u81f3\u4e8e\u4f60\u8bf4\u7684\u5f80\u540e\u8bfb 4 \u4e2a\u5b57\u8282\uff0c\u8f6c\u6210\u4e00\u4e2a\u6574\u6570\uff0c\u5176\u5b9e\u8f6c\u6362\u7684\u53ea\u662f\u7c7b\u578b\uff0c\u76f4\u63a5\u7528\u4e00\u4e2a int32 \u7c7b\u578b\u7684\u6307\u9488\u6307\u5411\u90a3\u4e2a\u5185\u5b58\u5730\u5740\uff0c\u5c31\u53ef\u4ee5\u8bfb\u51fa\u4e00\u4e2a\u6574\u6570\u4e86\uff0c\u4f8b\u5982 bytes[x]\u662f\u4f60\u8bf4\u7684\u4e00\u4e2a 32 \u4f4d\u7684\u6574\u6570\uff0c\u5047\u8bbe\u5b83\u662f\u65e0\u7b26\u53f7\u7684\uff0c\u76f4\u63a5*(unit32 *) (bytes + x)\u5c31\u80fd\u628a\u8fd9\u4e2a uint32 \u8bfb\u53d6\u51fa\u6765\uff0c\u8f6c\u7684\u53ea\u662f\u6307\u9488\u7684\u7c7b\u578b\uff0c\u800c\u4e0d\u662f\u503c\uff1a<br \/>uint8_t *bytes = &#8230;; \/\/ \u6307\u5411\u201c\u9875\u201d\u6240\u5728\u7684\u5185\u5b58\u5730\u5740<br \/>uint32_t x = &#8230;; \/\/ \u4f60\u90a3\u4e2a 32 \u4f4d\u6574\u6570\u7684\u5728\u8fd9\u4e2a\u9875\u91cc\u9762\u7684\u504f\u79fb\u91cf<br \/>uint32_t *uint32_pointer = (uint32_t *) (bytes + x);<br \/>printf(&#8220;%dn&#8221;, *uint32_pointer); \/\/ \u8f93\u51fa\u90a3\u4e2a\u6574\u6570\u7684\u503c<\/p>\n<p>*uint32_pointer = 0x0A0B0C0D; \/\/ \u66f4\u6539\u6574\u6570\u7684\u503c<br \/>printf(&#8220;%x, %x, %x, %xn&#8221;, bytes[x + 0], bytes[x + 1], bytes[x + 2], bytes[x + 3]); \/\/ \u8f93\u51fa d, c, b, a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851620\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : extreme <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxCoder \u5177\u4f53\u5982\u4f55\u8bfb\u5199\u5176\u5185\u5b58\u4e2d\u7684\u6570\u636e\uff0c\u8fd8\u5f97\u770b\u90a3\u79cd\u7c7b\u578b\u7684\u5177\u4f53\u5b9e\u73b0\u3002<br \/>\u4f8b\u5982\u8bf4 NULL \u503c\u5176\u5b9e InnoDB \u662f\u901a\u8fc7 bitmap \u50a8\u5b58\u7684\uff0c\u5c31\u901a\u8fc7\u6307\u9488\u8bfb\u53d6\u90a3\u4e00\u884c\u7528\u6765\u8bb0\u5f55 NULL \u5217\u7684 bitmap\uff0c\u901a\u8fc7\u4f4d\u8fd0\u7b97\u8fdb\u884c NULL \u503c\u7684\u8bfb\u5199<br \/>\u53cd\u6b63\uff0c\u90fd\u662f\u901a\u8fc7\u6307\u9488\uff0c\u5728\u5185\u5b58\u4e2d\u5bf9\u6570\u636e\u8fdb\u884c\u8bfb\u5199\uff0c\u4e5f\u5c31\u662f\u4f60\u6240\u8bf4\u7684\u201c\u5728\u5b57\u8282\u6570\u7ec4\u91cc\u64cd\u4f5c\u201d\uff0c\u6d89\u53ca\u7684\u53ea\u6709\u6307\u9488\u7c7b\u578b\u7684\u8f6c\u6362\uff0c\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u503c\u7684\u8f6c\u6362                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851621\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : elgoogelgoog <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/gitee.com\/mirrors\/mysql-server\/tree\/8.0\/storage\/innobase                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851622\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : carlclone <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wps353 \u4e0d\u76f4\u63a5\u5220\u9664\u662f\u4e3a\u4e86\u51cf\u5c11\u788e\u7247\uff0c\u540e\u9762\u91cd\u7528\uff0c\u800c\u4e0d\u662f\u4ec0\u4e48\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u7684\u95ee\u9898\uff0c\u5185\u5b58\u91cc\u4e5f\u6709\u8fd9\u79cd\u7b56\u7565\uff0c\u5206\u9875                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851623\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : extreme <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @carlclone <br \/>https:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/innodb-purge-configuration.html<\/p>\n<p>InnoDB does not physically remove a row from the database immediately when you delete it with an SQL statement. A row and its index records are only physically removed when InnoDB discards the undo log record written for the deletion. This removal operation, which only occurs after the row is no longer required for multi-version concurrency control (MVCC) or rollback, is called a purge.<\/p>\n<p>\u9700\u8981\u7ffb\u8bd1\u6210\u4e2d\u6587\u7ed9\u4f60\u5417                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851624\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : carlclone <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @extreme \u4e00\u6761\u8bb0\u5f55\u662f\u600e\u4e48\u88ab physically remove \u7684? \u5728 record \u7684 delete mask \u4e0a\u6807\u8bb0\u5220\u9664\u7136\u540e\u653e\u5165 free list \u4e0d\u662f\u5417\uff1f\u4e8b\u52a1\u8fd9\u91cc\u6839\u672c\u90fd\u8fd8\u6ca1\u5bf9 record \u8fdb\u884c\u6807\u8bb0\u5220\u9664                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851625\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @extreme \u591a\u8c22\u591a\u8c22 \u8fd9\u4e2a\u6307\u9488\u7684\u8f6c\u6362\u770b\u61c2\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851626\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : extreme <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @carlclone \u90a3\u4e3a\u4ec0\u4e48\u4e8b\u52a1\u8fd9\u91cc\u8fd8\u6ca1\u5220\u9664\u5462\uff1f\u90a3\u4e00\u6bb5\u82f1\u6587\u9700\u8981\u7ffb\u8bd1\u6210\u4e2d\u6587\u7ed9\u4f60\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851627\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xxxyh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @extreme @carlclone <br \/>\u6211\u8ba4\u4e3a\u4f60\u4fe9\u8bf4\u7684\u90fd\u6ca1\u9519\uff0c\u53ea\u662f\u7ef4\u5ea6\u4e0d\u4e00\u6837.<br \/>1.\u4e00\u4e2a\u4e8b\u52a1\u5220\u9664\u4e00\u6761\u8bb0\u5f55\u7684\u65f6\u5019\u5b9e\u9645\u4e0a\u662f\u6ca1\u6709\u7acb\u5373\u5220\u9664\u7684\uff0c\u53ea\u662f\u8bb0\u5f55\u4e86 undolog\uff0c\u56e0\u4e3a\u8003\u8651\u5230 mvcc \u8fd8\u6709\u5176\u4ed6\u4e8b\u52a1\u8981\u8bfb\uff0c\u8fd9\u91cc\u7684\u5220\u9664\u6307\u7684\u662f\u5185\u5b58\u91cc\u7684\u5220\u9664\u3002<br \/>2.\u5220\u9664\u7684\u65f6\u5019\u53ea\u6807\u8bb0\u4e3a\u5220\u9664\uff0c\u540e\u7eed\u590d\u7528\u7684\u7406\u89e3\u4e5f\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u8fd9\u91cc\u7684\u5220\u9664\u6307\u7684\u662f\u4ece\u78c1\u76d8\u5220\u9664\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u50cf InnoDB \u8fd9\u79cd\u5e95\u5c42\u5b58\u50a8\u7ed3\u6784&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/266390"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266390"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/266390\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266390"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}