mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 20:43:03 +01:00
Allowed UK to be created on nullable columns (SQL-99 spec).
The index management code isn't ready for this yet, but appropriate changes will follow shortly.
This commit is contained in:
parent
b579326e15
commit
d3a7ab53c5
@ -258,7 +258,7 @@ void DYN_define_constraint(GBL gbl,
|
|||||||
int all_count, unique_count;
|
int all_count, unique_count;
|
||||||
LLS field_list = NULL, list_ptr;
|
LLS field_list = NULL, list_ptr;
|
||||||
STR str_;
|
STR str_;
|
||||||
USHORT found, foreign_flag = FALSE, not_null;
|
USHORT found, primary_flag = FALSE, foreign_flag = FALSE, not_null;
|
||||||
UCHAR ri_action = 0;
|
UCHAR ri_action = 0;
|
||||||
|
|
||||||
tdbb = GET_THREAD_DATA;
|
tdbb = GET_THREAD_DATA;
|
||||||
@ -292,6 +292,7 @@ void DYN_define_constraint(GBL gbl,
|
|||||||
switch (verb = *(*ptr)++)
|
switch (verb = *(*ptr)++)
|
||||||
{
|
{
|
||||||
case gds_dyn_def_primary_key:
|
case gds_dyn_def_primary_key:
|
||||||
|
primary_flag = TRUE;
|
||||||
strcpy(CRT.RDB$CONSTRAINT_TYPE, PRIMARY_KEY);
|
strcpy(CRT.RDB$CONSTRAINT_TYPE, PRIMARY_KEY);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ void DYN_define_constraint(GBL gbl,
|
|||||||
|
|
||||||
if ((FLX.RDB$NULL_FLAG.NULL || !FLX.RDB$NULL_FLAG) &&
|
if ((FLX.RDB$NULL_FLAG.NULL || !FLX.RDB$NULL_FLAG) &&
|
||||||
(RFR.RDB$NULL_FLAG.NULL || !RFR.RDB$NULL_FLAG) &&
|
(RFR.RDB$NULL_FLAG.NULL || !RFR.RDB$NULL_FLAG) &&
|
||||||
(foreign_flag == FALSE)) {
|
(primary_flag == TRUE)) {
|
||||||
not_null = FALSE;
|
not_null = FALSE;
|
||||||
DYN_terminate(RFR.RDB$FIELD_NAME, sizeof(RFR.RDB$FIELD_NAME));
|
DYN_terminate(RFR.RDB$FIELD_NAME, sizeof(RFR.RDB$FIELD_NAME));
|
||||||
strcpy(null_field_name, RFR.RDB$FIELD_NAME);
|
strcpy(null_field_name, RFR.RDB$FIELD_NAME);
|
||||||
|
Loading…
Reference in New Issue
Block a user