# Tokudb BUG ? ERROR 1034 (HY000): Incorrect key file for table 'mytable'

**URL:** <https://forums.percona.com/t/tokudb-bug-error-1034-hy000-incorrect-key-file-for-table-mytable/6141>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [January 19, 2018, 11:05pm UTC](https://forums.percona.com/t/tokudb-bug-error-1034-hy000-incorrect-key-file-for-table-mytable/6141 "2018-01-19T23:05:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![louishust](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@louishust](https://forums.percona.com/u/louishust)\
**Post date:** [January 19, 2018, 11:05pm UTC](https://forums.percona.com/t/tokudb-bug-error-1034-hy000-incorrect-key-file-for-table-mytable/6141/1 "2018-01-19T23:05:26Z")

</div>

Server version: 5.7.20-18-log Percona Server (GPL), Release 18, Revision 7ce54a6deef

Table info:

CREATE TABLE `mytable` (  
`ID` varchar(500) NOT NULL,  
`c1` varchar(30) DEFAULT NULL,  
`c2` datetime DEFAULT NULL,  
`c3` datetime DEFAULT NULL,  
`UPDATE_TIME` datetime DEFAULT NULL,  
`c4` datetime NOT NULL,  
`col1` decimal(4,0) DEFAULT NULL,  
`col2` decimal(2,0) DEFAULT NULL,  
`col3` decimal(2,0) DEFAULT NULL,  
`col4` decimal(2,0) DEFAULT NULL,  
`col5` decimal(2,0) DEFAULT NULL,  
`col6` varchar(9) NOT NULL,  
`col7` decimal(6,0) DEFAULT NULL,  
`col8` decimal(6,0) DEFAULT NULL,  
`col9` decimal(6,0) DEFAULT NULL,  
`col10` decimal(6,0) DEFAULT NULL,  
PRIMARY KEY (`id`),  
KEY `D_UPDATE_TIME` (`UPDATE_TIME`) USING BTREE  
) ENGINE=TokuDB DEFAULT CHARSET=utf8

When execute following query:

select \* from mytable where update\_time \< ‘2018-01-11 07:35:02’ limit 1;  
ERROR 1034 (HY000): Incorrect key file for table ‘mytable’; try to repair it.

FYI:

There is enough space on all my disk. The default txn isolation is RC.

Please tell me why this happend and how to repair it?

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [January 21, 2018, 7:17pm UTC](https://forums.percona.com/t/tokudb-bug-error-1034-hy000-incorrect-key-file-for-table-mytable/6141/2 "2018-01-21T19:17:15Z")

</div>

Do you have anything in the Error Logs ?

---

<div class="post-metadata">

**Author:** ![George\_Lorch](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/george_lorch/32/1108_2.png) [@George\_Lorch](https://forums.percona.com/u/George_Lorch)\
**Post date:** [January 22, 2018, 9:51am UTC](https://forums.percona.com/t/tokudb-bug-error-1034-hy000-incorrect-key-file-for-table-mytable/6141/3 "2018-01-22T09:51:59Z")

</div>

TokuDB does not emit that error. InnoDB, MyISAM and the server code appears to though. It is probably a problem with some system table.
