The world's most popular open source database
USA/Canada - Toll Free: +1-866-221-0634
USA - From abroad: +1-208-327-6494
USA/Canada - Subscription Renewals: +1-866-221-0634
Latin America: +1 512 535 7751
UK: +44 845 399 1124
Ireland: +353 1 6919191
Germany: +49 89 420 95 98 95
France: +33 1 70 61 48 95
Sweden: +46 730 207 871
Benelux: +31 6 25003558
Italy: +39 06-99268193
Israel: +31 6 25003558
Spain & Portugal: + 34 933905461
Other EMEA countries: +353 1 6919191
Australia/NZ: +61 2 42314328
Asia Pacific: +81 3 5843 1140
Newsletters older than 6 months may have links that are out of date. Please use the Search to check for updated links.
Peter Gulutzan
Sometimes you might want to know how certain MySQL feature was implemented or how it is supposed to be working. The standard advice "Research Thy Foundation Matter", usually abbreviated RTFM, is only useful if you know where to look. The "MySQL Internals" section in MySQL's online manual http://www.mysql.com/doc/en/MySQL_internals.html is short. Where are the low-level descriptions?
A good way is to start with "MySQL Internals Manual for version 4.1.1-alpha". This comes straight from MySQL's programmers, which is bad -- some parts are hard to understand -- but good, because this is your direct developer-to-developer analysis from people who really know the source code.
Here's the Table Of Contents page:
1. Coding Guidelines
2. The Optimiser
3. Important Algorithms and Structures
4. How MySQL performs different selects
5. How MySQL transforms subqueries
6. MySQL Client/Server Protocol
7. Replication
8. MyISAM Record Structure
9. The .MYI file
10. InnoDB Record Structure
11. InnoDB Page Structure
12. Annotated List Of Files in the MySQL Source Code Distribution
13. Annotated List Of Files in the InnoDB Source Code Distribution
Looks interesting? Then you'll have to download the whole documentation source and ignore all but one file: internals.texi.
* Get BitKeeper. You can do this from the BitKeeper site, http://www.bitmover.com/cgi-bin/download.cgi, just follow the instructions. If you've ever tried "Installing from the Development Source Tree" for MySQL http://www.mysql.com/doc/en/Installing_source_tree.html), then you've done this already.
* Download all the documentation to your computer:
shell> bk clone bk://mysql.bkbits.net/mysqldoc mysqldoc
* Find the file 'internals.texi' in the Docs subdirectory of mysqldoc, it will be on your computer once the 'bk clone' is done
* Convert the internals.texi file to an internals.html file with:
shell> Support/texi2html internals.texi
Then use your browser to look at it.(If you use Windows, you'll have to try reading internals.texi with an editor, because you may not be able to run texi2html on Windows platforms, and thus cannot create the HTML files.)
In the next newsletter we will list a set of articles, that provide information on MySQL Internals.

