- #错误提示
- mysql> CREATE TABLE ts (id INT, purchased DATE) engine=myisam
- -> PARTITION BY RANGE(YEAR(purchased))
- -> SUBPARTITION BY HASH(TO_DAYS(purchased))
- -> (
- -> PARTITION p0 VALUES LESS THAN (1990)
- -> (
- -> SUBPARTITION s0a
- -> DATA DIRECTORY = '/home/bzuo/d1'
- -> INDEX DIRECTORY = '/home/bzuo/d1',
- -> SUBPARTITION s0b
- -> DATA DIRECTORY = '/home/bzuo/d2'
- -> INDEX DIRECTORY = '/home/bzuo/d2'
- -> )
- -> )
- -> ;
- ERROR 1 (HY000): Can't create/write to file '/home/bzuo/d1/ts#P#p0#SP#s0a.MYI
- 目录权限
- drwxrwxrwx 2 mysql mysql 4096 Mar 4 23:33 d1
- drwxrwxrwx 2 mysql mysql 4096 Mar 4 23:21 d2
参考手册上说是可以的。
操作系统版本:
- [****]$ lsb_release -a
- LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
- Distributor ID: CentOS
- Description: CentOS release 5.7 (Final)
- Release: 5.7
- Codename: Final
在虚拟机上做测试是成功的,文件夹权限是777如下:
- mysql> CREATE TABLE ts (id INT, purchased DATE) engine=myisam
- -> PARTITION BY RANGE(YEAR(purchased))
- -> SUBPARTITION BY HASH(TO_DAYS(purchased))
- -> (
- -> PARTITION p0 VALUES LESS THAN (1990)
- -> (
- -> SUBPARTITION s0a
- -> DATA DIRECTORY = '/home/zxy/d1'
- -> INDEX DIRECTORY = '/home/zxy/d2',
- -> SUBPARTITION s0b
- -> DATA DIRECTORY = '/home/zxy/d1'
- -> INDEX DIRECTORY = '/home/zxy/d2'
- -> )
- -> )
- -> ;
- Query OK, 0 rows affected (0.48 sec)
虚拟机操作系统版本:
- [root@localhost ~]# lsb_release -a
- LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
- Distributor ID: CentOS
- Description: CentOS release 5.7 (Final)
- Release: 5.7
- Codename: Final
对比之后发现,是操作系统的问题。64位系统下不行,32位系统下可以。64位下不行的原因还未知,有知道的指点一下。
阅读(2200) | 评论(0) | 转发(0) |