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

PC/Etc
2013-09-18 15:23 (11 years ago) ytyng

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

Comments

Archive

2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011