MySQL Forums
Forum List  »  General

Error Data too long for column
Posted by: jongse park
Date: July 11, 2016 11:27PM

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.

Options: ReplyQuote


Subject
Written By
Posted
Error Data too long for column
July 11, 2016 11:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.