From 6ddbea64a968594c3aa7a78b148827bfdc961e9e Mon Sep 17 00:00:00 2001 From: AlexPeshkoff Date: Tue, 21 Jul 2020 16:02:04 +0300 Subject: [PATCH] Fixed CORE-6302: Error writing an array of NUMERIC(24,6) to the database --- src/common/sdl.cpp | 1 + src/yvalve/array.epp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/common/sdl.cpp b/src/common/sdl.cpp index af2db62814..89151b8537 100644 --- a/src/common/sdl.cpp +++ b/src/common/sdl.cpp @@ -890,6 +890,7 @@ static const UCHAR* sdl_desc(const UCHAR* ptr, DSC* desc) case dtype_long: case dtype_quad: case dtype_int64: + case dtype_int128: desc->dsc_scale = static_cast(*sdl++); break; diff --git a/src/yvalve/array.epp b/src/yvalve/array.epp index cd3a41a180..477e6222fc 100644 --- a/src/yvalve/array.epp +++ b/src/yvalve/array.epp @@ -318,6 +318,15 @@ ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS* status, case SQL_BOOLEAN: desc->array_desc_dtype = blr_bool; break; + case SQL_DEC16: + desc->array_desc_dtype = blr_dec64; + break; + case SQL_DEC34: + desc->array_desc_dtype = blr_dec128; + break; + case SQL_INT128: + desc->array_desc_dtype = blr_int128; + break; default: return error(status, Arg::Gds(isc_sqlerr) << Arg::Num(-804) << Arg::Gds(isc_random) << Arg::Str("data type not understood")); @@ -423,6 +432,7 @@ static ISC_STATUS gen_sdl(ISC_STATUS* status, case blr_long: case blr_int64: case blr_quad: + case blr_int128: if (stuff_sdl(gen, desc->array_desc_scale)) return status[1]; break;