Bug #72611 Error during "Execute Query Into Text Output"
Submitted: 11 May 2014 13:18 Modified: 25 Aug 2014 19:16
Reporter: David Hemming Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S5 (Performance)
Version:6.1.4 OS:Windows (Microsoft Windows 7 Ultimate Edition Service Pack 1 build 7601, 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[11 May 2014 13:18] David Hemming
Description:
When I go Query -> 'Execute (All or selection) to Text

using a bunch of select queries like the following:
select * from volunteers;
select * from employees;
select * from people;
select * from parties;
select * from addresses;
select * from phone_numbers;
select * from languages_people;
select * from emails;

If there is data (rows) in those tables it works fine.  However if there are no data (rows) in any of them then I get the error message:

Error during "Execute Query Into Text Output"
error calling Python module function SQLIDEUtils.executeQueryAsText

Here is part of my log file:

23:05:57 [ERR][      WBContext]: error calling Python module function SQLIDEUtils.executeQueryAsText
23:09:03 [ERR][         python]: error calling SQLIDEUtils.executeQueryAsTextTraceback (most recent call last):
23:09:03 [ERR][         python]:   File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\sqlide_grt.py", line 157, in executeQueryAsText
23:09:03 [ERR][         python]:     value = result.stringFieldValue(i)
23:09:03 [ERR][         python]: SystemError: invalid column 0 for resultset
23:09:03 [ERR][            grt]: Error executing plugin wb.sqlide.executeToTextOutput: error calling Python module function SQLIDEUtils.executeQueryAsText	
23:09:03 [ERR][      WBContext]: error calling Python module function SQLIDEUtils.executeQueryAsText

How to repeat:
go Query -> 'Execute (All or selection) to Text

using a bunch of select queries like the following:
select * from volunteers;
select * from employees;
select * from people;
select * from parties;
select * from addresses;
select * from phone_numbers;
select * from languages_people;
select * from emails;

If those none of those tables have data rows you will get this error.
[11 May 2014 13:19] David Hemming
Log File

Attachment: wb.log (application/octet-stream, text), 10.42 KiB.

[25 Aug 2014 19:16] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.2.2 release, and here's the changelog entry:

Executing "Execute (All or selection) to Text" on queries that SELECT from
empty tables would fail and generate an error similar to "Error during
"Execute Query Into Text Output" error calling Python module function
SQLIDEUtils.executeQueryAsText".

Thank you for the bug report.