Re: Duplicate entry '0' for key 'PRIMARY'

From: Thomas 'PointedEars' Lahn <PointedEars_at_web.de>
Date: Mon, 17 Apr 2017 02:00:49 +0200
Message-ID: <6449792.kCxxNLbqBE_at_PointedEars.de>


Peter H. Coffin wrote:

> On Sat, 15 Apr 2017 19:33:01 +0200, Thomas 'PointedEars' Lahn wrote:

>> But they SHOULD NOT be related in this case in any practical sense of
>> the word. There SHOULD NOT be any records in the first table referring
>> to the second one because the second one is EMPTY. (Foreign key
>> constraints can make sure of that in operation, but not with MyISAM;
>> InnoDb is recommended.)

>
> Remember the original post.

I do (and it appears that I am one of the few people who does). It was:

| I get this error when I try to read data into an empty table from a | dumpfile.sql Anyone can help please? Thanks in advance

(sic)

> This is not a everyday load.

Did I say or imply that it were? And why would that be relevant to what I said?

> This is a restoration from a dump.

Of a table.

> Even though the rows are not in the table yet, they represent a state of a
> database,

You must be referring to another OP, then. From the information given in the OP that I quoted above, I can only say with certainty that they represent the state of a _table_.

> very likely with proper interrelationships set up.

Fallacy: Appeal to probability.

There is no good reason to assume that there are any “interrelationships” in the first place. Because it is possible that a primary key constraint was defined for the target table merely out of habit or recommendation (for *future* use), or to establish uniqueness of field values.

> Though clearly Something Happened that this restore is not going smoothly,
> but my answer actually addresses that.

Fallacy: Slippery slope.

You are jumping to a lot of conclusions here, allowing the experience, that you might have, to cloud your judgement.

What is your point anyway?

-- 
PointedEars

Twitter: _at_PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
Received on Mon Apr 17 2017 - 02:00:49 CEST

Original text of this message