Bug 225221 - a primary key for longdescs

David Miller justdave at bugzilla.org
Thu Oct 14 22:37:10 UTC 2004

Christopher Hicks wrote:
> On Mon, 11 Oct 2004, Joel Peshkin wrote:
>> Also, nobody is obstructing that bug, but nobody seems to have taken 
>> on the task of making the conversion code work properly.  For existing 
>> databases, it is probably necessary to first assign integers to the 
>> new field in the correct order, then identify the new field as a 
>> primary key.
> That won't work!  How can you assign integers to something you can't 
> uniquely refer to?  The simplest and most painless way to get past the 
> chicken and egg problem is by having MySQL do it (as my patches have 
> done) you end up with a primary key already filled out for you.  It 
> seems so simple yet its taken so long and folks still don't get it.  So 
> I gripe.

You missed the "in the correct order" part.  MySQL will happily assign 
them for you, but there's no guarantee they'll wind up in the order you 
expect them.  On the other hand, if there is such a guarantee, point it 
out to me in the MySQL docs and I'll change my mind. :)

Dave Miller      Project Leader, Bugzilla Bug Tracking System
http://www.justdave.net/             http://www.bugzilla.org/

More information about the developers mailing list