From 571294f954779c195763d996c3235ec979b4cdd9 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 2 Feb 2021 00:03:07 +0100 Subject: Fix failed test bson and xml --- storage/connect/tabjson.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 19f721f692b..fb5a64c7d55 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -1024,8 +1024,14 @@ bool TDBJSN::OpenDB(PGLOBAL g) /* Lrecl is Ok. */ /*********************************************************************/ size_t linelen = Lrecl; + MODE mode = Mode; - //To_Line = (char*)PlugSubAlloc(g, NULL, linelen); + // Buffer must be allocated in g->Sarea + Mode = MODE_ANY; + Txfp->AllocateBuffer(g); + Mode = mode; + + //To_Line = (char*)PlugSubAlloc(g, NULL, linelen); //memset(To_Line, 0, linelen); To_Line = Txfp->GetBuf(); xtrc(1, "OpenJSN: R%hd mode=%d To_Line=%p\n", Tdb_No, Mode, To_Line); -- cgit v1.2.1