go-txdb does not satisify the 'driver.Execer' interface
flimzy opened this issue · comments
This leads to problems with some statements in some databases. For instance, attempting to execute a LOCK TABLES
in MySQL fails with the following error:
Error 1295: This command is not supported in the prepared statement protocol yet
This appears to be due to go-txdb
not fulfilling the Execer
interface, which forces the sql
library to fallback to using a prepared statement which does not work in this case.
I imagine many other statements, such as CREATE TABLE
, DROP TABLE
, and ALTER TABLE
would likely have similar restrictions on a number of databases.
(NOTE: I realize that LOCK TABLES
within a transaction in MySQL doesn't really work, but I think that's beyond the scope of this library)
Hi, thanks for pointing this, I will have a look, how we can achieve this and maybe implement new go 1.8 related context specific interfaces support too ;)