JDBC异常信息:
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘content’ at row 1
确认数据不可能过长的情况下,应该是字符集的问题。
查看表信息:
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
———- —— ——- ———- —— ————– ———– ————— ———— ——— ————– ——————- ———– ———- —————– ——– ————– ——————–
article InnoDB 10 Compact 1 16384 16384 0 0 0 3 2008-06-02 17:15:40 (NULL) (NULL) latin1_swedish_ci (NULL) InnoDB free: 9216 kB
将latin1改为utf8, 问题解决。
Leave a reply