Bug #59265 Tabular display does not print correctly for single column rows
Submitted: 3 Jan 2011 23:52 Modified: 10 Mar 2011 15:11
Reporter: Chuck Bell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:1.0.0 OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[3 Jan 2011 23:52] Chuck Bell
Description:
The format_tabular_list() method in mysql.utilities.common.format.py does not properly print a single-column list.

How to repeat:
import sys

from mysql.utilities.common.format import format_tabular_list

print "# A single column list:"
rows = ['one','two','three']
cols = ['a']

format_tabular_list(sys.stdout, cols, rows, True)

Suggested fix:
Fix bug in format.py.
[4 Jan 2011 2:59] Chuck Bell
Patch for fix.

Attachment: 59265.bundle (application/octet-stream, text), 9.04 KiB.

[11 Jan 2011 20:44] Chuck Bell
Updated patch

Attachment: bug59265.bundle (application/octet-stream, text), 8.94 KiB.

[12 Jan 2011 15:38] Chuck Bell
Latest patch corrected from review

Attachment: 59265.bundle (application/octet-stream, text), 7.91 KiB.

[12 Jan 2011 15:39] Chuck Bell
Patch ready for review.
[10 Mar 2011 15:11] Tony Bedford
An entry has been added to the 1.0.1 changelog: 

        The format_tabular_list() method in 
        mysql.utilities.common.format.py did not 
        properly print a single-column list.