Forum Moderators: open

Message Too Old, No Replies

mySQL 5 - data too long

is there a way to auto-truncate?

         

txbakers

8:02 pm on Jun 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In 4 the database would auto-truncate any data that was too long for a defined field.

In 5.01 now, anything that comes in as too long throws an error.

Is there an auto-truncate setting on fields?

coopster

8:13 pm on Jun 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Truncation of non-space characters always produced a warning but in MySQL 5 it can indeed cause an error (rather than a warning) and suppress insertion of the value by using strict SQL mode.

[dev.mysql.com...]
[dev.mysql.com...]