File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
persistent-mysql/Database/Persist
persistent-sqlite/Database/Persist Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ open' :: MySQL.ConnectInfo -> LogFunc -> IO SqlBackend
126126open' ci logFunc = do
127127 conn <- MySQL. connect ci
128128 MySQLBase. autocommit conn False -- disable autocommit!
129- smap <- newIORef $ Map. empty
129+ smap <- makeSimpleStatementCache
130130 return $ SqlBackend
131131 { connPrepare = prepare' conn
132132 , connStmtMap = smap
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ wrapConnectionInfo connInfo conn logFunc = do
266266 Sqlite. reset conn stmt
267267 Sqlite. finalize stmt
268268
269- smap <- newIORef $ Map. empty
269+ smap <- makeSimpleStatementCache
270270 return $ SqlBackend
271271 { connPrepare = prepare' conn
272272 , connStmtMap = smap
@@ -455,7 +455,7 @@ migrate' allDefs getter val = do
455455-- with the difference that an actual database isn't needed for it.
456456mockMigration :: Migration -> IO ()
457457mockMigration mig = do
458- smap <- newIORef $ Map. empty
458+ smap <- makeSimpleStatementCache
459459 let sqlbackend = SqlBackend
460460 { connPrepare = \ _ -> do
461461 return Statement
You can’t perform that action at this time.
0 commit comments