paul-rouse / mysql-simple

A mid-level client library for the MySQL database, intended to be fast and easy to use.
Other
91 stars 35 forks source link

Commands out of sync when using MultiStatements #27

Open ocharles opened 8 years ago

ocharles commented 8 years ago

See the following GHCI session:

Prelude Database.MySQL.Simple Database.MySQL.Base Base> conn <- connect defaultConnectInfo { connectOptions = [ MultiStatements ]}
Prelude Database.MySQL.Simple Database.MySQL.Base Base> execute_ conn "SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT" 
0
Prelude Database.MySQL.Simple Database.MySQL.Base Base> execute_ conn "SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT" 
0
Prelude Database.MySQL.Simple Database.MySQL.Base Base> execute_ conn "SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT" 
0
Prelude Database.MySQL.Simple Database.MySQL.Base Base> execute_ conn "SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT" 
*** Exception: ConnectionError {errFunction = "query", errNumber = 2014, errMessage = "Commands out of sync; you can't run this command now"}