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

Fixed CORE-6303: Error writing to TIMESTAMP/TIME WITH TIME ZONE array

This commit is contained in:
AlexPeshkoff 2020-07-21 19:07:04 +03:00
parent 6ddbea64a9
commit 23906efcff
3 changed files with 43 additions and 8 deletions

View File

@ -64,6 +64,9 @@ of particular SQL functions. The following types will be described in legacy for
DECFLOAT, INT128 and TIME(STAMP) WITH TIME ZONE. When `DataTypeCompatibility=2.5` in addition to this list
BOOLEAN will be described as legacy type as well.
Only fields returned by database engine in regular messages are modified according to SET BIND rules.
Variables returned by getting slice of an array are not affected by SET BIND statement.
### SQL Samples:

View File

@ -828,6 +828,11 @@ static const UCHAR* sdl_desc(const UCHAR* ptr, DSC* desc)
desc->dsc_length = sizeof(SINT64);
break;
case blr_int128:
desc->dsc_dtype = dtype_int128;
desc->dsc_length = sizeof(Int128);
break;
case blr_quad:
desc->dsc_dtype = dtype_quad;
desc->dsc_length = sizeof(ISC_QUAD);
@ -854,24 +859,39 @@ static const UCHAR* sdl_desc(const UCHAR* ptr, DSC* desc)
desc->dsc_length = sizeof(Decimal128);
break;
case blr_int128:
desc->dsc_dtype = dtype_int128;
desc->dsc_length = sizeof(Int128);
break;
case blr_timestamp:
desc->dsc_dtype = dtype_timestamp;
desc->dsc_length = sizeof(ISC_QUAD);
desc->dsc_length = sizeof(ISC_TIMESTAMP);
break;
case blr_timestamp_tz:
desc->dsc_dtype = dtype_timestamp_tz;
desc->dsc_length = sizeof(ISC_TIMESTAMP_TZ);
break;
case blr_ex_timestamp_tz:
desc->dsc_dtype = dtype_ex_timestamp_tz;
desc->dsc_length = sizeof(ISC_TIMESTAMP_TZ_EX);
break;
case blr_sql_date:
desc->dsc_dtype = dtype_sql_date;
desc->dsc_length = sizeof(SLONG);
desc->dsc_length = sizeof(ISC_DATE);
break;
case blr_sql_time:
desc->dsc_dtype = dtype_sql_time;
desc->dsc_length = sizeof(ULONG);
desc->dsc_length = sizeof(ISC_TIME);
break;
case blr_sql_time_tz:
desc->dsc_dtype = dtype_sql_time_tz;
desc->dsc_length = sizeof(ISC_TIME_TZ);
break;
case blr_ex_time_tz:
desc->dsc_dtype = dtype_ex_time_tz;
desc->dsc_length = sizeof(ISC_TIME_TZ_EX);
break;
case blr_bool:

View File

@ -297,12 +297,24 @@ ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS* status,
case SQL_TIMESTAMP:
desc->array_desc_dtype = blr_timestamp;
break;
case SQL_TIMESTAMP_TZ:
desc->array_desc_dtype = blr_timestamp_tz;
break;
case SQL_TIMESTAMP_TZ_EX:
desc->array_desc_dtype = blr_ex_timestamp_tz;
break;
case SQL_TYPE_DATE:
desc->array_desc_dtype = blr_sql_date;
break;
case SQL_TYPE_TIME:
desc->array_desc_dtype = blr_sql_time;
break;
case SQL_TIME_TZ:
desc->array_desc_dtype = blr_sql_time_tz;
break;
case SQL_TIME_TZ_EX:
desc->array_desc_dtype = blr_ex_time_tz;
break;
case SQL_LONG:
desc->array_desc_dtype = blr_long;
break;