MySQL Code Primer Step I – Get MySQL Source Code
* Where Is MySQL Source Code
- MySQL Website
Both Binaries and Source Code can be found there.
Launchpad is recommended, as its code is in a bazaar repository. A few fantastic benefits are there.
* Extra Informations In Source Repository
Many useful information is stored in bazaar repository. it can help us to understand the code well.
- Revision Log
Every commit creates a new revision and lots of information is logged. For each patch, we can find who committed it, when it was committed, which branch it merged from and what the commit message is.
- Commit Message
MySQL has a strict policy for commit messages. The message has to record related bug IDs or worklog IDs, give a clear description about the problem or the new feature and clarify how the problem is solved or the new feature is implemented.
- The Origin Of Each Line
Bazaar can show us the revision of each line in current work tree. It means the line was introduced in the revision. So it is very helpful for finding extra informations related to the code.
- The new branch keeps all information of the old version, so we can retrieve the code of old versions easily.
- Dozens Projects for MySQL are there. E.g. MySQL Connector, MySQL Proxy etc. The most important one is MySQL Server project. It implements MySQL server. So we mainly focus on MySQL Server code.
It is the branch of MySQL-5.5.
It is for unreleased new features.
Cluster branches include the code of NDB Cluster.
bzr branch lp:mysql-server/5.5 bzr branch lp:mysql-server/trunk
- Update your local branch if new patches are put in launchpad
bzr pull bzr pull lp:mysql-server/5.5
Now, you have created mirrors of MySQL server code. You can write your own code and commit it to your branches.
Note: you could not use ‘bzr pull’ to update your branches if you have committed your own patches into the local branches. But you can do it by using ‘bzr merge’.
原创文章，转载请注明： 文章地址MySQL Code Primer Step I – Get MySQL Source Code