"Each attempt builds on last" seemingly not working.

Re: "Each attempt builds on last" seemingly not working.

by Mark Zeits -
Number of replies: 0

Eureka!  ok, so I'm posting what I've found just in case someone else runs into this problem...

Turns out that one of the mysql tables were corrupted, I found this out while trying to do a mysqldump to copy the table so I could test a later release...

mysqldump: Can't get CREATE TABLE for table `mdl_quiz_states` (Can't open file: 'mdl_quiz_states.MYI'. (errno: 145))

and so I performed the following command in mysql console...

mysql> CHECK TABLE mdl_quiz_states FAST QUICK;
+------------------------+-------+----------+-------------------------------------------------------+
| Table                  | Op    | Msg_type | Msg_text                                              |
+------------------------+-------+----------+-------------------------------------------------------+
| moodle.mdl_quiz_states | check | warning  | Table is marked as crashed                            |
| moodle.mdl_quiz_states | check | warning  | 1 client is using or hasn't closed the table properly |
| moodle.mdl_quiz_states | check | error    | Can't read key from filepos: 742400                   |
| moodle.mdl_quiz_states | check | error    | Corrupt                                               |
+------------------------+-------+----------+-------------------------------------------------------+
4 rows in set (0.03 sec)

and I applied the REPAIR TABLE command on that table....

mysql> REPAIR TABLE mdl_quiz_states;
+------------------------+--------+----------+------------------------------------------------------------------------------+
| Table                  | Op     | Msg_type | Msg_text                                                                     |
+------------------------+--------+----------+------------------------------------------------------------------------------+
| moodle.mdl_quiz_states | repair | info     | Key 1 - Found wrong stored record at 1034212                                 |
| moodle.mdl_quiz_states | repair | info     | Key 1 - Found wrong stored record at 1099756                                 |
| moodle.mdl_quiz_states | repair | info     | Key 1 - Found wrong stored record at 1102828                                 |
| moodle.mdl_quiz_states | repair | info     | Found link that points at 7277817043133631284 (outside data file) at 1102944 |
| moodle.mdl_quiz_states | repair | info     | Found link that points at 7638105010102050544 (outside data file) at 1103016 |
| moodle.mdl_quiz_states | repair | info     | Found link that points at 288230426823335807 (outside data file) at 1103040  |
| moodle.mdl_quiz_states | repair | info     | Found block with too small length at 1103352; Skipped                        |
| moodle.mdl_quiz_states | repair | info     | Found block with too small length at 1103360; Skipped                        |
| moodle.mdl_quiz_states | repair | info     | Found block with too small length at 1103448; Skipped                        |
| moodle.mdl_quiz_states | repair | info     | Found block with too small length at 1103520; Skipped                        |
| moodle.mdl_quiz_states | repair | info     | Found block with too small length at 1103528; Skipped                        |
| moodle.mdl_quiz_states | repair | warning  | Number of rows changed from 42801 to 42716                                   |
| moodle.mdl_quiz_states | repair | status   | OK                                                                           |
+------------------------+--------+----------+------------------------------------------------------------------------------+
13 rows in set (0.98 sec)

mysql> CHECK TABLE mdl_quiz_states FAST QUICK;
+------------------------+-------+----------+-----------------------------+
| Table                  | Op    | Msg_type | Msg_text                    |
+------------------------+-------+----------+-----------------------------+
| moodle.mdl_quiz_states | check | status   | Table is already up to date |
+------------------------+-------+----------+-----------------------------+
1 row in set (0.00 sec)

now everything is back to normal...