Open GoogleCodeExporter opened 9 years ago
On further investigation, I've noticed that the id column values in the
status_variables table are going up in increments of 2:
mysql> SELECT id, questions, uptime, warning_count, ts FROM status_variables;
+----+-----------+---------+---------------+---------------------+
| id | questions | uptime | warning_count | ts |
+----+-----------+---------+---------------+---------------------+
| 2 | 241039414 | 1281504 | 0 | 2012-11-02 16:20:01 |
| 4 | 241101176 | 1281804 | 0 | 2012-11-02 16:25:01 |
| 6 | 241152461 | 1282105 | 0 | 2012-11-02 16:30:01 |
| 8 | 241205392 | 1282405 | 0 | 2012-11-02 16:35:01 |
| 10 | 241258591 | 1282705 | 0 | 2012-11-02 16:40:01 |
| 12 | 241307251 | 1283005 | 0 | 2012-11-02 16:45:02 |
| 14 | 241354124 | 1283305 | 0 | 2012-11-02 16:50:01 |
| 16 | 241409544 | 1283605 | 0 | 2012-11-02 16:55:01 |
| 18 | 241459330 | 1283905 | 0 | 2012-11-02 17:00:01 |
| 20 | 241501222 | 1284205 | 0 | 2012-11-02 17:05:01 |
| 22 | 241533573 | 1284416 | 0 | 2012-11-02 17:08:32 |
| 24 | 241546994 | 1284505 | 0 | 2012-11-02 17:10:02 |
| 26 | 241587962 | 1284805 | 0 | 2012-11-02 17:15:01 |
| 28 | 241625703 | 1285105 | 0 | 2012-11-02 17:20:01 |
| 30 | 241737556 | 1285405 | 0 | 2012-11-02 17:25:01 |
| 32 | 241957674 | 1285463 | 0 | 2012-11-02 17:25:59 |
| 34 | 242606395 | 1285705 | 0 | 2012-11-02 17:30:01 |
| 36 | 242641726 | 1286005 | 0 | 2012-11-02 17:35:01 |
| 38 | 242684817 | 1286305 | 0 | 2012-11-02 17:40:01 |
| 40 | 242728618 | 1286605 | 0 | 2012-11-02 17:45:01 |
| 42 | 242768757 | 1286905 | 0 | 2012-11-02 17:50:01 |
| 44 | 242812363 | 1287205 | 0 | 2012-11-02 17:55:01 |
| 46 | 242865670 | 1287506 | 0 | 2012-11-02 18:00:02 |
| 48 | 242930967 | 1287805 | 0 | 2012-11-02 18:05:01 |
| 50 | 242987217 | 1288105 | 0 | 2012-11-02 18:10:01 |
| 52 | 243038891 | 1288405 | 0 | 2012-11-02 18:15:01 |
| 54 | 243224104 | 1288706 | 0 | 2012-11-02 18:20:01 |
+----+-----------+---------+---------------+---------------------+
27 rows in set (0.00 sec)
I'm assuming this is why sv_diff is returning no results, as I believe it works
by joining the table onto itself, with a rule something like id=(id-1)?
Original comment by ale...@viovet.co.uk
on 2 Nov 2012 at 6:24
Okay. I've found the cause, and it's obviously not a bug with mycheckpoint -
the monitoring server had the auto_increment_offset and
auto_increment_increment variables set to 2, from a time when the server was
previously being used for replication.
It could be a good feature to alert the user if this is the case, as any
auto_increment value over 1 is a showstopper as far as reporting goes. Either
that, or perhaps avoid relying on auto_increment?
Luckily fixing my logged history was as simple as:
UPDATE status_variables SET id=id/2 ORDER BY id ASC;
... and then resetting the auto_increment counter for the table to the next
value.
Original comment by ale...@viovet.co.uk
on 2 Nov 2012 at 6:51
Original issue reported on code.google.com by
ale...@viovet.co.uk
on 2 Nov 2012 at 5:16