mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 03:23:03 +01:00
Fixed bug CORE-2977 : FB 2.1 incorrectly works with indexed fields of type DATE in OLD ODS (9.1)
This commit is contained in:
parent
83631c011f
commit
a8051dd37b
@ -1342,6 +1342,7 @@ USHORT BTR_key_length(thread_db* tdbb, jrd_rel* relation, index_desc* idx)
|
||||
switch (tail->idx_itype)
|
||||
{
|
||||
case idx_numeric:
|
||||
case idx_timestamp1:
|
||||
length = sizeof(double);
|
||||
break;
|
||||
|
||||
@ -1396,6 +1397,7 @@ USHORT BTR_key_length(thread_db* tdbb, jrd_rel* relation, index_desc* idx)
|
||||
switch (tail->idx_itype)
|
||||
{
|
||||
case idx_numeric:
|
||||
case idx_timestamp1:
|
||||
length = sizeof(double);
|
||||
break;
|
||||
case idx_sql_time:
|
||||
@ -2529,6 +2531,7 @@ static void compress(thread_db* tdbb,
|
||||
switch (itype)
|
||||
{
|
||||
case idx_numeric:
|
||||
case idx_timestamp1:
|
||||
length = sizeof(double);
|
||||
break;
|
||||
case idx_sql_time:
|
||||
@ -2652,6 +2655,14 @@ static void compress(thread_db* tdbb,
|
||||
|
||||
#ifdef DEBUG_INDEXKEY
|
||||
fprintf(stderr, "NUMERIC %lg ", temp.temp_double);
|
||||
#endif
|
||||
}
|
||||
else if (itype == idx_timestamp1)
|
||||
{
|
||||
temp.temp_double = MOV_date_to_double(desc);
|
||||
temp_is_negative = (temp.temp_double < 0);
|
||||
#ifdef DEBUG_INDEXKEY
|
||||
fprintf(stderr, "TIMESTAMP1 %lf ", temp.temp_double);
|
||||
#endif
|
||||
}
|
||||
else if (itype == idx_numeric2)
|
||||
|
@ -101,7 +101,7 @@ const USHORT idx_invalid = USHORT(~0); // Applies to idx_id as special value
|
||||
|
||||
const int idx_numeric = 0;
|
||||
const int idx_string = 1;
|
||||
// AB: idx_timestamp1 removed
|
||||
const int idx_timestamp1 = 2;
|
||||
const int idx_byte_array = 3;
|
||||
const int idx_metadata = 4;
|
||||
const int idx_sql_date = 5;
|
||||
|
Loading…
Reference in New Issue
Block a user