mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 06:03:02 +01:00
Correction
This commit is contained in:
parent
903a2f1358
commit
04c9f237cb
@ -286,9 +286,8 @@ typedef struct funcarg {
|
|||||||
|
|
||||||
enum idx_direction
|
enum idx_direction
|
||||||
{
|
{
|
||||||
IDX_type_none = -1,
|
IDX_type_none = 0,
|
||||||
IDX_type_ascending = 0,
|
IDX_type_descend = 1
|
||||||
IDX_type_descending = 1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct dudley_idx {
|
typedef struct dudley_idx {
|
||||||
|
@ -1420,7 +1420,7 @@ static void add_index( DUDLEY_IDX index)
|
|||||||
X.RDB$SEGMENT_COUNT = index->idx_count;
|
X.RDB$SEGMENT_COUNT = index->idx_count;
|
||||||
X.RDB$UNIQUE_FLAG = (index->idx_unique) ? TRUE : FALSE;
|
X.RDB$UNIQUE_FLAG = (index->idx_unique) ? TRUE : FALSE;
|
||||||
X.RDB$INDEX_INACTIVE = (index->idx_inactive) ? TRUE : FALSE;
|
X.RDB$INDEX_INACTIVE = (index->idx_inactive) ? TRUE : FALSE;
|
||||||
if (index->idx_type != IDX_type_none) {
|
if (index->idx_type) {
|
||||||
X.RDB$INDEX_TYPE = index->idx_type;
|
X.RDB$INDEX_TYPE = index->idx_type;
|
||||||
X.RDB$INDEX_TYPE.NULL = FALSE;
|
X.RDB$INDEX_TYPE.NULL = FALSE;
|
||||||
}
|
}
|
||||||
@ -3706,9 +3706,7 @@ static void modify_index( DUDLEY_IDX index)
|
|||||||
X.RDB$INDEX_INACTIVE = (index->idx_inactive) ? TRUE : FALSE;
|
X.RDB$INDEX_INACTIVE = (index->idx_inactive) ? TRUE : FALSE;
|
||||||
if (index->idx_flags & IDX_unique_flag)
|
if (index->idx_flags & IDX_unique_flag)
|
||||||
X.RDB$UNIQUE_FLAG = (index->idx_unique) ? TRUE : FALSE;
|
X.RDB$UNIQUE_FLAG = (index->idx_unique) ? TRUE : FALSE;
|
||||||
if ((index->idx_flags & IDX_type_flag)
|
if (index->idx_flags & IDX_type_flag) {
|
||||||
&& (index->idx_type != IDX_type_none))
|
|
||||||
{
|
|
||||||
X.RDB$INDEX_TYPE = index->idx_type;
|
X.RDB$INDEX_TYPE = index->idx_type;
|
||||||
X.RDB$INDEX_TYPE.NULL = FALSE;
|
X.RDB$INDEX_TYPE.NULL = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1044,7 +1044,7 @@ static void define_index(void)
|
|||||||
SSHORT count;
|
SSHORT count;
|
||||||
bool unique = false;
|
bool unique = false;
|
||||||
bool inactive = false;
|
bool inactive = false;
|
||||||
bool descending = false;
|
idx_direction descending = IDX_type_none;
|
||||||
|
|
||||||
index_name = PARSE_symbol(tok_ident);
|
index_name = PARSE_symbol(tok_ident);
|
||||||
MATCH(KW_FOR);
|
MATCH(KW_FOR);
|
||||||
@ -1062,9 +1062,9 @@ static void define_index(void)
|
|||||||
else if (MATCH(KW_INACTIVE))
|
else if (MATCH(KW_INACTIVE))
|
||||||
inactive = true;
|
inactive = true;
|
||||||
else if (MATCH(KW_ASCENDING))
|
else if (MATCH(KW_ASCENDING))
|
||||||
descending = false;
|
descending = IDX_type_none;
|
||||||
else if (MATCH(KW_DESCENDING))
|
else if (MATCH(KW_DESCENDING))
|
||||||
descending = true;
|
descending = IDX_type_descend;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1089,7 +1089,7 @@ static void define_index(void)
|
|||||||
index->idx_unique = unique;
|
index->idx_unique = unique;
|
||||||
index->idx_description = description;
|
index->idx_description = description;
|
||||||
index->idx_inactive = inactive;
|
index->idx_inactive = inactive;
|
||||||
index->idx_type = IDX_type_none;
|
index->idx_type = descending;
|
||||||
|
|
||||||
ptr = &index->idx_field[count];
|
ptr = &index->idx_field[count];
|
||||||
|
|
||||||
@ -2542,11 +2542,11 @@ static void modify_index(void)
|
|||||||
index->idx_flags |= IDX_active_flag;
|
index->idx_flags |= IDX_active_flag;
|
||||||
}
|
}
|
||||||
else if (MATCH(KW_ASCENDING)) {
|
else if (MATCH(KW_ASCENDING)) {
|
||||||
index->idx_type = IDX_type_ascending;
|
index->idx_type = IDX_type_none;
|
||||||
index->idx_flags |= IDX_type_flag;
|
index->idx_flags |= IDX_type_flag;
|
||||||
}
|
}
|
||||||
else if (MATCH(KW_DESCENDING)) {
|
else if (MATCH(KW_DESCENDING)) {
|
||||||
index->idx_type = IDX_type_descending;
|
index->idx_type = IDX_type_descend;
|
||||||
index->idx_flags |= IDX_type_flag;
|
index->idx_flags |= IDX_type_flag;
|
||||||
}
|
}
|
||||||
else if (KEYWORD(KW_DESCRIPTION)) {
|
else if (KEYWORD(KW_DESCRIPTION)) {
|
||||||
|
@ -640,7 +640,7 @@ static void add_index( STR dyn, DUDLEY_IDX index)
|
|||||||
put_symbol(dyn, gds_dyn_rel_name, index->idx_relation);
|
put_symbol(dyn, gds_dyn_rel_name, index->idx_relation);
|
||||||
put_number(dyn, gds_dyn_idx_unique, (index->idx_unique) ? TRUE : FALSE);
|
put_number(dyn, gds_dyn_idx_unique, (index->idx_unique) ? TRUE : FALSE);
|
||||||
put_number(dyn, gds_dyn_idx_inactive, (index->idx_inactive) ? TRUE : FALSE);
|
put_number(dyn, gds_dyn_idx_inactive, (index->idx_inactive) ? TRUE : FALSE);
|
||||||
if (index->idx_type != IDX_type_none)
|
if (index->idx_type)
|
||||||
put_number(dyn, gds_dyn_idx_type, index->idx_type);
|
put_number(dyn, gds_dyn_idx_type, index->idx_type);
|
||||||
|
|
||||||
put_text(dyn, gds_dyn_description, index->idx_description);
|
put_text(dyn, gds_dyn_description, index->idx_description);
|
||||||
@ -1380,7 +1380,7 @@ static void modify_index( STR dyn, DUDLEY_IDX index)
|
|||||||
put_number(dyn, gds_dyn_idx_inactive,
|
put_number(dyn, gds_dyn_idx_inactive,
|
||||||
(index->idx_inactive) ? TRUE : FALSE);
|
(index->idx_inactive) ? TRUE : FALSE);
|
||||||
|
|
||||||
if ((index->idx_flags & IDX_type_flag) && (index->idx_type != IDX_type_none))
|
if (index->idx_flags & IDX_type_flag)
|
||||||
put_number(dyn, gds_dyn_idx_type, index->idx_type);
|
put_number(dyn, gds_dyn_idx_type, index->idx_type);
|
||||||
|
|
||||||
if (index->idx_flags & IDX_null_description) {
|
if (index->idx_flags & IDX_null_description) {
|
||||||
|
Loading…
Reference in New Issue
Block a user