mysql-simple icon indicating copy to clipboard operation
mysql-simple copied to clipboard

Commands out of sync when using MultiStatements

Open ocharles opened this issue 9 years ago • 0 comments

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"}

ocharles avatar Jan 04 '16 15:01 ocharles