Index creation after table creation does not work.
Status: Beta
Brought to you by:
jhnwkmn
Creating an index after the table has been created does not work. For instance:
CREATE table `civicaddress` (
`street_no` int(11) NULL,
`street_nm` char(50) NULL,
`comm_nm` char(30) NULL,
`apt_no` char(10) NULL,
`county` char(3) NULL,
`latitude` real(11,5) NULL,
`longitude` real(11,5) NULL);
followed by
CREATE index `StreetNumberDex` on civicaddress (street_no);
produces the error:
ERROR 7 (HY000): Error on rename of \ '.\civicaddress\civicaddress.MYI' to \ '.\civicaddress\#sql2-198-1.MYI' (Errcode: 2)
Logged In: YES
user_id=722115
Originator: YES
It appears that when MySQL created the index and renames the original index file (e.g. civicaddress.MYI) to a temporary name, it has the original index file opened. On Unix it is fine to renamed an opened file, but in Symbian you cannot do that. Consequently the renaming fails and therefore also the index creation.