View Single Post

   
  #9 (permalink)  
Old 02-28-2008, 11:28 AM
Charles Polisher
 
Posts: n/a
Default Re: Basic MySQL MERGE table question

>CREATE TABLE `shares` ( `date` date NOT NULL, `symbol` char(20)
>default NULL, `open` decimal(10,2) default NULL, `close` decimal(10,2)
>default NULL, `adjClose` decimal(10,2) NOT NULL, `high` decimal(10,2)
>default NULL, `low` decimal(10,2) default NULL, `volume` decimal(10,2)
>default NULL, `id` int(11) NOT NULL auto_increment, INDEX(id))
>ENGINE=MRG_MyISAM UNION=(`1`, `2`, `3`, ......, `5355`) INSERT
>METHOD=LAST


>mysql> describe `shares`;
>ERROR 29 (HY000): File './securities/120.MYD' not found (Errcode: 24)


>I checked, and table `120` exists; I can run SELECTs on it, and it
>shows no obvious signs of corruption.
>
>I checked the data directory, and the files are there. See below:
>
>DTHP:/usr/local/mysql/data/securities root# ls 120\.*
>120.MYD 120.MYI 120.frm
>
>I can't see anything in table 120 that is any different from the other
>tables.


Does the problem occur if the union joins
only two tables, one of them being `120`, i.e.:
UNION=(`1`,`120`)? If that fails with the same
error, then it looks like a corrupt table.

What happens if you reverse
the order of tables `120` and `121`, i.e.:
UNION=(`1`, `2`, `3`, ..., `119`, `121`, `120`, `122`, ... `5355`)
If that moves the syntax error to table 122, then it
looks more like a bug in MySQL.

Just a thought. HTH, Charles
Reply With Quote