Although MySQL's source code is open in the sense of being publicly available, it's essentially closed to you if you don't understand it. This book provides a comprehensive tour of MySQL 5 that shows you how to figure out the inner-workings of this powerful database. You'll learn how data structures and convenience functions operate, how to add new storage engines and configuration options, and much more.
-
Chapter 1 MySQL History and Architecturel
-
MySQL History
-
MySQL Architecture
-
-
Chapter 2 Nuts and Bolts of Working with the MySQL Source Code
-
Unix Shell
-
BitKeeper
-
Preparing the System to Build MySQL from BitKeeper Tree
-
Building MySQL from BitKeeper Tree
-
Building from Source Distribution
-
Installing MySQL into a System Directory
-
Source Code Directory Layout
-
Preparing the System to Run MySQL in a Debugger
-
Debugger-Guided Source Tour
-
Basics of Working with gdb
-
Finding Things in the Source
-
Interesting Breakpoints and Variables
-
Making a Source Modification
-
Coding Guidelines
-
Keeping Your BitKeeper Repository Up to Date
-
Submitting a Patch
-
-
Chapter 3 Core Classes, Structures, Variables, and APIs
-
THD
-
NET
-
TABLE
-
Field
-
Utility API Calls
-
Preprocessor Macros
-
Global Variables
-
-
Chapter 4 Client/Server Communication
-
Protocol Overview
-
Packet Format
-
Relationship Between MySQL Protocol and OS Layer
-
Authenticating Handshake
-
Command Packet
-
Server Responses
-
-
Chapter 5 Configuration Variables
-
Configuration Variables Tutorial
-
Interesting Aspects of Specific Configuration Variables
-
-
Chapter 6 Thread-Based Request Handling
-
Threads Versus Processes
-
Implementation of Request Handling
-
Thread Programming Issues
-
-
Chapter 7 The Storage Engine Interface
-
The handler Class
-
Adding a Custom Storage Engine to MySQL
-
-
Chapter 8 Concurrent Access and Locking
-
Table Lock Manager
-
-
Chapter 9 Parser and Optimizer
-
Parser
-
Optimizer
-
-
Chapter 10 Storage Engines
-
Shared Aspects of Architecture
-
InnoDB
-
Memory (Heap)
-
MyISAM Merge
-
NDB
-
Archive
-
Federated
-
-
Chapter 11 Transactions
-
Overview of Transactional Storage Engine Implementation
-
Implementing the handler Subclass
-
Defining the handlerton
-
Working with the Query Cache
-
Working with the Replication Binary Log
-
Avoiding Deadlocks
-
-
Chapter 12 Replication
-
Overview
-
Statement-Based Versus Row-Based Replication
-
Two-Threaded Slave
-
Multi-Master
-
SQL Commands to Help Understand Replication
-
Binary Log Format
-
Creating a Custom Replication Utility
-
-
Colophon
- Title:
- Understanding MySQL Internals
- By:
- Sasha Pachev
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- April 2007
- Ebook Release:
- February 2009
- Pages:
- 256
- Print ISBN:
- 978-0-596-00957-1
- | ISBN 10:
- 0-596-00957-7
- Ebook ISBN:
- 978-0-596-10481-8
- | ISBN 10:
- 0-596-10481-2
The animal on the cover of Understanding MySQL Internals is a banded broadbill (Eurylaimus javanicus). Broadbills are a family of small- to medium-size passerine (perching) birds marked by their bright colors and a whitish dorsal patch. They have large heads, rounded wings, and short to long tails. Their name originates from their large, flattened, hooked bill (often covered by a short crest), which they use to snap up insects in a kingfisher-like fashion. They also feed on fruit, seeds, and small vertebrates.
Broadbills live in the subcanopies of tropical forests: 11 species can be found in southeast Asia, the Philippines, Borneo, and Sumatra; and 4 others are native to central African rainforests. Because of their dense habitats, they are often incredibly difficult to observe despite their bright coloring. Broadbills build elaborate, pear-shaped nests, which are suspended on tree limbs over quiet forest backwaters and streams. Biologists believe this may be an adaptive behavior to deter mammalian and reptilian predators. Adult broadbills will also sometimes feign injury to draw predators away from their nests.
Broadbills are gregarious creatures and are often found in small feeding flocks. They communicate using a variety of mating and territorial displays. Male green broadbills, for instance, have a spinning display, while other species of broadbills may employ head bobbing, wing flapping, and feather fluffing. Some have display flights in which their primary wing feathers "buzz" during times of courtship or territorial defense. The sound can be heard from as far as 60 meters away. In addition, broadbills have a variety of calls--often described as a cacophony of whistles, rattles, or screams--which they use during courtship rituals, as an alarm signal, and for contact between mates.
The cover image is from Wood's Animate Creation. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.
The production editors for Understanding MySQL Internals, eMatter Edition were Ellie Cutler and Jeff Liggett. Linda Walsh was the product manager. Kathleen Wilson provided design support. Lenny Muellner, Mike Sierra, Erik Ray, and Benn Salter provided technical support. This eMatter Edition was produced with FrameMaker 5.5.6.
