hdbc-mysql
hdbc-mysql copied to clipboard
Query of column with JSON type fails
Executing a query with this general structure:
SELECT column_with_JSON_type
FROM table;
Results in:
malloc: resource exhausted (out of memory)
hdbc-mysql has not added support for this new MySQL feature.
Can you describe your environment better and give an simplified version of it? I tried reproducing this and I get some error, but not a malloc error.
Here's what I did:
create table t (j JSON);
INSERT INTO t1 VALUES('{"key1": "value1", "key2": "value2"}');
then I used this program:
module Main where
import Control.Monad
import Database.HDBC
import Database.HDBC.MySQL
main = do
rows <- withRTSSignalsBlocked $ do
conn <- connectMySQL defaultMySQLConnectInfo
quickQuery' conn "SELECT j from test.t" []
forM_ rows $ \row -> putStrLn $ show row
putStrLn "end"
and the output I get is:
[SqlString "unknown type 245"]
end