8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Fixed CORE-6302: Error writing an array of NUMERIC(24,6) to the database

This commit is contained in:
AlexPeshkoff 2020-07-21 16:02:04 +03:00
parent e7560376e0
commit 6ddbea64a9
2 changed files with 11 additions and 0 deletions

View File

@ -890,6 +890,7 @@ static const UCHAR* sdl_desc(const UCHAR* ptr, DSC* desc)
case dtype_long: case dtype_long:
case dtype_quad: case dtype_quad:
case dtype_int64: case dtype_int64:
case dtype_int128:
desc->dsc_scale = static_cast<SCHAR>(*sdl++); desc->dsc_scale = static_cast<SCHAR>(*sdl++);
break; break;

View File

@ -318,6 +318,15 @@ ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS* status,
case SQL_BOOLEAN: case SQL_BOOLEAN:
desc->array_desc_dtype = blr_bool; desc->array_desc_dtype = blr_bool;
break; 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: default:
return error(status, Arg::Gds(isc_sqlerr) << Arg::Num(-804) << return error(status, Arg::Gds(isc_sqlerr) << Arg::Num(-804) <<
Arg::Gds(isc_random) << Arg::Str("data type not understood")); 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_long:
case blr_int64: case blr_int64:
case blr_quad: case blr_quad:
case blr_int128:
if (stuff_sdl(gen, desc->array_desc_scale)) if (stuff_sdl(gen, desc->array_desc_scale))
return status[1]; return status[1];
break; break;