Let say you're building a database and you define the primary id and being an integer with a maximum variable length of 4.
What happens when you try to insert a new record for the 10,000th time?
All your data becomes corrupted.
Always define primary keys with the default of int(11) or bigger.
The 4 is just a display width. A signed integer can still go up to 2GB and will get the correct value. Amazing what kind of information the manual contains.
Shame on you toma42.
from the manual (http://www.mysql.com/doc/en/Numeric_types.html):
Note that if you store larger values than the display width in an integer column, you may experience problems when MySQL generates temporary tables for some complicated joins, as in these cases MySQL trusts that the data did fit into the original column width.
Need help getting that foot out of your mouth, ahundiak?