Description:
When creating a view from table columns defined as int(1), int(2), .... etc, the view alwaws has the definition of int(11).
Very similar problem to bug 11335 where the view definition of tinyint was always defaulting to tinyint(4), so may have been fixed at the same time.
http://bugs.mysql.com/bug.php?id=11335
How to repeat:
mysql> create table test (val1 int(1), val2 int(2), val3 int(3));
Query OK, 0 rows affected (1.78 sec)
mysql> describe test;
+-------+--------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------+------+-----+---------+-------+
| val1 | int(1) | YES | | NULL | |
| val2 | int(2) | YES | | NULL | |
| val3 | int(3) | YES | | NULL | |
+-------+--------+------+-----+---------+-------+
3 rows in set (0.79 sec)
mysql> create view test_v as select * from test;
Query OK, 0 rows affected (0.17 sec)
mysql> describe test_v;
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| val1 | int(11) | YES | | NULL | |
| val2 | int(11) | YES | | NULL | |
| val3 | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
3 rows in set (0.17 sec)