Mysql5.5 source code analysis (-)

Source: Internet
Author: User

The first time I tried to analyze the MySQL source code, I had to trace it back to two years ago, but it was hard to download the source code to the local machine until today. :)

Make a backup, so the memory is not as bad as the pen.

Calculate sloccount.CodeIs millions of rows, C ++, and ascic-based. In terms of scale, it is no inferior to WPS. After a year and a half, I picked up C ++.

CPP: 631203 (49.60%)

Ansic: 543818 (42.74%)

 

507268 storage CPP = 352539, ansic = 144769, cs = 4647, Perl = 2455, SH = 1641,

Lex = 639, YACC = 524, awk = 54

275719 strings ansic = 275719

247575 SQL CPP = 232766, YACC = 12408, ansic = 2307, SH = 94

The storage engine is big-headed.

 

 

1. Download mysql-5.5.8.tar.gz source code

Http://dev.mysql.com/downloads/mysql/#downloads

 

2. decompress the package to generate a Build File.

Tar xvf mysql-5.5.8.tar.gz

CD mysql-5.5.8

# Select a platform-related build script, and I chose build/compile-amd64-debug-max-no-ndb

./Build/compile-amd64-debug-max-no-ndb-C

Dependent on (contains but not all): cmake, GCC, G ++, libncurses5-dev, Apt-Get or yum are both (platform-related ).

 

3. Create a project, import the MySQL source code to eclipse, and compile

2.93 GB memory, single core, GHz, and can be edited in about half an hour.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.