MySQL 5.6: ERROR 1265 (01000): Data truncated for column ... prevents SQL execution

PC/Etc
2013-09-18 06:23 (12 years ago)
MySQL 5.6: ERROR 1265 (01000): Data truncated for column ... prevents SQL execution

Isn't sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES specified in your my.cnf?

If you execute SQL statements that did not cause any issues in the previous system under MySQL 5.6's default settings (STRICT_TRANS_TABLES), you might encounter errors such as:

ERROR 1265 (01000): Data truncated for ...

For example, trying to INSERT NULL into a NOT NULL field.

You can either modify the SQL or change your my.cnf as follows:

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
↓
sql_mode=NO_ENGINE_SUBSTITUTION

This should resolve the issue.

Reference:

Errors started occurring with some SQL after upgrading to MySQL 5.6 | Seeds Creators Blog http://www.seeds-std.co.jp/seedsblog/1035.html

Current rating: 1.0 (2)
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive