InnoDB Plugin 1.0 for MySQL 5.1 User’s Guide

Abstract

This is the User’s Guide for InnoDB Plugin 1.0.8 for MySQL 5.1.

Starting with version 5.1, MySQL AB has promoted the idea of a pluggable storage engine architecture , which permits multiple storage engines to be added to MySQL. Beginning with MySQL version 5.1, it is possible for users to swap out one version of InnoDB and use another. The pluggable storage engine architecture also permits Innobase Oy to release new versions of InnoDB containing bug fixes and new features independently of the release cycle for MySQL.

This User’s Guide documents the installation and removal procedures and the additional features of the InnoDB Plugin 1.0.8 for MySQL 5.1.

WARNING: Because the InnoDB Plugin introduces a new file format, restrictions apply to the use of a database created with the InnoDB Plugin with earlier versions of InnoDB, when using mysqldump or MySQL replication and if you use the InnoDB Hot Backup utility. See Section 1.5, “Operational Restrictions”.

For legal information, see the Legal Notices.

Document generated on: 2012-12-08 (revision: 33432)


Table of Contents

Preface and Legal Notices
1. Introduction to the InnoDB Plugin
1.1. Overview
1.2. Features of the InnoDB Plugin
1.3. Obtaining and Installing the InnoDB Plugin
1.4. Viewing the InnoDB Plugin Version Number
1.5. Operational Restrictions
2. Fast Index Creation in the InnoDB Storage Engine
2.1. Overview of Fast Index Creation
2.2. Examples
2.3. Implementation
2.4. Concurrency Considerations
2.5. Crash Recovery
2.6. Limitations
3. InnoDB Data Compression
3.1. Overview of Table Compression
3.2. Enabling Compression for a Table
3.2.1. Configuration Parameters for Compression
3.2.2. SQL Compression Syntax Warnings and Errors
3.3. Tuning InnoDB Compression
3.3.1. When to Use Compression
3.3.2. Monitoring Compression at Runtime
3.4. How Compression Works in InnoDB
3.4.1. Compression Algorithms
3.4.2. InnoDB Data Storage and Compression
3.4.3. Compression and the InnoDB Buffer Pool
3.4.4. Compression and the InnoDB Log Files
4. InnoDB File-Format Management
4.1. Overview of InnoDB File Formats
4.2. Named File Formats
4.3. Enabling File Formats
4.4. File Format Compatibility
4.4.1. Startup File Format Compatibility Checking
4.4.2. Table-Access File Format Compatibility Checking
4.5. Identifying the File Format in Use
4.6. Downgrading the File Format
4.7. Future InnoDB File Formats
5. Storage of Variable-Length Columns
5.1. Overview
5.2. COMPACT and REDUNDANT Row Formats
5.3. DYNAMIC Row Format
5.4. Specifying a Table’s Row Format
6. InnoDB INFORMATION_SCHEMA Tables
6.1. Overview of InnoDB Support in INFORMATION_SCHEMA
6.2. Information Schema Tables about Compression
6.2.1. INNODB_CMP and INNODB_CMP_RESET
6.2.2. INNODB_CMPMEM and INNODB_CMPMEM_RESET
6.2.3. Using the Compression Information Schema Tables
6.3. Information Schema Tables about Transactions
6.3.1. INNODB_TRX
6.3.2. INNODB_LOCKS
6.3.3. INNODB_LOCK_WAITS
6.3.4. Using the Transaction Information Schema Tables
6.4. Notes on Locking in InnoDB
6.4.1. Understanding InnoDB Locking
6.4.2. Rapidly Changing Internal Data
6.4.3. Possible Inconsistency with PROCESSLIST
7. Performance and Scalability Enhancements
7.1. Overview
7.2. Faster Locking for Improved Scalability
7.3. Using Operating System Memory Allocators
7.4. Controlling InnoDB Insert Buffering
7.5. Controlling Adaptive Hash Indexing
7.6. Changes Regarding Thread Concurrency
7.7. Changes in the Read Ahead Algorithm
7.8. Multiple Background I/O Threads
7.9. Group Commit
7.10. Controlling the Master Thread I/O Rate
7.11. Controlling the Flushing Rate of Dirty Pages
7.12. Using the PAUSE instruction in InnoDB spin loops
7.13. Control of Spin Lock Polling
7.14. Making Buffer Cache Scan Resistant
7.14.1. Guidelines for innodb_old_blocks_pct and innodb_old_blocks_time
7.15. Improvements to Crash Recovery Performance
8. Changes for Flexibility, Ease of Use and Reliability
8.1. Overview
8.2. Enabling New File Formats
8.3. Dynamic Control of System Configuration Parameters
8.3.1. Dynamically Changing innodb_file_per_table
8.3.2. Dynamically Changing innodb_stats_on_metadata
8.3.3. Dynamically Changing innodb_lock_wait_timeout
8.3.4. Dynamically Changing innodb_adaptive_hash_index
8.4. TRUNCATE TABLE Reclaims Space
8.5. InnoDB Strict Mode
8.6. Controlling Optimizer Statistics Estimation
8.7. Better Error Handling when Dropping Indexes
8.8. More Compact Output of SHOW ENGINE INNODB MUTEX
8.9. More Read Ahead Statistics
9. Installing the InnoDB Plugin
9.1. Overview of Installing the InnoDB Plugin
9.2. Checking for Compatible Version Levels
9.3. Installing the Precompiled InnoDB Plugin as a Shared Library
9.3.1. Installing the InnoDB Plugin as a Shared Library on Unix or Linux
9.3.2. Installing the Binary InnoDB Plugin as a Shared Library on Microsoft Windows
9.3.3. Errors When Installing the InnoDB Plugin on Microsoft Windows
9.4. Building the InnoDB Plugin from Source Code
9.4.1. Building the InnoDB Plugin on Linux or Unix
9.4.2. Building the InnoDB Plugin on Microsoft Windows
9.5. Configuring the InnoDB Plugin
9.6. Frequently Asked Questions about Plugin Installation
9.6.1. Should I use the InnoDB-supplied plugin or the one that is included with MySQL 5.1.38 or higher?
9.6.2. Why doesn't the MySQL service on Windows start after the replacement?
9.6.3. The Plugin is installed... now what?
9.6.4. Once the Plugin is installed, is it permanent?
10. Upgrading the InnoDB Plugin
10.1. Upgrading the Dynamic InnoDB Plugin
10.2. Upgrading a Statically Built InnoDB Plugin
10.3. Converting Compressed Tables Created Before Version 1.0.2
11. Downgrading from the InnoDB Plugin
11.1. Overview
11.2. The Built-in InnoDB, the Plugin and File Formats
11.3. How to Downgrade
11.3.1. Converting Tables
11.3.2. Adjusting the Configuration
11.3.3. Uninstalling a Dynamic Library
11.3.4. Uninstalling a Statically Built InnoDB Plugin
11.4. Possible Problems
11.4.1. Accessing COMPRESSED or DYNAMIC Tables
11.4.2. Issues with UNDO and REDO
11.4.3. Issues with the Doublewrite Buffer
11.4.4. Issues with the Insert Buffer
12. InnoDB Plugin Change History
12.1. Changes in InnoDB Plugin 1.0.9 and Higher
12.2. Changes in InnoDB Plugin 1.0.8 (May, 2010)
12.3. Changes in InnoDB Plugin 1.0.7 (April, 2010)
12.4. Changes in InnoDB Plugin 1.0.6 (November 27, 2009)
12.5. Changes in InnoDB Plugin 1.0.5 (November 18, 2009)
12.6. Changes in InnoDB Plugin 1.0.4 (August 11, 2009)
12.7. Changes in InnoDB Plugin 1.0.3 (March 11, 2009)
12.8. Changes in InnoDB Plugin 1.0.2 (December 1, 2008)
12.9. Changes in InnoDB Plugin 1.0.1 (May 8, 2008)
12.10. Changes in InnoDB Plugin 1.0.0 (April 15, 2008)
A. Third-Party Software
A.1. Performance Patches from Google
A.2. Multiple Background I/O Threads Patch from Percona
A.3. Performance Patches from Sun Microsystems
B. Using the InnoDB Plugin with MySQL 5.1.30 or Earlier
C. List of Parameters Changed in the InnoDB Plugin 1.0
C.1. New Parameters
C.2. Deprecated Parameters
C.3. Parameters with New Defaults
D. InnoDB Glossary
Index

List of Tables

3.1. Meaning of CREATE TABLE and ALTER TABLE Options
3.2. CREATE/ALTER TABLE Warnings and Errors when InnoDB Strict Mode is OFF
4.1. InnoDB Data File Compatibility and Related InnoDB Parameters
6.1. Columns of INNODB_CMP and INNODB_CMP_RESET
6.2. Columns of INNODB_CMPMEM and INNODB_CMPMEM_RESET
6.3. INNODB_TRX Columns
6.4. INNODB_LOCKS Columns
6.5. INNODB_LOCK_WAITS Columns
7.1. Changes to innodb_thread_concurrency
9.1. InnoDB Plugin Compatibility
C.1. InnoDB Plugin New Parameter Summary
C.2. InnoDB Plugin Parameters with New Defaults

List of Examples

6.1. Using the Compression Information Schema Tables
6.2. Identifying Blocking Transactions
6.3. More Complex Example of Transaction Data in Information Schema Tables