Effects on REPLACE statements by modification of primary keys.  It can be desirable in some cases (see Section 24.6.1, “Partitioning Keys, Primary Keys, and Unique Keys” ) to modify a table’s primary key. Be aware that, if your application uses REPLACE  statements and you do this, the results of these statements can be drastically altered. See Section 13.2.9, “REPLACE Statement” , for more information and an example. 

## FULLTEXT indexes. 

Partitioned tables do not support FULLTEXT  indexes or searches. 

Spatial columns.  Columns with spatial data types such as POINT  or GEOMETRY  cannot be used in partitioned tables. 

## Temporary tables. 

Temporary tables cannot be partitioned. 

Log tables.  It is not possible to partition the log tables; an ALTER TABLE ... PARTITION BY ... statement on such a table fails with an error. 

## Data type of partitioning key. 

A partitioning key must be either an integer column or an expression that resolves to an integer. Expressions employing ENUM  columns cannot be used. The column or expression value may also be NULL ; see Section 24.2.7, “How MySQL Partitioning Handles NULL” . 

There are two exceptions to this restriction: 

1. When partitioning by [ LINEAR ] KEY , it is possible to use columns of any valid MySQL data type other than TEXT  or BLOB  as partitioning keys, because the internal key-hashing functions produce the correct data type from these types. For example, the following two CREATE TABLE  statements are valid: 

CREATE TABLE tkc (c1 CHAR) PARTITION BY KEY(c1) PARTITIONS 4; CREATE TABLE tke ( c1 ENUM(’red’, ’orange’, ’yellow’, ’green’, ’blue’, ’indigo’, ’violet’) ) PARTITION BY LINEAR KEY(c1) PARTITIONS 6; 

2. When partitioning by RANGE COLUMNS  or LIST COLUMNS , it is possible to use string, DATE , and DATETIME  columns. For example, each of the following CREATE TABLE  statements is valid: 

CREATE TABLE rc (c1 INT, c2 DATE) PARTITION BY RANGE COLUMNS(c2) ( PARTITION p0 VALUES LESS THAN(’1990-01-01’), PARTITION p1 VALUES LESS THAN(’1995-01-01’), PARTITION p2 VALUES LESS THAN(’2000-01-01’), PARTITION p3 VALUES LESS THAN(’2005-01-01’), PARTITION p4 VALUES LESS THAN(MAXVALUE) ); CREATE TABLE lc (c1 INT, c2 CHAR(1)) PARTITION BY LIST COLUMNS(c2) ( PARTITION p0 VALUES IN(’a’, ’d’, ’g’, ’j’, ’m’, ’p’, ’s’, ’v’, ’y’), PARTITION p1 VALUES IN(’b’, ’e’, ’h’, ’k’, ’n’, ’q’, ’t’, ’w’, ’z’), PARTITION p2 VALUES IN(’c’, ’f’, ’i’, ’l’, ’o’, ’r’, ’u’, ’x’, NULL) ); 

Neither of the preceding exceptions applies to BLOB  or TEXT  column types. 

## Subqueries. 

A partitioning key may not be a subquery, even if that subquery resolves to an integer value or NULL . 

