I've got a simple table with several columns and I'm trying to merge two of them into one. I'm working with MySQL 5.5 and I can reproduce the error one a specific data set by running the following (anonymized) query through MySQL Workbench:
UPDATE person SET a = CONCAT_WS('\n', a, b)
It clearly produces the following response message:
Error Code: 1406. Data too long for column 'a' at row 34
Because both a
and b
are VARCHAR(200)
the response is fair, but I would expect and hope that since it produced an error, no changes would be commited. However, apparently it does. I'm not able to reproduce it on a smaller dummy dataset. I am using auto commit.
Am I simply wrong in my assumption that erronous queries don't change any values? Could it be some feature of either auto commit, or other setup of my MySQL server?
Please ask if any obvious detail is missing from my specification.