列数据类型改变引发的MySQL警告

铁血战士 发布于 2011/08/03 15:13
阅读 754
收藏 0

我改变了MyISAM MySQL 表格的一列的数据类型。(350万条记录)

mysql> alter table `sometable` modify column `int_column` 
int(11) unsigned NOT NULL DEFAULT '0';

在此之前,我int_column MEDIUMINT(8)。执行查询后,我得了377警告。如下:

mysql> show warnings;
+---------+------+----------------------------------------------------------+
| Level   | Code | Message                                                  |
+---------+------+----------------------------------------------------------+
| Warning | 1264 | Out of range value for column 'int_column' at row 19360   | 
| Warning | 1264 | Out of range value for column 'int_column' at row 33745   | 
| Warning | 1264 | Out of range value for column 'int_column' at row 181436  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 587071  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 596617  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 659837  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 668363  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 801450  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 827911  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 835083  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 853689  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 867848  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 922569  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 922633  | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1002626 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1095119 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1102957 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1183077 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1282318 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1308876 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1311981 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1313329 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1375981 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1468411 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1470989 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1552848 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1556220 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1613484 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1619116 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1664449 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1670895 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1685828 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1689845 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1690212 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1697586 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1701220 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1710764 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1716681 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1717857 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1721820 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1721848 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1736543 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1738177 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1745430 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1748732 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1750112 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1753833 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1753903 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1762801 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1765664 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1766269 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1768134 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1786470 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1788247 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1790305 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1792769 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1795158 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1800610 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1806786 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1808764 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1820163 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1828066 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1842223 | 
| Warning | 1264 | Out of range value for column 'int_column' at row 1844030 | 
+---------+------+----------------------------------------------------------+ 
64 rows in set (0.26 sec)

为什么?我为整数字段分配了更多的字节,怎么还有out of range?

另外为什么仅反馈64行(377)??

加载中
返回顶部
顶部