Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9573
  • 博文数量: 5
  • 博客积分: 176
  • 博客等级: 入伍新兵
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-08 18:25
文章分类

全部博文(5)

文章存档

2011年(5)

我的朋友

分类: Mysql/postgreSQL

2011-11-03 16:15:14

MySQL server project not only includes source code for the server binary, but also includes some essential tools for installation, maintenance, access and test. Their source code are packed in different directories depend on their utilities.

* Server Source Code
  Server code is divided into SQL and Engine parts.

- SQL Part
  This part includes the source code for
  @ Setting up the server and providing service to users.
  @ Parsing SQL statements and then calling engine API to manipulate the data stored
    in different engines. The API is defined by SQL Part and implemented by engines.
  @ Other features that is not related to engines, e.g. Replication.

  Most of its code is in 'sql' directory.

- Engine Part
 
This part includes the source code for
  @ Storing data on secondary storage.
  @ Implementing Transaction, concurrency control and other ACID related functions.
  @ Implementing the engine API which is
    called by SQL part to manipulate the data.

  Source code of the
engines is in 'storage' directory. Each engine has a separated sub-directory for their code in 'storage' directory.

* Client Tools
  A group of command line tools are developed for communicating to the servers. E.g mysql, mysql_admin etc. Each of them connects to servers by using socket and do some sort of operations.
  Their code is in 'client' sub-directory.

* MySQL Test Platform
  A test platform is implemented for testing MySQL server. It developed a test case language. Thousands of test cases are written in the language.
  The core of the test platform is written in C, called 'mysqltest.cc' which is in 'client' directory.
  Test cases and starting scripts are in 'mysql-test' sub-directory.

*
Bench-mark Suite
  A bench-mark tool is developed for testing server performance. Its code is in 'sql-bench' sub-directory.

* Tools For Ease Of Use
  Dozen of scripts and default configure files are developed. They are helpful for setting up MySQL servers.
  Most of the scripts are in 'scripts' sub-director, and default configure files are in 'support-files' sub-directory.

- Building Tools And Building Configuration Files
  A group of scripts are developed to make building simple. 'BUILD' sub-directory includes building scripts for Unix-like platforms.
  'win' sub-directory includes the building scripts for windows OS.
  Since 5.5, MySQL can be built by utilizing CMake. So there are many 'CMakeList.txt' in sub-directories. Meanwhile 'cmake' sub-directory includes configuration files for CMake.

* Programming Languages Of MySQL Code
  @ C&C++
    MySQL server, client commands.
  @ Shell Script
    Install, configuration tools and building tools.
  @ Perl
    MySQL test system, sql-bench suite etc.
  @ MySQL Test Script
    Test cases.

Familiar with those programming languages is important for reading and modifying MySQL code.

* Reference
 

阅读(328) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~