[erlang-questions] MySQL driver
Thu Apr 11 00:41:10 CEST 2013
Re: pooling -- there's always bugs...ALWAYS BUGS. We were using poolboy at
Basho and thought that it was so simple/basic that bugs should be easy to
sort out...until Dr. Hughes walked into the room and pulled a Concurrent
Debuggerator 3000 from his black bag (aka QuickCheck) and found 5
significant concurrency bugs in as many minutes...and this was on a library
that only does pooling and nothing else. So...unless you tell me that Dr.
Hughes has been over this pooling code with the aforementioned tool, I will
eye the pooling code with a raised eyebrow. :)
Broadly, I would suggest looking at these forks as being useful to merge in:
csrl - pooling fixes, edge cases, etc. (underscores my point about pooling,
but I digress)
jlarky - looks like a opscode branch that has some good bug fixes
taybin - adds better UTF support (it's a big patch though, so probably
needs some work)
rflynn - bug fix for float encoding
gar1t - bug fixes + polish on API
What are the competing approaches on transactions?
On Wed, Apr 10, 2013 at 4:25 PM, Garrett Smith <> wrote:
> Someday someone will write a book on the history of the Erlang MySQL
> libraries. Not a great read, but it'd have to be scholarly.
> I've modified the Eonblast library with some connection timeout tweaks
> (as in, supporting them):
> On Wed, Apr 10, 2013 at 4:59 PM, Dave Smith <> wrote:
> > Hi Henning,
> > Thanks for the pointers. I must admit that I find the level of snark in
> > emysql history delightful, considering that it's at least as forked as
> > erlang-mysql-driver now. :)
> > There are a number of good fixes for the emysql driver, but they are on
> > different forks across Github. Looking over csrl's, fixes, I'm pretty
> > concerned those aren't in mainline since there are some non-trivial
> > problems he's addressed (would you like some irony with that irony? :)).
> > Do you know if eonblast is planning to incorporate all the work from
> > different forks? I think we need to build some momentum behind a driver
> > I'm certainly happy to direct people towards a maintained one.
> > IMO, it would also be handy if the driver wasn't pooled, but used poolboy
> > since getting the pooling right is rather difficult. (I know that poolboy
> > has been tested with some of Quviq's concurrent checking stuff and a
> > of race conditions addressed).
> > Thanks!
> > D.
> > On Wed, Apr 10, 2013 at 3:00 PM, Henning Diedrich <>
> > wrote:
> >> Hi Dave,
> >> if I remember right, you were using the driver that came from Yxa via
> >> Yarif's erlang-emysql-driver
> https://github.com/dizzyd/erlang-mysql-driver ?
> >> (Here is the history of that.
> >> It was found less than perfect when Nick and Jacob gave it something to
> >> chew building Rupture. I never spotted the problems myself I should add.
> >> That's purely from Nick Gerakine's and Jacob Vorreuter's words.
> >> But they report that with much effort they could not get the races out
> >> it. That's why they started emysql, which I later started maintaining,
> >> which Jeremy just mentioned, https://github.com/eonblast/Emysql
> >> Considerable work went into getting the pooling system of Emysql right.
> >> (What I don't know is when exactly it got buggy, it may have been after
> >> Jacob's Emysql fork that now lies dormant.) But I worked a while, with
> >> from others to get all races out of the queuing.
> >> However, the best fork of Emysql, I *think* is currently that of Chris
> >> Rempel at https://github.com/csrl/emysql as I got behind while making
> >> Erlvolt, the VoltDB driver, modeled in parts on Emysql. Chris did some
> >> impressive clean up. Now that Erlvolt is out, I'll turn around and
> catch up
> >> asap. But that's not a New York asap.
> >> An alternative may be to go back to a more original Yxa version, like
> >> one possibly still to be found in ejabberd. That may be more stable than
> >> Yariv's branch that you started out with. The "history" I linked to
> >> has the reasons, why that branch may be not quite clean and hard to
> >> Best,
> >> Henning
> >> On Apr 10, 2013, at 10:43 PM, Dave Smith <> wrote:
> >> > Hello list,
> >> >
> >> > I'm curious what libraries people are currently using for MySQL access
> >> > in Erlang. I have an old library on my github that I've kept basically
> >> > working, but am wondering if there are any preferred/production
> >> > out there that people like better.
> >> >
> >> > I ask because I'm considering retrofitting the pooling system in the
> >> > driver I maintain to use poolboy, but figure it was worth checking if
> >> > are better alternatives out there. :)
> >> >
> >> > After all, the best code to maintain is the code you don't maintain.
> >> >
> >> > D.
> >> > _______________________________________________
> >> > erlang-questions mailing list
> >> >
> >> > http://erlang.org/mailman/listinfo/erlang-questions
> > _______________________________________________
> > erlang-questions mailing list
> > http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions