最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

TransactionsonInnoDB_MySQL

来源:动视网 责编:小采 时间:2020-11-09 20:00:53
文档

TransactionsonInnoDB_MySQL

TransactionsonInnoDB_MySQL:from: https://blogs.oracle.com/mysqlinnodb/entry/innodb_redundant_row_formatInnoDB Redundant Row FormatBy annamalai.gurusami on Sep 13, 2013IntroductionThis article describes the InnoDB redundant row format. If you are new to InnoDB code ba
推荐度:
导读TransactionsonInnoDB_MySQL:from: https://blogs.oracle.com/mysqlinnodb/entry/innodb_redundant_row_formatInnoDB Redundant Row FormatBy annamalai.gurusami on Sep 13, 2013IntroductionThis article describes the InnoDB redundant row format. If you are new to InnoDB code ba


GNU Emacs Function to Traverse Rows in Page

If we dump a single InnoDB index page into a file, we can open it in GNU Emacs hexl-mode and use the following elisp function to traverse from infimum record to the supremum record. First place the cursor on the 'i' of the infimum record and then call this function to reach the next record origin. I am not an expert in writing elisp functions. If you can improve on this and write a better one, kindly share it with me.

(defun ib-next-red-row () "Go to the origin of the next record in ROW_FORMAT=REDUNDANT.The cursor must be positioned at the origin of a record. This is for the GNU Emacs hexl-mode. " (interactive) (setq rec-origin (point)) (setq rec-origin-offset (hexl-current-address)) ;; The next-rec pointer is stored in 2 bytes before the ;; record origin (hexl-backward-char 2) (setq next-rec (string (char-after))) (forward-char 1) (setq next-rec 	(concat next-rec (string (char-after)))) (hexl-forward-char 1) (setq next-rec 	(concat next-rec (string (char-after)))) (forward-char 1) (setq next-rec 	(concat next-rec (string (char-after)))) ;; Next record is next-rec-off bytes away from page origin (setq next-rec-off (hexl-hex-string-to-integer next-rec)) ;; Assuming that there is only one page in dump (hexl-goto-address 0) (hexl-forward-char next-rec-off))

Conclusion

In this article, the format of the redundant row was explained. A gdb session was used to demonstrate how to access a page and the rows within that page. The infimum record was accessed, printed and analysed. Using its next record pointer, the first user record was accessed. The reader can use the next record pointer of the first user record to access the next user record and so on till the supremum record is reached. I leave that as an exercise for the readers.

Thanks to Marko Makela for his useful tips on debugging at our yearly InnoDB Team Meeting 2013 held at Shanghai, China. This article derives from his ideas.

文档

TransactionsonInnoDB_MySQL

TransactionsonInnoDB_MySQL:from: https://blogs.oracle.com/mysqlinnodb/entry/innodb_redundant_row_formatInnoDB Redundant Row FormatBy annamalai.gurusami on Sep 13, 2013IntroductionThis article describes the InnoDB redundant row format. If you are new to InnoDB code ba
推荐度:
标签: son mysql InnoDB
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top