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 (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 (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.