Chapter 5. Configuration Variables

Much can be learned about the internal workings of MySQL server by studying its configuration variables. In some cases, the very existence of a variable with a certain name tells a story. For example, key_buffer_size reveals that MySQL uses a key cache. query_cache_size suggests that the server can cache the results of a query to avoid unnecessary work when it is run repeatedly without any modifications to the tables that it references. innodb_flush_log_at_trx_commit suggests that the InnoDB storage engine supports transactions, and may optionally not write out its transaction log to disk on every commit. slave_compressed_protocol reveals that MySQL supports replication with a slave that can request that the data transfer be compressed.

Other option names are perhaps not as self-explanatory, but you will learn a lot by asking yourself why that option exists, and studying the source to find out how the different settings affect the behavior.

MySQL has over 200 different options. Every one of them tells a story. Some reveal the presence of a feature. Some show the richness of MySQL optimization algorithms. Some demonstrate MySQL’s ability to self-administer. Some are there because some platform-specific bug needed to be tracked down or worked around at some point. Others exist just to allow the user to choose a file or a directory used for some internal operation, but their very existence permits us to take a peek at what MySQL is doing behind the ...

Get Understanding MySQL Internals now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.