Mathematica’s OpenSQLConnection causes the kernel to hang.

Running MMA6 or MMA7 on OSX 10.5, I have the following reproducible
problem that causes Mathematica to completely hang (ie, to close
either the frontend or kernel, I need to use Activity Monitor or the
terminal).

Needs["DatabaseLink`"]; Needs["JLink`"];

x := OpenSQLConnection[JDBC["mysql", url],
 "Username" -> username, "Password" -> password,
 "UseConnectionPool" -> True]

Do[Print[k, " ", x], {k, 1, 20}]

(You’ll need an SQL server to connect to, and set url, username and
password appropriately.) At least on my machine, it manages the first
8 connections, and then totally hangs.

Of course, I don’t really need to open this many connections; it was a
mistake in my code, but one that took a day to track down. Still, it’s
a bug!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: