Bug #60701 | BIT(1) versus TINYINT(1) | ||
---|---|---|---|
Submitted: | 30 Mar 2011 19:59 | Modified: | 31 Mar 2011 17:39 |
Reporter: | Guillaume Boissiere | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.5 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
Tags: | Best practices |
[30 Mar 2011 19:59]
Guillaume Boissiere
[30 Mar 2011 20:18]
MySQL Verification Team
Thank you for the bug report.
[31 Mar 2011 17:39]
Paul DuBois
We do not have a "best practices" recommendation. Use whichever type you like. A similar "on/off" type, BOOL, is mapped by MySQL to TINYINT(1), which suggests that TINYINT(1) is acceptable. mysql> CREATE TABLE t (b BOOL); Query OK, 0 rows affected (0.01 sec) mysql> SHOW CREATE TABLE t\G *************************** 1. row *************************** Table: t Create Table: CREATE TABLE `t` ( `b` tinyint(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)