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.