[OT] mySQL weirdness

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[OT] mySQL weirdness

Lee Glickenhaus
This is a new one.

Importing data into mySQL.  Every time I try, I get an error of "Duplicate
entry '127' for Key 1"  (that's the auto-increment id field)

When I try to manually add records, I get the same thing.  It
auto-increments up to 127 and then just keeps entering 127 for all
subsequent records.  Tried repairing the table and all that.

Never seen this behavior -- any ideas?

lee




--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [OT] mySQL weirdness

Brett Harvey
sounds like the field is of the wrong type some how.

It should be a Bit INT or something like that.

Sounds like that field is a TinyInt

>This is a new one.
>
>Importing data into mySQL.  Every time I try, I get an error of "Duplicate
>entry '127' for Key 1"  (that's the auto-increment id field)
>
>When I try to manually add records, I get the same thing.  It
>auto-increments up to 127 and then just keeps entering 127 for all
>subsequent records.  Tried repairing the table and all that.
>
>Never seen this behavior -- any ideas?
>
>lee
>
>
>
>
>--
>------------------------------
>Lasso Support: http://support.omnipilot.com/
>Search the list archives: http://www.listsearch.com/lassotalk.lasso
>Manage your list subscription:
>http://www.listsearch.com/lassotalk.lasso?manage


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [OT] mySQL weirdness

Brett Harvey
In reply to this post by Lee Glickenhaus
errr - a tinyint and Signed at that...  thus only going to 127, instead of 256.

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [OT] mySQL weirdness

Fletcher Sandbeck
In reply to this post by Lee Glickenhaus
On 5/23/05 at 4:00 PM by [hidden email] (Lee Glickenhaus):

>This is a new one.
>
>Importing data into mySQL.  Every time I try, I get an error of "Duplicate
>entry '127' for Key 1"  (that's the auto-increment id field)
>
>When I try to manually add records, I get the same thing.  It
>auto-increments up to 127 and then just keeps entering 127 for all
>subsequent records.  Tried repairing the table and all that.
>
>Never seen this behavior -- any ideas?

Is the ID field set to be a TINYINT?  A signed, tiny integer will only store a maximum value of 127.  <http://dev.mysql.com/doc/mysql/en/numeric-types.html>

[fletcher]
--
Fletcher Sandbeck                         [hidden email]
Lasso Product Specialist              [hidden email]
OmniPilot, Software Inc.                http://www.omnipilot.com

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [OT] mySQL weirdness

Olivier Miossec
In reply to this post by Lee Glickenhaus

Lee Glickenhaus ?crit:

> This is a new one.
>
> Importing data into mySQL.  Every time I try, I get an error of "Duplicate
> entry '127' for Key 1"  (that's the auto-increment id field)
>
> When I try to manually add records, I get the same thing.  It
> auto-increments up to 127 and then just keeps entering 127 for all
> subsequent records.  Tried repairing the table and all that.
>
> Never seen this behavior -- any ideas?
>
> lee

You will need to use integer type

ALTER TABLE tablename MODIFY id INT UNSIGNED NOT NULL AUTO_INCREMENT

---
Olivier Miossec
AIM/ichat omiossec
--
http://www.lasso-developpeur.net
--

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [OT] mySQL weirdness

Lee Glickenhaus
In reply to this post by Lee Glickenhaus
on 5/23/05 4:05 PM, Brett Harvey wrote:

> sounds like the field is of the wrong type some how.
>
> It should be a Bit INT or something like that.
>
> Sounds like that field is a TinyInt

Yup -- fat fingers and bad eyes.  Thought it was a MEDINT but I was
wrong.....

Thanks to all



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage