Understanding Mysql Internals

  • ISBN13:


  • ISBN10:


  • Edition: 1st
  • Format: Paperback
  • Copyright: 2007-04-01
  • Publisher: Oreilly & Associates Inc
  • Purchase Benefits
  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99 Save up to $7.50
  • Buy New
    Add to Cart Free Shipping


Supplemental Materials

What is included with this book?

  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.


Like our strong-selling book, Understanding the Linux Kernel, this new guide goes to the heart of the MySQL database, another leading open source software project. Written by Sasha Pachev, a former member of the MySQL Development Team, Understanding MySQL Internals provides a comprehensive tour of the latest version, MySQL 5, and shows you how to figure out the inner-workings of this popular open source database project. You'll learn how data structures and convenience functions operate, how to add new storage engines and configuration options, and much more. Understanding MySQL Internals will help you reach a whole new level of comprehension regarding database development. It provides unprecedented opportunities for IT departments, software vendors, and computer science students to learn about the inner workings of this enterprise-proven database.

Author Biography

Sasha Pachev graduated from the Brigham Young University in 1998 with a degree in Computer Science, worked on the MySQL development team in 2000-2002, and was the original developer of replication in MySQL. In 2003 he wrote his first book MySQL Enterprise Solutions. He currently lives in Provo, Utah with his wife Sarah and his five children working as an independent consultant with the emphasis on MySQL.

In spite of his great interest in computers, Sasha is equally passionate about distance running. He has won a number of marathons, has a personal best of 2:24:47, and is attempting to qualify for the US Olympic Trials. He feels it is important to help other runners reach their potential, and operates a web site http://FastRunningBlog.Com dedicated to that purpose.

Table of Contents

Prefacep. xi
MySQL History and Architecturep. 1
MySQL Historyp. 1
MySQL Architecturep. 4
Nuts and Bolts of Working with the MySQL Source Codep. 19
Unix Shellp. 19
BitKeeperp. 19
Preparing the System to Build MySQL from BitKeeper Treep. 22
Building MySQL from BitKeeper Treep. 24
Building from Source Distributionp. 25
Installing MySQL into a System Directoryp. 26
Source Code Directory Layoutp. 27
Preparing the System to Run MySQL in a Debuggerp. 28
Debugger-Guided Source Tourp. 29
Basics of Working with gdbp. 30
Finding Things in the Sourcep. 33
Interesting Breakpoints and Variablesp. 34
Making a Source Modificationp. 36
Coding Guidelinesp. 37
Keeping Your BitKeeper Repository Up to Datep. 39
Submitting a Patchp. 40
Core Classes, Structures, Variables, and APIsp. 41
THDp. 41
Netp. 46
Tablep. 48
Fieldp. 51
Utility API Callsp. 54
Preprocessor Macrosp. 57
Global Variablesp. 59
Client/Server Communicationp. 62
Protocol Overviewp. 62
Packet Formatp. 62
Relationship Between MySQL Protocol and OS Layerp. 63
Authenticating Handshakep. 64
Command Packetp. 69
Server Responsesp. 74
Configuration Variablesp. 80
Configuration Variables Tutorialp. 80
Interesting Aspects of Specific Configuration Variablesp. 88
Thread-Based Request Handlingp. 107
Threads Versus Processesp. 107
Implementation of Request Handlingp. 109
Thread Programming Issuesp. 113
The Storage Engine Interfacep. 119
The handler Classp. 120
Adding a Custom Storage Engine to MySQLp. 136
Concurrent Access and Lockingp. 161
Table Lock Managerp. 162
Parser and Optimizerp. 167
Parserp. 167
Optimizerp. 170
Storage Enginesp. 194
Shared Aspects of Architecturep. 195
InnoDBp. 202
Memory (Heap)p. 204
MyISAM Mergep. 205
NDBp. 205
Archivep. 206
Federatedp. 207
Transactionsp. 208
Overview of Transactional Storage Engine Implementationp. 208
Implementing the handler Subclassp. 209
Defining the handlertonp. 212
Working with the Query Cachep. 213
Working with the Replication Binary Logp. 214
Avoiding Deadlocksp. 214
Replicationp. 216
Overviewp. 216
Statement-Based Versus Row-Based Replicationp. 217
Two-Threaded Slavep. 218
Multi-Masterp. 219
SQL Commands to Help Understand Replicationp. 220
Binary Log Formatp. 223
Creating a Custom Replication Utilityp. 227
Indexp. 229
Table of Contents provided by Ingram. All Rights Reserved.

Rewards Program

Write a Review