`
hideto
  • 浏览: 2678797 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

MySQL Architecture

阅读更多


MySQL Core Modules:
Server Initialization Module
The Server Initialization Module is responsible for the server initialization on startup
sql/mysqld.cc
sql/sql_acl.cc
slq/slave.cc

Connection Manager
The Connection Manager listens for incoming connections from clients, and dispatches the requests to the Thread Manager
sql/mysqld.cc

Thread Manager
The Thread Manager is responsible for keeping track of threads and for making sure a thread is allocated to handle the connection from a client
sql/mysqld.cc
sql/sql_class.cc

Connection Thread
The Connection Thread is the heart of the work of processing client requests on an established connection
sql/sql_parse.cc

User Authentication Module
The User Authentication Module authenticates the connecting user and initializes the structures and variables containing the information on his level of privileges
sql/sql_parse.cc
sql/sql_acl.cc
sql/password.cc

Access Control Module
The Access Control Module verifies that the client user has sufficient privileges to perform the requested operation
sql/sql_acl.cc
sql/sql_parse.cc

Parser
The Parser is responsible for parsing queries and generating a parse tree
sql/sql_parse.cc
sql/sql_yacc.cc
sql/sql_lex.cc

Command Dispatcher
The Command Dispatcher is responsible for directing requests to the lower-level modules that will know how to resolve them
sql/sql_parse.cc

Query Cache Module
The Query Cache Module caches query results, and tries to short-circuit the execution  of queries by delivering the cached result whenever possible
sql/sql_cache.cc

Optimizer
The Optimizer is responsible for creating the best strategy to answer the query, and executing it to deliver the result to the client
sql/sql_select.cc

Table Manager
The Table Manager is responsible for creating, reading, and modifying the table definition files (.frm extension), maintaining a cache of table descriptors called table cache, and managing table-level locks
sql/sql_base.cc
sql/table.cc
sql/unireg.cc
sql/lock.cc

Table Modification Module
This collection of modules is responsible for operations such as creating, deleting, renaming, dropping, updating, or inserting into a table
sql/sql_update.ccc
sql/sql_insert.cc
sql/sql_table.cc
sql/sql_delete.cc

Table Maintenance Module
The Table Maintenance Module is responsible for table maintenance operations such as check, repair, back up, restore, optimize (defragment), and analyze (update key distribution statistics)
sql/sql_table.cc

Status Report Module
The Status Reporting Module is responsible for answering queries about server configuration settings, performance tracking variables, table structure information, replication progress, condition of the table cache, and other things
sql/sql_show.cc
sql/slave.cc
sql/sql_repl.cc

Abstracted Storage Engine Interface(Table Handler)
This module is actually an abstract class named handler and a structure called a handlerton
sql/handler.h
sql/handler.cc

Storage Engine Implementations(MyISAM, InnoDB, MEMORY, Berkeley DB)
Each of the storage engines provides a standard interface for its operations by extending the handler class mentioned earlier
sql/ha_myisam.h      sql/ha_myisam.cc
sql/ha_innodb.h      sql/ha_innodb.cc
sql/ha_heap.h        sql/ha_heap.cc
sql/ha_ndbcluster.h  sql/ha_ndbcluster.cc

Logging Module
The Logging Module is responsible for maintaining higher-level (logical) logs
sql/log.cc
sql/log_event.cc

Replication Master Module
The Replication Master Module is responsible for the replication functionality on the master
sql/sql_repl.cc

Replication Slave Module
The Replication Slave Module is responsible for the replication functionality of the slave
sql/slave.cc

Client/Server Protocol API
The MySQL client/server communication protocol sits on top of the operating system protocol (TCP/IP or local socket) in the protocol stack
sql/protocol.cc
sql/net_serv.cc

Low-Level Network I/O API
The Low-Level Network I/O API provides an abstraction for the low-level network I/O and SSL sessions
vio/ direcotry

Core API
The Core API is the Swiss Army knife of MySQL
It provides functionality for portable file I/O, memory management, string manipulation, filesystem navigation, formatted printing, a rich collection of data structures and algorithms, and a number of other things
mysys/ directory
strings/ directory
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics