MySQL partition tables have their own limitations. The following describes the restrictions on Functions of MySQL partition tables. If you are interested in MySQL partition tables, take a look.
MySQL Partition Table restrictions on Functions
In the statement for creating a partition table in mysql5.1, a MySQL Partition Table can only contain the following functions:
ABS ()
CEILING () and FLOOR () when using these two functions to create a partition table, the premise is that the partition key of the function is INT type), such
- mysql> CREATE TABLE t (c FLOAT) PARTITION BY LIST( FLOOR(c) )(
- -> PARTITION p0 VALUES IN (1,3,5),
- -> PARTITION p1 VALUES IN (2,4,6)
- -> );;
- ERROR 1491 (HY000): The PARTITION function returns the wrong type
-
- mysql> CREATE TABLE t (c int) PARTITION BY LIST( FLOOR(c) )(
- -> PARTITION p0 VALUES IN (1,3,5),
- -> PARTITION p1 VALUES IN (2,4,6) -> );
- Query OK, 0 rows affected (0.01 sec)
-
DAY ()
DAYOFMONTH ()
DAYOFWEEK ()
DAYOFYEAR ()
DATEDIFF ()
EXTRACT ()
HOUR ()
MICROSECOND ()
MINUTE ()
MOD ()
MONTH ()
QUARTER ()
SECOND ()
TIME_TO_SEC ()
TO_DAYS ()
WEEKDAY ()
YEAR ()
YEARWEEK ()
Advantages and disadvantages of MySQL row-Level Lock
In-depth discussion on MySQL Lock Mechanism
Enumeration in the MySQL Field
MySQL Field Length
Provides you with an in-depth understanding of MySQL index types