ERROR 1016 (HY000) at line: Can't open file: './test/Tablename.frm' (errno: 24)
Hi,
I am unable to use partition in mysql script
for example say
CREATE TABLE XYZTable
(
, Info INTEGER
, Id INTEGER
, sId INTEGER
, Id INTEGER
, aId INTEGER
, status INTEGER
CONSTRAINT XYZTablePRIMARY KEY (Info )
)TABLESPACE ABC
partition by range( Info)
(
partition pm_min_00 values less than (1)
, partition pm_min_01 values less than (2)
,partition pm_min_23 values less than (24)
) ;
This works perfectly fine when I type in the mysql prompt but if I use this in mysql script
consider file XYZTable.sql
#XYZTable.sql start
CREATE TABLE XYZTable
(
, Info INTEGER
, Id INTEGER
, sId INTEGER
, Id INTEGER
, aId INTEGER
, status INTEGER
CONSTRAINT XYZTablePRIMARY KEY (Info )
)TABLESPACE ABC
partition by range( Info)
(
partition pm_min_00 values less than (1)
, partition pm_min_01 values less than (2)
,partition pm_min_23 values less than (24)
) ;
#XYZTable.sql end
when I execute the above through shell script
mysql -f test < XYZTable.sql
I am getting the error
ERROR 1016 (HY000) at line: Can't open file: './test/XYZTable.frm' (errno: 24)
Its really strange it works from mysql prompt but not in mysql script, I have even checked all the environment variable.
Thanks in advance
regards
Vikas