Book description
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. In this book, Sasha Pachev -- a former member of the MySQL Development Team -- provides a comprehensive tour of MySQL 5 that shows you how to figure out the inner workings of this powerful database. You'll go right to heart of the database to learn how data structures and convenience functions operate, how to add new storage engines and configuration options, and much more.
The core of Understanding MySQL Internals begins with an Architecture Overview that provides a brief introduction of how the different components of MySQL work together. You then learn the steps for setting up a working compilable copy of the code that you can change and test at your pleasure. Other sections of the book cover:
- Core server classes, structures, and API
- The communication protocol between the client and the server
- Configuration variables, the controls of the server; includes a tutorial on how to add your own
- Thread-based request handling -- understanding threads and how they are used in MySQL
- An overview of MySQL storage engines
- The storage engine interface for integrating third-party storage engines
- The table lock manager
- The parser and optimizer for improving MySQL's performance
- Integrating a transactional storage engine into MySQL
- The internals of replication
Understanding MySQL Internals provides unprecedented opportunities for developers, DBAs, database application programmers, IT departments, software vendors, and computer science students to learn about the inner workings of this enterprise-proven database. With this book, you will soon reach a new level of comprehension regarding database development that will enable you to accomplish your goals. It's your guide to discovering and improving a great database.
Publisher resources
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Preface
-
1. MySQL History and Architecturel
- 1.1. MySQL History
-
1.2. MySQL Architecture
- 1.2.1. Core Modules
- 1.2.2. Interaction of the Core Modules
-
1.2.3. Detailed Look at the Core Modules
- 1.2.3.1. Server Initialization Module
- 1.2.3.2. Connection Manager
- 1.2.3.3. Thread Manager
- 1.2.3.4. Connection Thread
- 1.2.3.5. User Authentication Module
- 1.2.3.6. Access Control Module
- 1.2.3.7. Parser
- 1.2.3.8. Command Dispatcher
- 1.2.3.9. Query Cache Module
- 1.2.3.10. Optimizer
- 1.2.3.11. Table Manager
- 1.2.3.12. Table Modification Modules
- 1.2.3.13. Table Maintenance Module
- 1.2.3.14. Status Reporting Module
- 1.2.3.15. Abstracted Storage Engine Interface (Table Handler)
- 1.2.3.16. Storage Engine Implementations (MyISAM, InnoDB, MEMORY, Berkeley DB)
- 1.2.3.17. Logging Module
- 1.2.3.18. Replication Master Module
- 1.2.3.19. Replication Slave Module
- 1.2.3.20. Client/Server Protocol API
- 1.2.3.21. Low-Level Network I/O API
- 1.2.3.22. Core API
-
2. Nuts and Bolts of Working with the MySQL Source Code
- 2.1. Unix Shell
- 2.2. BitKeeper
- 2.3. Preparing the System to Build MySQL from BitKeeper Tree
- 2.4. Building MySQL from BitKeeper Tree
- 2.5. Building from Source Distribution
- 2.6. Installing MySQL into a System Directory
- 2.7. Source Code Directory Layout
- 2.8. Preparing the System to Run MySQL in a Debugger
- 2.9. Debugger-Guided Source Tour
- 2.10. Basics of Working with gdb
- 2.11. Finding Things in the Source
- 2.12. Interesting Breakpoints and Variables
- 2.13. Making a Source Modification
- 2.14. Coding Guidelines
- 2.15. Keeping Your BitKeeper Repository Up to Date
- 2.16. Submitting a Patch
- 3. Core Classes, Structures, Variables, and APIs
- 4. Client/Server Communication
-
5. Configuration Variables
- 5.1. Configuration Variables Tutorial
-
5.2. Interesting Aspects of Specific Configuration Variables
- 5.2.1. big-tables
- 5.2.2. concurrent-insert
- 5.2.3. core-file
- 5.2.4. default-storage-engine
- 5.2.5. delay-key-write
- 5.2.6. ft_stopword_file
- 5.2.7. innodb_buffer_pool_size
- 5.2.8. innodb_flush_log_at_trx_commit
- 5.2.9. innodb_file_per_table
- 5.2.10. innodb_lock_wait_timeout
- 5.2.11. innodb_force_recovery
- 5.2.12. init-file
- 5.2.13. key_buffer_size
- 5.2.14. language
- 5.2.15. log
- 5.2.16. log-bin
- 5.2.17. log-isam
- 5.2.18. log-slow-queries
- 5.2.19. max_allowed_packet
- 5.2.20. max_connections
- 5.2.21. max_heap_table_size
- 5.2.22. max_join_size
- 5.2.23. max_sort_length
- 5.2.24. myisam-recover
- 5.2.25. query_cache_type
- 5.2.26. read_buffer_size
- 5.2.27. relay-log
- 5.2.28. server-id
- 5.2.29. skip-grant-tables
- 5.2.30. skip-stack-trace
- 5.2.31. slave-skip-errors
- 5.2.32. sort_buffer_size
- 5.2.33. sql-mode
- 5.2.34. table_cache
- 5.2.35. temp-pool
- 5.2.36. transaction-isolation
- 6. Thread-Based Request Handling
- 7. The Storage Engine Interface
- 8. Concurrent Access and Locking
- 9. Parser and Optimizer
- 10. Storage Engines
- 11. Transactions
- 12. Replication
- About the Author
- Colophon
- Copyright
Product information
- Title: Understanding MySQL Internals
- Author(s):
- Release date: April 2007
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596009571
You might also like
book
Learning MySQL, 2nd Edition
Get a comprehensive overview on how to set up and design an effective database with MySQL. …
book
MySQL Cookbook, 4th Edition
For MySQL, the price of popularity comes with a flood of questions from users on how …
book
Database Internals
When it comes to choosing, using, and maintaining a database, understanding its internals is essential. But …
book
High Performance MySQL, 4th Edition
How can you realize MySQL's full power? With High Performance MySQL, you'll learn advanced techniques for …