> > As a sidenote - shouldn't MySQL raise an error when data gets >truncated? > > MySQL raises a warning after such ALTER operation. See: > > mysql> create table dt(a decimal(4,1)); > Query OK, 0 rows affected (0.01 sec) > > mysql> insert into dt set a=999.1; > Query OK, 1 row affected (0.00 sec) > > mysql> alter table dt change a a decimal(2,1); > Query OK, 1 row affected, 1 warning (0.02 sec) > Records: 1 Duplicates: 0 Warnings: 1 > > mysql> show warnings; > +---------+------+-----------------------------------------------------+ > | Level | Code | Message | > +---------+------+-----------------------------------------------------+ > | Warning | 1264 | Out of range value adjusted for column 'a' at row 1 | > +---------+------+-----------------------------------------------------+
btw, it seems MySQL CAN do errors, check: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html Jigal notified me of this. With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL Server Upscene Productions http://www.upscene.com Database development questions? Check the forum! http://www.databasedevelopmentforum.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]