Database Reference
In-Depth Information
Operations
On a table on which a partition has been defined, the Operations subpage displays a
Partition maintenance dialog where we can:
• hoose a partition and then ask for an action such as Rebuild on it
Remove all the partitioning
C
Exporting
Finally, exporting this test table in SQL mode produces statements with embedded
comments that a MySQL 5.1 server would recognize and interpret to recreate the
same partitions.
CREATE TABLE `test` (
`id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (id)
(PARTITION p0 VALUES LESS THAN (1000) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (2000) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (3000) ENGINE = MyISAM) */;
Event scheduler
The Event Scheduler ( http://dev.mysql.com/doc/refman/5.1/en/events.
html ), another new feature of MySQL 5.1, permits the creation of tasks that will run
automatically according to a schedule. The schedule is quite flexible and permits, for
example, a statement to be run every ten seconds, starting from midnight, May 18,
2011. These can be one-time events or recurring ones.
Activating the scheduler
We should first verify whether the scheduler is active on our server. If not, we need
to activate it. Otherwise, nothing will happen! We start by typing this statement in
the query box:
SHOW VARIABLES LIKE 'event%';
 
Search WWH ::




Custom Search