Found a work-around for the way MySQL treats TIME literals with
dates and/or fractional seconds.
Added a mutex into the cursor so that connections can be shared between
threads. threadsafety=2
I could easily make the cursors sharable as well (threadsafety=3) but
I hardly see the point. Even sharing connections is not a good idea,
because you don't get the benefit of multiple mysqld threads.