The world's most popular open source database
The following features have been added to MySQL 5.1.
This capability enables distributing portions of
individual tables across a file system, according to rules
which can be set when the table is created. In effect,
different portions of a table are stored as separate
tables in different locations, but from the user point of
view, the partitioned table is still a single table.
Syntactically, this implements a number of new extensions
ALTER TABLE, and
EXPLAIN ... SELECT statements. As of
MySQL 5.1.6, queries against partitioned tables can take
advantage of partition pruning. In
some cases, this can result in query execution that is an
order of magnitude faster than the same query against a
nonpartitioned version of the same table. See
Chapter 18, Partitioning, for further information on
this functionality. (Author: Mikael Ronström)
Row-based replication. Replication capabilities in MySQL originally were based on propagation of SQL statements from master to slave. This is called statement-based replication. As of MySQL 5.1.5, another basis for replication is available. This is called row-based replication. Instead of sending SQL statements to the slave, the master writes events to its binary log that indicate how individual table rows are effected. As of MySQL 5.1.8, a third option is available: mixed. This will use statement-based replication by default, and only switch to row-based replication in particular cases. See Section 16.1.2, “Replication Formats”. (Authors: Lars Thalmann, Guilhem Bichot, Mats Kindahl)
Plugin API. MySQL 5.1 adds support for a very flexible plugin API that enables loading and unloading of various components at runtime, without restarting the server. Although the work on this is not finished yet, plugin full-text parsers are a first step in this direction. This allows users to implement their own input filter on the indexed text, enabling full-text search capability on arbitrary data such as PDF files or other document formats. A pre-parser full-text plugin performs the actual parsing and extraction of the text and hands it over to the built-in MySQL full-text search. See Section 22.2, “The MySQL Plugin Interface”. (Author: Sergey Vojtovich)
MySQL Events are tasks that run according to a schedule.
When you create an event, you are creating a named
database object containing one or more SQL statements to
be executed at one or more regular intervals, beginning
and ending at a specific date and time. Conceptually, this
is similar to the idea of the Unix
crontab (also known as a “cron
job”) or the Windows Task Scheduler. See
Section 19.4, “Using the Event Scheduler”. (Author: Andrey Hristov)
Server log tables.
Before MySQL 5.1, the server writes general query log and
slow query log entries to log files. As of MySQL 5.1, the
server's logging capabilities for these logs are more
flexible. Log entries can be written to log files (as
before) or to the
slow_log tables in the
mysql database. If logging is enabled,
either or both destinations can be selected. The
controls the destination or destinations of log output.
See Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”. (Author: Petr Chardin)
Upgrade program. The mysql_upgrade program (available as of MySQL 5.1.7) checks all existing tables for incompatibilities with the current version of MySQL Server and repairs them if necessary. This program should be run for each MySQL upgrade. See Section 4.4.8, “mysql_upgrade — Check Tables for MySQL Upgrade”. (Authors: Alexey Botchkov, Mikael Widenius)
MySQL Cluster is now released as a separate product, based
on MySQL 5.1 but with the addition of the
NDBCLUSTER storage engine.
Clustering support is no longer available in mainline
MySQL 5.1 releases. MySQL Cluster releases are identified
by a 3-part NDB version number; currently, the MySQL
Cluster NDB 6.2 and MySQL Cluster NDB 6.3 release series
are available for production use.
Some of the changes in MySQL Cluster since MySQL 5.0 are listed here:
MySQL Cluster replication. Replication between MySQL Clusters is now supported. It is now also possible to replicate between a MySQL Cluster and a noncluster database. See Section 17.6, “MySQL Cluster Replication”.
MySQL Cluster disk data storage.
engine was strictly in-memory; now, it is possible
to store Cluster data (but not indexes) on disk.
This allows MySQL Cluster to scale upward with fewer
hardware (RAM) requirements than previously. In
addition, the Disk Data implementation includes a
new “no-steal” restoration algorithm
for fast node restarts when storing very large
amounts of data (terabyte range). See
Section 17.5.9, “MySQL Cluster Disk Data Tables”, for more
Improved backups for MySQL Cluster. A fault arising in a single data node during a Cluster backup no longer causes the entire backup to be aborted, as occurred in previous versions of MySQL Cluster.
Many other new features and improvements have been made to
NDBCLUSTER storage engine
in MySQL Cluster NDB 6.2 and MySQL Cluster NDB 6.3; for more
information about these, see
Section 17.1.4, “MySQL Cluster Development Roadmap”.
MySQL 5.1 provides much more information in its metadata
database than was available in MySQL 5.0. New tables in
INFORMATION_SCHEMA database include
XML functions with XPath support.
ExtractValue() returns the
content of a fragment of XML matching a given XPath
replaces the element selected from a fragment of XML by an
XPath expression supplied by the user with a second XML
fragment (also user-supplied), and returns the modified
XML. See Section 11.10, “XML Functions”. (Author:
Load emulator. The mysqlslap program is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients were accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. (Authors: Patrick Galbraith, Brian Aker)