>
> 2) I'm wondering if any field with an auto_increment should be
> automatically declared as an unsigned field? Trying to use negative
> numbers causes an error to occur:
>
> CREATE TEMPORARY TABLE foo (
> ikey SMALLINT AUTO_INCREMENT PRIMARY KEY,
> name CHAR(30)
> ) AUTO_INCREMENT=-30
> ;
> INSERT INTO foo VALUES (NULL, "Nem");
> INSERT INTO foo VALUES (NULL, "Monty");
>
> You'll get:
> ERROR 1062 at line 8: Duplicate entry '32767' for key 1
>
> So, either this is a bug and should be fixed (since 32767 != -30 and
> trying to insert another value causes an error), or the field should
> automatically be declared UNSIGNED and the above would generate a error
> when the table is CREATE()d (since -30 is signed).
>
> Anybody have any thoughts or ideas??
That is a bug, and I was able to verify it. We will fix it as soon as possible.
Sasha Pachev
+------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sasha@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+------------------------------------------------------------------+