Why does TINYINT(1)
work as a boolean? The way I understood the official docs, the (1) should mean it has a display width of 1, so if I store 56
in
The engine is smart enough to know that TINYINT(1)
and BOOL
are the same. However INT(1)
only affects the Display Width instead of the underlying storage size. Display width only comes into play when the value is less width then the display width. Then it gets padded.
http://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/