@@ -675,33 +675,227 @@ MySql的体系结构主要如下:
675675- 存储引擎,含各种以插件提供的数据存储引擎。
676676- 文件存储层,含各种实际落到硬盘的物理文件。
677677
678+ ## mysql源代码目录innodb引擎目录详解
679+ innobase目录解读
680+ - api:
681+ - arch:
682+ - btr: B +树实现
683+ ```
684+ File Name What Name Stands For Size Comment Inside File
685+ --------- -------------------- ------ -------------------
686+ btr0btr.c B-tree / B-tree 82,400 B-tree
687+ btr0cur.c B-tree / Cursor 103,233 index tree cursor
688+ btr0sea.c B-tree / Search 41,788 index tree adaptive search
689+ btr0pcur.c B-tree / persistent cursor 16,720 index tree persistent cursor
690+ ```
691+ buf:缓冲池的实现,包括LRU算法,FLUSH刷新算法
692+ ```
693+ File Name What Name Stands For Size Comment Inside File
694+ --------- -------------------- ------ -------------------
695+ buf0buf.c Buffering / Buffering 65,582 The database buffer buf_pool
696+ buf0flu.c Buffering / Flush 29,583 ... flush algorithm
697+ buf0lru.c / least-recently-used 27,515 ... replacement algorithm
698+ buf0rea.c Buffering / read 21,504 ... read
699+ ```
700+ clone:
678701
702+ data:这是影响行的次要实用程序例程的集合。
703+ ```
704+ File Name What Name Stands For Size Comment Inside File
705+ --------- -------------------- ------ -------------------
706+ dict0dict.c Dictionary / Dictionary 114,263 Data dictionary system
707+ dict0boot.c Dictionary / boot 11,704 ... booting
708+ dict0crea.c Dictionary / Create 37,278 ... creation
709+ dict0load.c Dictionary / load 34,049 ... load to memory cache
710+ dict0mem.c Dictionary / memory 7,470 ... memory object creation
679711
712+ ```
713+ dict: InnoDB 存储引擎中内存数字字典的实现。
714+ ```
715+ File Name What Name Stands For Size Comment Inside File
716+ --------- -------------------- ------ -------------------
717+ dict0dict.c Dictionary / Dictionary 114,263 Data dictionary system
718+ dict0boot.c Dictionary / boot 11,704 ... booting
719+ dict0crea.c Dictionary / Create 37,278 ... creation
720+ dict0load.c Dictionary / load 34,049 ... load to memory cache
721+ dict0mem.c Dictionary / memory 7,470 ... memory object creation
722+ ```
723+ eval:评估步骤是解释SQL语句过程的后期部分—在\ pars(PARSING)期间已经进行了解析。
724+ ```
725+ File Name What Name Stands For Size Comment Inside File
726+ --------- -------------------- ------ -------------------
727+ eval0eval.c Evaluating/Evaluating 17,061 SQL evaluator
728+ eval0proc.c Evaluating/Procedures 5,001 Executes SQL procedures
729+ ```
730+ fil: Innodb 存储引擎中文件数据结构以及对文件的一些操作。
680731
732+ fut:通用的实用文件程序
733+ ```
734+ File Name What Name Stands For Size Comment Inside File
735+ --------- -------------------- ------ -------------------
736+ fut0fut.c File Utility / Utility 293 File-based utilities
737+ fut0lst.c File Utility / List 14,176 File-based list utilities
738+ ```
739+ gis:
681740
741+ ha:哈希算法的实现。
742+ ```
743+ File Name What Name Stands For Size Comment Inside File
744+ --------- -------------------- ------ -------------------
745+ ha0ha.c Hashing / Hashing 8,145 Hash table with external chains
746+ hash0hash.c Hashing / Hashing 3,283 Simple hash table utility
747+ ```
748+ handler:继承于mysql的handler,插件式存储引擎的实现。
682749
750+ ibuf:插入缓存的实现。
751+ ```
752+ File Name What Name Stands For Size Comment Inside File
753+ --------- -------------------- ------ -------------------
754+ ibuf0ibuf.c Insert Buffer / 91,397 Insert buffer
755+ ```
756+ include: innodb 将头文件(.h,.ic)文件都统一放在这个文件夹下。
683757
758+ lob:
684759
685-
686-
687-
688-
689-
690-
691-
692-
693-
694-
695-
696-
697-
698-
699-
700-
701-
702-
703-
704-
760+ lock:Innodb存储引擎锁的实现。
761+ ```
762+ File Name What Name Stands For Size Comment Inside File
763+ --------- -------------------- ------ -------------------
764+ lock0lock.c Lock / Lock 139,207 The transaction lock system
765+ ```
766+ log:日志缓冲和重组日志文件的实现。
767+ ```
768+ File Name What Name Stands For Size Comment Inside File
769+ --------- -------------------- ------ -------------------
770+ log0log.c Logging / Logging 86,043 Database log
771+ log0recv.c Logging / Recovery 91,352 Recovery
772+ ```
773+ mach:机器格式
774+ ```
775+ File Name What Name Stands For Size Comment Inside File
776+ --------- -------------------- ------ -------------------
777+ mach0data.c Machine/Data 2,335 Utilities for converting
778+ ```
779+ mem:辅助缓存池的实现,用来申请一些数据结构的内存。
780+ ```
781+ File Name What Name Stands For Size Comment Inside File
782+ --------- -------------------- ------ -------------------
783+ mem0mem.c Memory / Memory 10,310 The memory management
784+ mem0dbg.c Memory / Debug 22,054 ... the debug code
785+ mem0pool.c Memory / Pool 16,511 ... the lowest level
786+ ```
787+ mtr:事务的底层实现
788+ ```
789+ File Name What Name Stands For Size Comment Inside File
790+ --------- -------------------- ------ -------------------
791+ mtr0mtr.c Mini-transaction / 12,620 Mini-transaction buffer
792+ mtr0log.c Mini-transaction / Log 8,090 ... log routines
793+ ```
794+ os:封装一些对于操作系统的操作
795+ ```
796+ File Name What Name Stands For Size Comment Inside File
797+ --------- -------------------- ------ -------------------
798+ os0file.c OS / File 104,081 To i/o primitives
799+ os0thread.c OS / Thread 7,754 To thread control primitives
800+ os0proc.c OS / Process 16,919 To process control primitives
801+ os0sync.c OS / Synchronization 14,256 To synchronization primitives
802+ ```
803+ page:页的实现
804+ ```
805+ File Name What Name Stands For Size Comment Inside File
806+ --------- -------------------- ------ -------------------
807+ page0page.c Page / Page 51,731 Index page routines
808+ page0cur.c Page / Cursor 38,127 The page cursor
809+ ```
810+ pars:工作是输入一个包含SQL语句的字符串并输出一个内存中的分析树。 EVALUATING(子目录\ eval)程序将使用该树。
811+ ```
812+ File Name What Name Stands For Size Comment Inside File
813+ --------- -------------------- ------ -------------------
814+ pars0pars.c Parsing/Parsing 45,376 SQL parser
815+ pars0grm.c Parsing/Grammar 62,685 A Bison parser
816+ pars0opt.c Parsing/Optimizer 31,268 Simple SQL Optimizer
817+ pars0sym.c Parsing/Symbol Table 5,239 SQL parser symbol table
818+ lexyy.c Parsing/Lexer 62,071 Lexical scanner
819+ ```
820+ que:程序que0que.c表面上是关于包含提交/回滚语句的存储过程的执行。
821+ ```
822+ File Name What Name Stands For Size Comment Inside File
823+ --------- -------------------- ------ -------------------
824+ que0que.c Query Graph / Query 30,774 Query graph
825+ ```
826+ read:read0read.c程序使用\ trx程序组中的某些功能打开查询结果的“读取视图”。
827+ ```
828+ File Name What Name Stands For Size Comment Inside File
829+ --------- -------------------- ------ -------------------
830+ read0read.c Read / Read 9,935 Cursor read
831+ ```
832+ rem:记录管理器,有时,您会问,围绕页面行中数据的所有那些位是什么,这就是您找到答案的地方。
833+ ```
834+ File Name What Name Stands For Size Comment Inside File
835+ --------- -------------------- ------ -------------------
836+ rem0rec.c Record Manager 38,573 Record Manager
837+ rem0cmp.c Record Manager / 26,617 Comparison services for records
838+ Comparison
839+ ```
840+ row:对于各种类型行数据的操作。
841+ ```
842+ File Name What Name Stands For Size Comment Inside File
843+ --------- -------------------- ------ -------------------
844+ row0row.c Row / Row 18,375 General row routines
845+ row0uins.c Row / Undo Insert 6,799 Fresh insert undo
846+ row0umod.c Row / Undo Modify 19,712 Undo modify of a row
847+ row0undo.c Row / Undo 10,512 Row undo
848+ row0vers.c Row / Version 14,385 Row versions
849+ row0mysql.c Row / MySQL 112,462 Interface [to MySQL]
850+ row0ins.c Row / Insert 42,829 Insert into a table
851+ row0sel.c Row / Select 111,719 Select
852+ row0upd.c Row / Update 51,824 Update of a row
853+ row0purge.c Row / Purge 15,609 Purge obsolete records
854+ ```
855+ srv:对于InnoDB存储引擎参数的涉及
856+ ```
857+ File Name What Name Stands For Size Comment Inside File
858+ --------- -------------------- ------ -------------------
859+ srv0srv.c Server / Server 75,633 Server main program
860+ srv0que.c Server / Query 2,463 Server query execution
861+ srv0start.c Server / Start 50,154 Starts the server
862+ ```
863+ sync:InnoDB存储引擎互斥量(Mutex)的实现
864+ ```
865+ File Name What Name Stands For Size Comment Inside File
866+ --------- -------------------- ------ -------------------
867+ sync0sync.c Synchronization / 37,940 Mutex, the basic sync primitive
868+ sync0arr.c ... / array 26,455 Wait array used in primitives
869+ sync0rw.c ... / read-write 22,846 read-write lock for thread sync
870+ ```
871+ trx:事务的实现
872+ ```
873+ File Name What Name Stands For Size Comment Inside File
874+ --------- -------------------- ------ -------------------
875+ trx0trx.c Transaction / 50,480 The transaction
876+ trx0purge.c Transaction / Purge 29,133 ... Purge old versions
877+ trx0rec.c Transaction / Record 37,346 ... Undo log record
878+ trx0roll.c / Rollback 31,448 ... Rollback
879+ trx0sys.c Transaction / System 27,018 ... System
880+ trx0rseg.c / Rollback segment 6,445 ... Rollback segment
881+ trx0undo.c Transaction / Undo 51,519 ... Undo log
882+ ```
883+ usr:一个用户可以有多个会话(该会话是连接和断开连接之间发生的所有事情)。
884+ ```
885+ File Name What Name Stands For Size Comment Inside File
886+ --------- -------------------- ------ -------------------
887+ usr0sess.c User / Session 1,740 Sessions
888+ ```
889+ ut:工具类
890+ ```
891+ File Name What Name Stands For Size Comment Inside File
892+ --------- -------------------- ------ -------------------
893+ ut0ut.c Utilities / Utilities 9,728 Various utilities
894+ ut0byte.c Utilities / Debug 793 Byte utilities
895+ ut0rnd.c Utilities / Random 1,474 Random numbers and hashing
896+ ut0mem.c Utilities / Memory 10,358 Memory primitives
897+ ut0dbg.c Utilities / Debug 2,579 Debug utilities
898+ ```
705899
706900
707901
0 commit comments