Error Data too long for column
Hi,
This is a error message in mysql replication slave server.
When I insert data, I use substring function to adjust data type and length.
But, it occured error message like blow.
--------------------------------------------------------------------
2016-07-05T16:01:37.304411Z 1 [ERROR] Slave SQL for channel '': Error 'Data too long for column 'cdate' at row 4' on query.
Default database: 'obpdb'.
Query: 'insert into obp_content_month(svcno, clubno, devtype, menuno, uvcnt, pvcnt, cdate)
select a.svcno, a.clubno, a.devtype, a.etc menuno,
count(distinct a.userno) uv, count(*) pv, substring(cdatetime,1, 8) cdate
from obp_access_log a
where a.logkind=5
and a.cdatetime like concat(DATE_FORMAT(NOW() - interval 1 day, '%Y%m%d'),'%')
group by substring(cdatetime,1, 8) , a.svcno, a.clubno, a.etc, a.devtype',
Error_code: 1406
2016-07-05T16:01:37.304441Z 1 [Warning] Slave: Data too long for column 'cdate' at row 4 Error_code: 1406
2016-07-05T16:01:37.304447Z 1 [ERROR] Error running query, slave SQL thread aborted. Fix the problem,
and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000025' position 95872569
---------------------------------------------------------------------
What happened?
How can fix this problem?
Please help me.