---
title: "db字段过长"
author: "jedy"
date: "2007-07-31T06:52:00Z"
tags: []
slug: "db"
draft: false
lastmod: "2007-07-31T06:52:00Z"
id: 304681
url: "https://jedy.iteye.com/blog/304681"
---

DBI报错

> Data in column 5 has been truncated to 32700 bytes. A maximum of 37556 bytes are available at /usr/lib/perl5/site\_perl/5.8.5/i386-linux-thread-multi/DBI.pm line 1981

原因是字段太长了被截断了，可以在db连接的参数中加入LongReadLen指定最大的长度。如:  
DBI-&gt;connect('xxx','root','',{LongReadLen =&gt; 8 * 1024 * 1024})