create table if not exists pet1(name varchar(20), age int, d blob)
INSERT INTO pet1 (name,age,d) VALUES('b3JlLmlk',12 ,RAWTOHEX('01020304'))
INSERT INTO pet1 (name,age,d) VALUES('abc',12 ,FILE_READ('test.jpg', NULL))
Caused by: java.lang.NullPointerException: Cannot store to object array because "value" is null
at org.lealone.storage.aose.lob.LobStreamStorage.setTable(LobStreamStorage.java:218)
at org.lealone.db.value.ValueLob.link(ValueLob.java:326)
at org.lealone.db.index.standard.StandardPrimaryIndex.linkLargeObject(StandardPrimaryIndex.java:127)
at org.lealone.db.index.standard.StandardPrimaryIndex.onAddSucceeded(StandardPrimaryIndex.java:163)
at org.lealone.db.table.StandardTable.lambda$createAsyncCallbackForAddRow$1(StandardTable.java:362)
at org.lealone.db.async.AsyncCallback.setAsyncResult(AsyncCallback.java:157)
at org.lealone.db.table.StandardTable.lambda$addRow$2(StandardTable.java:391)
at org.lealone.db.async.AsyncCallback.onComplete(AsyncCallback.java:137)
at org.lealone.db.table.StandardTable.addRow(StandardTable.java:388)
at org.lealone.sql.dml.MerSert$YieldableMerSert.addRowInternal(MerSert.java:200)
at org.lealone.sql.dml.Insert$YieldableInsert.executeLoopUpdate(Insert.java:92)
at org.lealone.sql.executor.YieldableLoopUpdateBase.executeInternal(YieldableLoopUpdateBase.java:31)
at org.lealone.sql.executor.YieldableBase.run(YieldableBase.java:104)
... 3 more
at org.lealone.net.TransferConnection.parseError(TransferConnection.java:72)
at org.lealone.net.TcpClientConnection.handleResponse(TcpClientConnection.java:104)
at org.lealone.net.TransferConnection.handle(TransferConnection.java:130)
at org.lealone.net.nio.NioEventLoop.read(NioEventLoop.java:230)
at org.lealone.net.nio.NioEventLoopClient.run(NioEventLoopClient.java:71)
at org.lealone.net.nio.NioEventLoopClient.lambda$createNioEventLoop$0(NioEventLoopClient.java:43)
at java.base/java.lang.Thread.run(Unknown Source)
插入blob数据的时候, 用 FILE_READ 报错了。
create table if not exists pet1(name varchar(20), age int, d blob) INSERT INTO
pet1
(name
,age
,d
) VALUES('b3JlLmlk',12 ,RAWTOHEX('01020304'))INSERT INTO
pet1
(name
,age
,d
) VALUES('abc',12 ,FILE_READ('test.jpg', NULL))