> Hi All,
>
> I have a really strange (to me anyhow) problem. I'm trying to load a
> tab-delimited file with 11 fields and 42,793 records. The first field is
> a non-unique ID and the source of my problem. The file appears to load
> correctly, except that starting with the 12,793rd record, the ID field
> repeats the same number (32767 - the ID has nothing to do with the record
> number) for the rest of the file. Interestingly enough, this ID does not
> actually appear in the data, and the last good record has an ID=32766. I
> cleaned out all "/", "\", "&" from the file and still had the same
> problem. I even tried sorting the input file on a different field before
> loading it and still got the repeating 32767 - on the same exact records
> as before rather than at the 12,793rd, as though I had simply sorted the
> previous table.
Hi Paul,
if your ID is a (signed) SMALLINT, it cannot be bigger than 32767.
http://www.mysql.com/Manual_chapter/manual_Reference.html#Column_types
See also 7.3.5 :
"When asked to store a value in a numeric column that is outside the column
type's allowable range, MySQL clips the value to the appropriate endpoint of
the range and stores the resulting value instead.
For example, the range of an INT column is -2147483648 to 2147483647. If you
try to insert -9999999999 into an INT column, the value is clipped to the
lower endpoint of the range, and -2147483648 is stored instead. Similarly,
if you try to insert 9999999999, 2147483647 is stored instead."
Hope this helps,
Nicolas.