Bug #60368 Crash when exporting query results to a file
Submitted: 7 Mar 2011 11:31 Modified: 19 Apr 2011 14:10
Reporter: Craig Fowler Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.32 OS:Linux (Debian Testing, 64-bit using Ubuntu 10.04 .deb package)
Assigned to: CPU Architecture:Any
Tags: crash, export

[7 Mar 2011 11:31] Craig Fowler
Description:
When clicking the "Export to file" button to save query results to an external file (such as CSV) Workbench crashes without providing a stack trace.

I am aware that this bug also existed in 5.2.31 (I thought I had already reported against that version but it seems I forgot, sorry).

Also - this may or may not be related-to or a dupe of #56656, although that looks like a UI bug rather than a back-end crash bug.  I reported this as a separate bug to play on the safe side.

How to repeat:
* Open a SQL connection to an existing database (in my case it was a TCP/IP-over-ssh connection) and execute a query that returns a table of results.

* Click the export to file button to export those results to a file.

* Choose CSV export and a file location (I picked '/home/craig/Desktop/error-events.csv')

* Click the export button and Workbench crashes.  The commandline output follows - not the absence of a proper stack trace.

---

craig@craig-laptop:~$ mysql-workbench
** Message: Gnome keyring daemon seems to not be available. Stored passwords will be lost once quit
/usr/lib/python2.6/dist-packages/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application uses RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken
  RandomPool_DeprecationWarning)
/bin/sh: ifconfig: not found
Log levels '0111000'
disabling log level 0
enabling log level 1
enabling log level 2
enabling log level 3
disabling log level 4
disabling log level 5
disabling log level 6
Ready.

Starting thread...
Thread started
8439 INFO Connecting to SSH server at tfor2.com:22 using key /home/craig/.ssh/id_rsa...
New client connection
client connection established
8439 INFO Tunnel now open ('127.0.0.1', 37154) -> ('REDACTED', 22) -> ('127.0.0.1', 3306)
Client for 8439 disconnected
New client connection
client connection established
8439 INFO Tunnel now open ('127.0.0.1', 37155) -> ('REDACTED', 22) -> ('127.0.0.1', 3306)
New client connection
client connection established
8439 INFO Tunnel now open ('127.0.0.1', 37156) -> ('REDACTED', 22) -> ('127.0.0.1', 3306)
** Message: query.explain built-in command is being overwritten
/usr/bin/mysql-workbench-bin: symbol lookup error: /usr/lib/mysql-workbench/libwbpublic.so.0: undefined symbol: _ZN9ctemplate8Template11GetTemplateERKSsNS_5StripE

---

I experience the same crash if I try using a tab-separated export as well.

It's worth noting that (in this case) the dataset contained TEXT columns that had multi-line content.
[7 Mar 2011 11:33] Craig Fowler
Update:  Since I tried a slightly complex query to produce the issue in the first place, I tried a simpler one to see if I could reproduce it again.

I have been able to reproduce the crash in exactly the same way using:

SELECT 1, 2 FROM DUAL;

… and then attempting to export the results from that.
[7 Mar 2011 13:24] Valeriy Kravchuk
Looks like SSH tunnel is essential here. I can not repeat this while working directly with localhost.
[9 Mar 2011 13:49] Miguel Solorzano
I couldn't repeat on Linux Mint 10 X86_64. Are you using a self compiled binary or specific package?. Thanks in advance.
[9 Mar 2011 14:50] Craig Fowler
I am using the pre-created .deb package for Ubuntu 10.04/64 bit.
[5 Apr 2011 15:53] Miguel Solorzano
Do you have the URL to download that package?. Thanks.
[5 Apr 2011 15:57] Craig Fowler
Hi there

I'm talking about the official packages available at http://dev.mysql.com/downloads/workbench/#downloads

I am using the package for Ubuntu 10.04/64-bit
[5 Apr 2011 17:01] Craig Fowler
Conversation between myself and Alfredo on IRC:

---

<akojima> ToreadorVampire: about http://bugs.mysql.com/bug.php?id=60368
<ToreadorVampire> Uh huh
<akojima> ToreadorVampire: it's about ctemplate version incompat… what version do you have there?
<akojima> if testing has a version different from the one shipped in ubuntu, it would lead to that, i suppose
<ToreadorVampire> akojima: I'm running 0.97-3 right now, although I have 0.97-1 available to install and according to aptitude it wouldn't break anything if I did so
<ToreadorVampire> Also, I could download and use the package for the latest Ubuntu (I forget the version number) - perhaps that is compiled against a different/newer libctemplate0 package?
<akojima> 10.04 ships 0.96
<ToreadorVampire> Lessee what 10.10 ships then
<ToreadorVampire> maverick ships 0.97-1
<akojima> that might work
<ToreadorVampire> Next opportunity (probably tomorrow) I'll switch .deb packages and try and maverick one
<ToreadorVampire> Mind if I paste this convo into the bug notes?
<akojima> no, go ahead
[19 Apr 2011 14:10] Craig Fowler
It appears to have taken me longer than "tomorrow" to download and try out the version of the WB for Ubuntu 10.10 but I have just downloaded and installed 5.2.33b for 10.10.  That package solves the problem for me completely.