ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [MariaDB] Got error 134 from storage engine
    최고일꾼/DATABASE 2018. 12. 13. 14:44

     1. 문제 발생

     1) 서비스 중인 php 프로젝트에서 특정 조건의 리스트를 조회하지 못함

     

     2) update 또한 정상적으로 처리하지 못하고 있었음

     

     3) 직접 쉘 접속하여 쿼리 실행 했을 때도 비슷한 상황, 어떤 필드를 조회 조건으로 뒀을때만 데이터 조회가 되질 않음

      - 예를 들면, A 테이블에 필드 f1, 필드 f2, 필드 f3으로 구성되어 있다면

    > select * From A;
    +------+------+------+
    | f1   | f2   | f3   |
    +------+------+------+
    | 1    | aaaa | bbbb |
    | 2    | aaaa | cccc |
    +------+------+------+
    2 rows in set (0.00 sec)

     

     

    1> select * from A where f1 = '1';
    +------+------+------+
    | f1   | f2   | f3   |
    +------+------+------+
    | 1    | aaaa | bbbb |
    +------+------+------+
    1 row in set (0.00 sec)

     

     

    2> select * from A where f2 = 'aaaa';
    Empty set (0.00 sec)

     

    3> select * from A where f2 = 'aaaa' and f3='cccc';
    Empty set (0.00 sec)

     

    4> select * from A where f3='cccc';
    +------+------+------+
    | f1   | f2   | f3   |
    +------+------+------+
    | 2    | aaaa | cccc |
    +------+------+------+
    1 row in set (0.00 sec)

     

    - 2, 3번 예시처럼 특정 필드를 조건으로 조회했을때 결과가 없는 것처럼 보인다.

       

     

     

    2. 에러 확인

     1) 해당 계정의 조회 권한에 문제?

      -> root 권한으로 접속 후 조회해도 똑같이 조회되지 않음

     

     2) 조회되지 않는 필드 데이터에 특수문자 등이 포함되어 검색되지 않았나?

      -> like 사용해서 검색해도 조회 안됨

     

     3) /var/log/mysqld.log 확인

     

    181212 15:13:37 [ERROR] /usr/libexec/mysqld: Got error 134 from storage engine
    181212 15:13:37 [ERROR] /usr/libexec/mysqld: Sort aborted
    181212 15:13:38 [ERROR] /usr/libexec/mysqld: Got error 134 from storage engine
    181212 15:13:38 [ERROR] /usr/libexec/mysqld: Sort aborted
    181212 15:13:40 [ERROR] /usr/libexec/mysqld: Got error 134 from storage engine
    181212 15:13:40 [ERROR] /usr/libexec/mysqld: Sort aborted
    181212 15:13:42 [ERROR] /usr/libexec/mysqld: Got error 134 from storage engine
    181212 15:13:42 [ERROR] /usr/libexec/mysqld: Sort aborted

     

     

     

    3. 해결

     1) 문제가 되는 테이블 복구

    > repair table A;
    +--------------------+--------+----------+------------------------------------------------------+
    | Table              | Op     | Msg_type | Msg_text                                             |
    +--------------------+--------+----------+------------------------------------------------------+
    | test.A | repair | info     | Found block that points outside data file at 1302612 |
    | test.A | repair | info     | Found block that points outside data file at 1302656 |
    | test.A | repair | warning  | Number of rows changed from 3166 to 3165             |
    | test.A | repair | status   | OK                                                   |
    +--------------------+--------+----------+------------------------------------------------------+
    4 rows in set (0.15 sec)

     

     

     

     

    명확한 원인은 파악되지 않았으나 해당 시간에 서버 장비 자체 문제로 강제 재부팅을 했었음...

     

     

     

     

     

     

     

    '최고일꾼 > DATABASE' 카테고리의 다른 글

    [MariaDB] root 비밀번호 분실시 초기화 방법  (1) 2018.01.19
Designed by Tistory.