EPGRECのデータベース再構築⇒construct:Recorder_categoryTblにid=0はありません

突然ですが、epgrecで快調に録画していたのですが、突然
録画済一覧画面が、下記コメントで参照できなくなってしまいました。
construct:Recorder_categoryTblにid=0はありません
以下修復記録ですが、結局epgrecのデータベースを作り直しました。
原因調査ですが、データベース&テーブルはちゃんとありましたし
-----------------------------------------------
jose@jose-desktop:~$ mysql -u epgrec -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 489
Server version: 5.5.41-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| epgrec |
+--------------------+
2 rows in set (0.17 sec)
mysql> use epgrec;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------------+
| Tables_in_epgrec |
+----------------------+
| Recorder_categoryTbl |
| Recorder_channelTbl |
| Recorder_keywordTbl |
| Recorder_logTbl |
| Recorder_programTbl |
| Recorder_reserveTbl |
+----------------------+
6 rows in set (0.00 sec)
テーブルのチェックと修復を試みましたが
mysql> check table Recorder_categoryTbl;
+-----------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------------- -------+--------+----------+----------+
| pt2_db.Recorder_categoryTbl | repair | status | OK |
+---------------------- ------+--------+----------+----------+
1 row in set (1.24 sec)
okのようです
以下のコマンドでid=0がどこに行ってるのか探してみましたが
ありませんし、id=0のテーブルをインサートしてみましたが
最終レコード以降に追加されるだけでid=0は出来ません。
mysql> select id from Recorder_categoryTbl where id = 1;
+----+
| id |
+----+
| 1 |
+----+
1 row in set (0.02 sec)
mysql> insert into Recorder_categoryTbl(id) values(0);Query OK, 1 row affected (0.01 sec)
mysql> select id name_jp from Recorder_categoryTbl where id < 5; +---------+ | name_jp | +---------+ | 1 | | 2 | | 3 | | 4 | +---------+ 4 rows in set (0.01 sec) mysql> select id name_jp from Recorder_categoryTbl where id ;
+---------+
| name_jp |
+---------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+---------+
10 rows in set (0.00 sec)
mysql> delete from Recorder_categoryTbl where id = 9;
Query OK, 1 row affected (0.00 sec)
mysql> insert into Recorder_categoryTbl(id) values(0);
Query OK, 1 row affected (0.00 sec)
結局epgrecのDBが壊れたと判断して作り直しました
$ mysql -u -root -p
mysql>drop database epg;
mysql>create database epg;
mysql>grant all privileges on *.* to [username]@localhost identified by ‘[Password]’;
mysql>exit;
↓を実行
http://ホスト名/epgrec/install/step1.php
データベース修復後に正常状態に戻ったのを確認してDBとテーブルをチェックしましたが、
id=0は結局無いようです??
mysql> use epgrec;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------------+
| Tables_in_epgrec |
+----------------------+
| Recorder_categoryTbl |
| Recorder_channelTbl |
| Recorder_keywordTbl |
| Recorder_logTbl |
| Recorder_programTbl |
| Recorder_reserveTbl |
+----------------------+
6 rows in set (0.00 sec)
mysql> select id name_jp from Recorder_categoryTbl where id ;
+---------+
| name_jp |
+---------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
+---------+
9 rows in set (0.00 sec)
mysql>
結局原因は不明

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です