Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 2072)
+++ wp-includes/comment.php	(working copy)
@@ -983,7 +983,7 @@
 	$commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0;
 
 	$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
-	$commentdata['comment_agent']     = $_SERVER['HTTP_USER_AGENT'];
+	$commentdata['comment_agent']     = substr($_SERVER['HTTP_USER_AGENT'], 0, 255);
 
 	$commentdata['comment_date']     = current_time('mysql');
 	$commentdata['comment_date_gmt'] = current_time('mysql', 1);
Index: wp-admin/import/livejournal.php
===================================================================
--- wp-admin/import/livejournal.php	(revision 2072)
+++ wp-admin/import/livejournal.php	(working copy)
@@ -618,7 +618,7 @@
 						'comment_author_IP' => ( !empty( $comment_author_IP ) ? $comment_author_IP : '' ),
 						'comment_approved' => ( in_array( $lj_comment_state, array( 'A', 'F' ) ) ? 1 : 0 ),
 						'comment_karma' => $lj_comment_ID, // Need this and next value until rethreading is done
-						'comment_agent' => $lj_comment_parent,
+						'comment_agent' => substr($lj_comment_parent, 0, 255),
 						'comment_type' => 'livejournal',  // Custom type, so we can find it later for processing
 						'user_ID' => $user_id
 					);
