You add an active CHAR(1) column that's supposed to hold Y or N , run your import, and MySQL replies with Warning 1265 . Or worse, it says nothing, and a week later you find out half your rows say Y when they should say N .
If you're asking why do I get a 'Data truncated for column at row 1' warning when setting CHAR(1) for my column?, the short version is this: MySQL got a value longer than one character. Below I'll show you how to find that value, fix it, and set MySQL up so it refuses bad data instead of quietly chopping it.
Short answer: CHAR(1) holds exactly one character. When you insert something longer, like 'Yes' , 'true' , or 'Y' with a hidden \r from a Windows CSV, MySQL in non-strict mode keeps the first character and raises warning 1265. In strict mode you get an error instead. Fix the incoming value or widen the column.
Why Do I Get a 'Data Truncated for Column at Row 1' Warning When Setting CHAR(1) for My Column?
"Row 1" doesn't mean the first row of your table.…