mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 06:43:03 +01:00
Correct GTT's error reporting code as Claudio suggested
This commit is contained in:
parent
9690e55f0e
commit
c56ec0b730
@ -446,8 +446,11 @@ void DYN_define_constraint(Global* gbl,
|
|||||||
strcpy(CRT.RDB$INDEX_NAME, index_name.c_str());
|
strcpy(CRT.RDB$INDEX_NAME, index_name.c_str());
|
||||||
CRT.RDB$INDEX_NAME.NULL = FALSE;
|
CRT.RDB$INDEX_NAME.NULL = FALSE;
|
||||||
|
|
||||||
|
SSHORT old_id = id;
|
||||||
|
id = drq_l_rel_info;
|
||||||
check_foreign_key_temp_scope(tdbb, gbl,
|
check_foreign_key_temp_scope(tdbb, gbl,
|
||||||
relation_name->c_str(), referred_index_name.c_str());
|
relation_name->c_str(), referred_index_name.c_str());
|
||||||
|
id = old_id;
|
||||||
|
|
||||||
/* check that we have references permissions on the table and
|
/* check that we have references permissions on the table and
|
||||||
fields that the index:referred_index_name is on. */
|
fields that the index:referred_index_name is on. */
|
||||||
@ -3191,9 +3194,12 @@ void DYN_define_relation( Global* gbl, const UCHAR** ptr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSHORT old_id = id;
|
||||||
|
id = drq_l_rel_info2;
|
||||||
check_relation_temp_scope(tdbb, gbl,
|
check_relation_temp_scope(tdbb, gbl,
|
||||||
REL.RDB$RELATION_NAME,
|
REL.RDB$RELATION_NAME,
|
||||||
REL.RDB$FLAGS);
|
REL.RDB$FLAGS);
|
||||||
|
id = old_id;
|
||||||
|
|
||||||
if (sql_prot) {
|
if (sql_prot) {
|
||||||
if (!get_who(tdbb, gbl, owner_name))
|
if (!get_who(tdbb, gbl, owner_name))
|
||||||
@ -3300,6 +3306,8 @@ void DYN_define_relation( Global* gbl, const UCHAR** ptr)
|
|||||||
else if (id == drq_l_view_rels)
|
else if (id == drq_l_view_rels)
|
||||||
DYN_error_punt(true, 115, NULL, NULL, NULL, NULL, NULL);
|
DYN_error_punt(true, 115, NULL, NULL, NULL, NULL, NULL);
|
||||||
/* msg 115: "CREATE VIEW failed" */
|
/* msg 115: "CREATE VIEW failed" */
|
||||||
|
else if (id == drq_l_rel_info2)
|
||||||
|
ERR_punt();
|
||||||
|
|
||||||
/* Control should never reach this point, because id should
|
/* Control should never reach this point, because id should
|
||||||
always have one of the values test-for above. */
|
always have one of the values test-for above. */
|
||||||
|
Loading…
Reference in New Issue
Block a user