Browsing all articles tagged with fix
Jan
9

Tip: MySQL Replication Error: Duplicate Entry for Key

I have encountered this error, which to my surprise occurred on a slave database.

error 'Duplicate entry '2355476' for key 1' on query ' INSERT INTO logs (DateStamp) VALUES (NOW())

You might be wondering how a slave database could have a duplicate entry while the master and other slaves are running just fine?

Some say that there could be an entry where it was written in the slave and then written again so the duplicate error occurred. Others say that if myisamchk was run in the master, it removed some entries and tries to create those entries again. The slave then attempts to write the same entry, but since myisamchk was not executed on the slave, the entry exists hence the duplication error.

But luckily, found myself a solution to fix the replication error:

mysql> set sql_slave_skip_counter = 1;
Query OK, 0 rows affected (0.01 sec)

mysql> slave start;
Query OK, 0 rows affected (0.00 sec)

This will skip the error and continue on with the replication. Do not forget to start the slave process afterwards.

Jul
20

Quoting Linus Torvalds – OpenBSD Crowd is a Bunch of Monkeys

Here is an excerpt from Linus Torvalds that should keep everyone involved in Open Source communities moving. Once again, a lovely quote from Linus himself:

From: Linus Torvalds linux-foundation.org>
Subject: Re: [stable] Linux 2.6.25.10
Newsgroups: gmane.linux.kernel
Date: 2008-07-15 16:13:03 GMT (4 days, 17 hours and 27 minutes ago)

On Tue, 15 Jul 2008, Linus Torvalds wrote:
>
> So as far as I’m concerned, “disclosing” is the fixing of the bug. It’s
> the “look at the source” approach.

Btw, and you may not like this, since you are so focused on security, one
reason I refuse to bother with the whole security circus is that I think
it glorifies – and thus encourages – the wrong behavior.

It makes “heroes” out of security people, as if the people who don’t just
fix normal bugs aren’t as important.

In fact, all the boring normal bugs are _way_ more important, just because
there’s a lot more of them. I don’t think some spectacular security hole
should be glorified or cared about as being any more “special” than a
random spectacular crash due to bad locking.

Security people are often the black-and-white kind of people that I can’t
stand. I think the OpenBSD crowd is a bunch of masturbating monkeys, in
that they make such a big deal about concentrating on security to the
point where they pretty much admit that nothing else matters to them.

To me, security is important. But it’s no less important than everything
*else* that is also important!

Linus

Thanks to http://article.gmane.org/gmane.linux.kernel/706950