2008-01-04 12:06:20 +01:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
CREATE TABLE t1 (
|
|
|
|
c1 int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
c2 varchar(30) NOT NULL,
|
|
|
|
c3 smallint(5) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (c1)
|
2007-04-23 19:50:34 +02:00
|
|
|
) ENGINE = MYISAM
|
2008-01-04 12:06:20 +01:00
|
|
|
PARTITION BY HASH(c1)(
|
|
|
|
PARTITION p0
|
|
|
|
DATA DIRECTORY = 'C:/mysqltest/p0Data'
|
|
|
|
INDEX DIRECTORY = 'D:/mysqltest/p0Index',
|
|
|
|
PARTITION p1,
|
|
|
|
PARTITION p2
|
|
|
|
DATA DIRECTORY = 'E:/mysqltest/p2Data'
|
|
|
|
INDEX DIRECTORY = 'F:/mysqltest/p2Index'
|
2007-04-23 19:50:34 +02:00
|
|
|
);
|
2008-01-04 12:06:20 +01:00
|
|
|
Warnings:
|
2008-10-26 18:05:24 +01:00
|
|
|
Warning 1618 <DATA DIRECTORY> option ignored
|
|
|
|
Warning 1618 <INDEX DIRECTORY> option ignored
|
|
|
|
Warning 1618 <DATA DIRECTORY> option ignored
|
|
|
|
Warning 1618 <INDEX DIRECTORY> option ignored
|
2008-01-04 12:06:20 +01:00
|
|
|
INSERT INTO t1 VALUES (NULL, "first", 1);
|
|
|
|
INSERT INTO t1 VALUES (NULL, "second", 2);
|
|
|
|
INSERT INTO t1 VALUES (NULL, "third", 3);
|
|
|
|
ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index');
|
|
|
|
Warnings:
|
2008-10-26 18:05:24 +01:00
|
|
|
Warning 1618 <DATA DIRECTORY> option ignored
|
|
|
|
Warning 1618 <INDEX DIRECTORY> option ignored
|
2008-01-04 12:06:20 +01:00
|
|
|
INSERT INTO t1 VALUES (NULL, "last", 4);
|
|
|
|
DROP TABLE t1;
|