From 192d59f3a75e130d1c7638ef249c2f92e24bc3c7 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Thu, 30 Jan 2014 14:53:19 +0000 Subject: [PATCH] Backported fix for CORE-4327: Error in QLI when copying NULL blobs between databases --- src/qli/exe.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qli/exe.cpp b/src/qli/exe.cpp index ef66930794..df91907d6f 100644 --- a/src/qli/exe.cpp +++ b/src/qli/exe.cpp @@ -667,10 +667,14 @@ static bool copy_blob( qli_nod* value, qli_par* parameter) // We've got a blob copy on our hands. - if (!from_desc) { - *to_desc->dsc_address = 0; + if ((!from_desc) || UserBlob::blobIsNull(*(ISC_QUAD*) from_desc->dsc_address) + || (from_desc->dsc_missing & DSC_missing)) + { + memset(to_desc->dsc_address, 0, sizeof(ISC_QUAD)); + to_desc->dsc_missing |= DSC_missing; return true; } + to_desc->dsc_missing &= ~DSC_missing; // Format blob parameter block for the existing blob