Bug #51682 lists.mysql.com breaks lines before 80 characters in patches
Submitted: 3 Mar 2010 9:44 Modified: 9 Mar 2010 3:23
Reporter: Martin Hansson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Websites: lists.mysql.com Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jim Winstead CPU Architecture:Any

[3 Mar 2010 9:44] Martin Hansson
Description:
Our code guidelines allow for code lines that are 80 characters (columns) long. But when displaying patches in lists.mysql.com, lines are broken at somewhere around 75 characters. This impacts readability and, more seriously, makes it impossible to copy-paste parts of a diff without manual editing.

How to repeat:
Look at any patch where code lines are above 75 characters in length. E.g. http://lists.mysql.com/commits/99580

It looks like this

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2009-12-28 12:54:16 +0000
+++ b/sql/item.cc	2010-02-08 11:30:41 +0000
@@ -4778,7 +4778,8 @@ Item *Item_field::equal_fields_propagato
     DATE/TIME represented as an int and as a string.
   */
   if (!item ||
-      (cmp_context != (Item_result)-1 && item->cmp_context != cmp_context))
+      (cmp_context != (Item_result)-1 && item->cmp_context != cmp_context
&&
+       !is_datetime_comparable(item)))
     item= this;
   else if (field && (field->flags & ZEROFILL_FLAG) &&
IS_NUM(field->type()))
   {

Suggested fix:
Break code lines no sooner than at 80 columns or, better yet, do not break lines at all.
[3 Mar 2010 10:21] Sveta Smirnova
Thank you for the report.

Verified as described.
[9 Mar 2010 3:23] Jim Winstead
this is fixed now. note that applying changes is usually easier using the bzr bundle (the attachment at the bottom) or by grabbing the plain-text version of the message (using the link in the message header). doing a cut&paste can be tripped up by whitespace changes.