myisam的表已经分了区,当我试图将其改为innodb时出现如下错误:CREATE TABLE ti (id INT, amount DECIMAL(7,2), tr_date DATE) ENGINE=MYISAM PARTITION BY HASH(MONTH(tr_date)) PARTITIONS 6; ALTER TABLE ti ENGINE=INNODB;
ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MySQL这说明这是不可能完成的任务还是我的alter操作的不对?
ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MySQL这说明这是不可能完成的任务还是我的alter操作的不对?
AM PARTITION BY HASH(MONTH(tr_date)) PARTITIONS 6;
Query OK, 0 rows affected (0.06 sec)mysql> ALTER TABLE ti ENGINE=INNODB;
Query OK, 0 rows affected (0.27 sec)
Records: 0 Duplicates: 0 Warnings: 0mysql> select version();
+----------------------+
| version() |
+----------------------+
| 5.1.33-community-log |
+----------------------+
1 row in set (0.00 sec)mysql>
你看看你mysql版本,估计你的版本问题
mysql> SELECT VERSION();
+----------------+
| VERSION() |
+----------------+
| 5.4.1-beta-log |
+----------------+
1 row in set (0.00 sec)用的是5.4
ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MySQL版本是5.1mysql> SELECT VERSION();
+------------+
| VERSION() |
+------------+
| 5.1.37-log |
+------------+
1 row in set (0.00 sec)
难道是我编译的时候没有加上innodb的选项?mysql> SHOW ENGINES;
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)列表没有innodb,但是确实也让建立innodb的数据表!