1.
QUERY : SELECT * FROM tableName WHERE step_id=0 AND section_id=1 AND seq_num=1 AND r_date='20070730'
MYSQL ERROR : 1194 - Table 'tableName' is marked as crashed and should be repaired
2.
QUERY : INSERT INTO tableName VALUES (0,1,1,'20070730',0)
MYSQL ERROR : 1062 - Duplicate entry '0-1-1-20070730' for key 1
C 프로그램에서 1번과 같은 query로 해당 데이터가 존재하는지 확인 한 후
존재할 경우 UPDATE query를, 존재하지 않을 경우 INSERT query를 실행하게 프로그램했습니다.
해당 query는 socket통신으로 데이터가 올라올 때 마다 실행되고요..
어느날부터 2번의 오류가 나기 시작했습니다. 데이터를 한꺼번에 빠른 속도로 많이 올린 경우에 발생했습니다.
그 이후로 계속 업데이트가 안되더니 1번의 오류까지 나기 시작했습니다.
2번 오류는 lock unlock 그런게 안맞아서 그런건가..라는 추측도 해보았지만
1번 오류는 처음보는 것이라 어찌해야할지 모르겠네요
현재 mysql database에서 직접 query를 실행해도 report_info table은 읽혀지지 않습니다.
깨진것 같은데 어떻게 복원해야할지 모르겠네요 ㅠ_ㅠ
혹시 이런 경우 어떻게 처리해야하는지, 왜 이런 에러가 발생하는지 아시는 분..조언 부탁드립니다.
인터넷 검색으로 찾아서 다음 명령은 내렸는데 복원이 안되네요..
mysql> repair table tableName; //"tableName"는 오류가 생긴 테이블 입니다.
mysql>analyze table tableName;를 실행하면 테이블에 대한 보고서가 작성됩니다.
mysql>repair table tableName;를 실행하면 복원이 됩니다.
다음은 MySQL err log입니다.
070730 15:23:27 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Incorrect key file for table './axmds10_sys/report_info.MYI'; try to repair it
070730 15:25:35 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Incorrect key file for table './axmds10_sys/report_info.MYI'; try to repair it
070730 16:07:36 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Incorrect key file for table './axmds10_sys/report_info.MYI'; try to repair it
070730 18:03:29 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Incorrect key file for table './axmds10_sys/report_info.MYI'; try to repair it
070730 21:12:12 [ERROR] Got error 127 when reading table './axmds10_sys/report_info'
070730 21:37:41 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Sort aborted
070731 11:13:19 [Note] Retrying repair of: './axmds10_sys/report_info' with keycache
070731 11:14:15 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:14:15 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:14:38 [Note] Retrying repair of: './axmds10_sys/report_info' with keycache
070731 11:14:48 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:14:48 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:19:31 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:19:31 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:19:43 [Note] Retrying repair of: './axmds10_sys/report_info' with keycache
070731 11:20:07 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
070731 11:20:07 [ERROR] /usr/local/mysql-enterprise-5.0.36-solaris10-sparc/bin/mysqld: Table './axmds10_sys/report_info' is marked as crashed and last (automatic?) repair failed
|