diff --git a/lang_helpers/gds_codes.ftn b/lang_helpers/gds_codes.ftn index 933e42f5ac..c9bbb46183 100644 --- a/lang_helpers/gds_codes.ftn +++ b/lang_helpers/gds_codes.ftn @@ -1480,6 +1480,8 @@ C -- PARAMETER (GDS__dsql_too_many_values = 336397211) INTEGER*4 GDS__dsql_no_array_computed PARAMETER (GDS__dsql_no_array_computed = 336397212) + INTEGER*4 GDS__dsql_implicit_domain_name + PARAMETER (GDS__dsql_implicit_domain_name = 336397213) INTEGER*4 GDS__gsec_cant_open_db PARAMETER (GDS__gsec_cant_open_db = 336723983) INTEGER*4 GDS__gsec_switches_error diff --git a/lang_helpers/gds_codes.pas b/lang_helpers/gds_codes.pas index b8376ee4e1..7af4a31b93 100644 --- a/lang_helpers/gds_codes.pas +++ b/lang_helpers/gds_codes.pas @@ -747,6 +747,7 @@ const gds_dsql_no_dup_name = 336397210; gds_dsql_too_many_values = 336397211; gds_dsql_no_array_computed = 336397212; + gds_dsql_implicit_domain_name = 336397213; gds_gsec_cant_open_db = 336723983; gds_gsec_switches_error = 336723984; gds_gsec_no_op_spec = 336723985; diff --git a/src/dsql/ddl.cpp b/src/dsql/ddl.cpp index e187e9026f..cd49770e70 100644 --- a/src/dsql/ddl.cpp +++ b/src/dsql/ddl.cpp @@ -88,6 +88,7 @@ #include "../jrd/thread_proto.h" #include "../jrd/gds_proto.h" #include "../jrd/why_proto.h" +#include "../common/utils_proto.h" #ifdef DSQL_DEBUG #include "../gpre/prett_proto.h" @@ -1632,6 +1633,13 @@ static void define_domain(dsql_req* request) dsql_nod* element = request->req_ddl_node; dsql_fld* field = (dsql_fld*) element->nod_arg[e_dom_name]; + if (fb_utils::implicit_domain(field->fld_name)) + { + ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, + isc_arg_gds, isc_dsql_implicit_domain_name, + isc_arg_string, field->fld_name, 0); + } + request->append_cstring(isc_dyn_def_global_fld, field->fld_name); DDL_resolve_intl_type(request, field, diff --git a/src/include/gen/codetext.h b/src/include/gen/codetext.h index e8da7f46e8..b8cd21fb52 100644 --- a/src/include/gen/codetext.h +++ b/src/include/gen/codetext.h @@ -736,6 +736,7 @@ static const struct { {"dsql_no_dup_name", 336397210}, {"dsql_too_many_values", 336397211}, {"dsql_no_array_computed", 336397212}, + {"dsql_implicit_domain_name", 336397213}, {"gsec_cant_open_db", 336723983}, {"gsec_switches_error", 336723984}, {"gsec_no_op_spec", 336723985}, diff --git a/src/include/gen/iberror.h b/src/include/gen/iberror.h index 72a5efefdc..20a29c74ea 100644 --- a/src/include/gen/iberror.h +++ b/src/include/gen/iberror.h @@ -769,6 +769,7 @@ const ISC_LONG isc_dsql_unknown_pos = 336397209L; const ISC_LONG isc_dsql_no_dup_name = 336397210L; const ISC_LONG isc_dsql_too_many_values = 336397211L; const ISC_LONG isc_dsql_no_array_computed = 336397212L; +const ISC_LONG isc_dsql_implicit_domain_name = 336397213L; const ISC_LONG isc_gsec_cant_open_db = 336723983L; const ISC_LONG isc_gsec_switches_error = 336723984L; const ISC_LONG isc_gsec_no_op_spec = 336723985L; @@ -828,7 +829,7 @@ const ISC_LONG isc_gstat_unexpected_eof = 336920580L; const ISC_LONG isc_gstat_open_err = 336920605L; const ISC_LONG isc_gstat_read_err = 336920606L; const ISC_LONG isc_gstat_sysmemex = 336920607L; -const ISC_LONG isc_err_max = 773; +const ISC_LONG isc_err_max = 774; #else /* c definitions */ @@ -1567,6 +1568,7 @@ const ISC_LONG isc_err_max = 773; #define isc_dsql_no_dup_name 336397210L #define isc_dsql_too_many_values 336397211L #define isc_dsql_no_array_computed 336397212L +#define isc_dsql_implicit_domain_name 336397213L #define isc_gsec_cant_open_db 336723983L #define isc_gsec_switches_error 336723984L #define isc_gsec_no_op_spec 336723985L @@ -1626,7 +1628,7 @@ const ISC_LONG isc_err_max = 773; #define isc_gstat_open_err 336920605L #define isc_gstat_read_err 336920606L #define isc_gstat_sysmemex 336920607L -#define isc_err_max 773 +#define isc_err_max 774 #endif diff --git a/src/include/gen/msgs.h b/src/include/gen/msgs.h index 80b301a37b..3a2ec13002 100644 --- a/src/include/gen/msgs.h +++ b/src/include/gen/msgs.h @@ -736,64 +736,65 @@ static const struct { {336397210, "Column %s cannot be repeated in %s statement"}, /* 712, dsql_no_dup_name */ {336397211, "Too many values (more than %d) in member list to match against"}, /* 713, dsql_too_many_values */ {336397212, "Array and BLOB data types not allowed in computed field"}, /* 714, dsql_no_array_computed */ - {336723983, "unable to open database"}, /* 715, gsec_cant_open_db */ - {336723984, "error in switch specifications"}, /* 716, gsec_switches_error */ - {336723985, "no operation specified"}, /* 717, gsec_no_op_spec */ - {336723986, "no user name specified"}, /* 718, gsec_no_usr_name */ - {336723987, "add record error"}, /* 719, gsec_err_add */ - {336723988, "modify record error"}, /* 720, gsec_err_modify */ - {336723989, "find/modify record error"}, /* 721, gsec_err_find_mod */ - {336723990, "record not found for user: %s"}, /* 722, gsec_err_rec_not_found */ - {336723991, "delete record error"}, /* 723, gsec_err_delete */ - {336723992, "find/delete record error"}, /* 724, gsec_err_find_del */ - {336723996, "find/display record error"}, /* 725, gsec_err_find_disp */ - {336723997, "invalid parameter, no switch defined"}, /* 726, gsec_inv_param */ - {336723998, "operation already specified"}, /* 727, gsec_op_specified */ - {336723999, "password already specified"}, /* 728, gsec_pw_specified */ - {336724000, "uid already specified"}, /* 729, gsec_uid_specified */ - {336724001, "gid already specified"}, /* 730, gsec_gid_specified */ - {336724002, "project already specified"}, /* 731, gsec_proj_specified */ - {336724003, "organization already specified"}, /* 732, gsec_org_specified */ - {336724004, "first name already specified"}, /* 733, gsec_fname_specified */ - {336724005, "middle name already specified"}, /* 734, gsec_mname_specified */ - {336724006, "last name already specified"}, /* 735, gsec_lname_specified */ - {336724008, "invalid switch specified"}, /* 736, gsec_inv_switch */ - {336724009, "ambiguous switch specified"}, /* 737, gsec_amb_switch */ - {336724010, "no operation specified for parameters"}, /* 738, gsec_no_op_specified */ - {336724011, "no parameters allowed for this operation"}, /* 739, gsec_params_not_allowed */ - {336724012, "incompatible switches specified"}, /* 740, gsec_incompat_switch */ - {336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 741, gsec_inv_username */ - {336724045, "Warning - maximum 8 significant bytes of password used"}, /* 742, gsec_inv_pw_length */ - {336724046, "database already specified"}, /* 743, gsec_db_specified */ - {336724047, "database administrator name already specified"}, /* 744, gsec_db_admin_specified */ - {336724048, "database administrator password already specified"}, /* 745, gsec_db_admin_pw_specified */ - {336724049, "SQL role name already specified"}, /* 746, gsec_sql_role_specified */ - {336789504, "The license file does not exist or could not be opened for read"}, /* 747, license_no_file */ - {336789523, "operation already specified"}, /* 748, license_op_specified */ - {336789524, "no operation specified"}, /* 749, license_op_missing */ - {336789525, "invalid switch"}, /* 750, license_inv_switch */ - {336789526, "invalid switch combination"}, /* 751, license_inv_switch_combo */ - {336789527, "illegal operation/switch combination"}, /* 752, license_inv_op_combo */ - {336789528, "ambiguous switch"}, /* 753, license_amb_switch */ - {336789529, "invalid parameter, no switch specified"}, /* 754, license_inv_parameter */ - {336789530, "switch does not take any parameter"}, /* 755, license_param_specified */ - {336789531, "switch requires a parameter"}, /* 756, license_param_req */ - {336789532, "syntax error in command line"}, /* 757, license_syntx_error */ - {336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 758, license_dup_id */ - {336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 759, license_inv_id_key */ - {336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 760, license_err_remove */ - {336789537, "An error occurred updating the license file. Operation cancelled."}, /* 761, license_err_update */ - {336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 762, license_err_convert */ - {336789539, "Operation failed. An unknown error occurred."}, /* 763, license_err_unk */ - {336789540, "Add license operation failed, KEY: %s ID: %s"}, /* 764, license_svc_err_add */ - {336789541, "Remove license operation failed, KEY: %s"}, /* 765, license_svc_err_remove */ - {336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 766, license_eval_exists */ - {336920577, "found unknown switch"}, /* 767, gstat_unknown_switch */ - {336920578, "please retry, giving a database name"}, /* 768, gstat_retry */ - {336920579, "Wrong ODS version, expected %d, encountered %d"}, /* 769, gstat_wrong_ods */ - {336920580, "Unexpected end of database file."}, /* 770, gstat_unexpected_eof */ - {336920605, "Can't open database file %s"}, /* 771, gstat_open_err */ - {336920606, "Can't read a database page"}, /* 772, gstat_read_err */ - {336920607, "System memory exhausted"}, /* 773, gstat_sysmemex */ + {336397213, "Implicit domain name %s not allowed in user created domain"}, /* 715, dsql_implicit_domain_name */ + {336723983, "unable to open database"}, /* 716, gsec_cant_open_db */ + {336723984, "error in switch specifications"}, /* 717, gsec_switches_error */ + {336723985, "no operation specified"}, /* 718, gsec_no_op_spec */ + {336723986, "no user name specified"}, /* 719, gsec_no_usr_name */ + {336723987, "add record error"}, /* 720, gsec_err_add */ + {336723988, "modify record error"}, /* 721, gsec_err_modify */ + {336723989, "find/modify record error"}, /* 722, gsec_err_find_mod */ + {336723990, "record not found for user: %s"}, /* 723, gsec_err_rec_not_found */ + {336723991, "delete record error"}, /* 724, gsec_err_delete */ + {336723992, "find/delete record error"}, /* 725, gsec_err_find_del */ + {336723996, "find/display record error"}, /* 726, gsec_err_find_disp */ + {336723997, "invalid parameter, no switch defined"}, /* 727, gsec_inv_param */ + {336723998, "operation already specified"}, /* 728, gsec_op_specified */ + {336723999, "password already specified"}, /* 729, gsec_pw_specified */ + {336724000, "uid already specified"}, /* 730, gsec_uid_specified */ + {336724001, "gid already specified"}, /* 731, gsec_gid_specified */ + {336724002, "project already specified"}, /* 732, gsec_proj_specified */ + {336724003, "organization already specified"}, /* 733, gsec_org_specified */ + {336724004, "first name already specified"}, /* 734, gsec_fname_specified */ + {336724005, "middle name already specified"}, /* 735, gsec_mname_specified */ + {336724006, "last name already specified"}, /* 736, gsec_lname_specified */ + {336724008, "invalid switch specified"}, /* 737, gsec_inv_switch */ + {336724009, "ambiguous switch specified"}, /* 738, gsec_amb_switch */ + {336724010, "no operation specified for parameters"}, /* 739, gsec_no_op_specified */ + {336724011, "no parameters allowed for this operation"}, /* 740, gsec_params_not_allowed */ + {336724012, "incompatible switches specified"}, /* 741, gsec_incompat_switch */ + {336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 742, gsec_inv_username */ + {336724045, "Warning - maximum 8 significant bytes of password used"}, /* 743, gsec_inv_pw_length */ + {336724046, "database already specified"}, /* 744, gsec_db_specified */ + {336724047, "database administrator name already specified"}, /* 745, gsec_db_admin_specified */ + {336724048, "database administrator password already specified"}, /* 746, gsec_db_admin_pw_specified */ + {336724049, "SQL role name already specified"}, /* 747, gsec_sql_role_specified */ + {336789504, "The license file does not exist or could not be opened for read"}, /* 748, license_no_file */ + {336789523, "operation already specified"}, /* 749, license_op_specified */ + {336789524, "no operation specified"}, /* 750, license_op_missing */ + {336789525, "invalid switch"}, /* 751, license_inv_switch */ + {336789526, "invalid switch combination"}, /* 752, license_inv_switch_combo */ + {336789527, "illegal operation/switch combination"}, /* 753, license_inv_op_combo */ + {336789528, "ambiguous switch"}, /* 754, license_amb_switch */ + {336789529, "invalid parameter, no switch specified"}, /* 755, license_inv_parameter */ + {336789530, "switch does not take any parameter"}, /* 756, license_param_specified */ + {336789531, "switch requires a parameter"}, /* 757, license_param_req */ + {336789532, "syntax error in command line"}, /* 758, license_syntx_error */ + {336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 759, license_dup_id */ + {336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 760, license_inv_id_key */ + {336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 761, license_err_remove */ + {336789537, "An error occurred updating the license file. Operation cancelled."}, /* 762, license_err_update */ + {336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 763, license_err_convert */ + {336789539, "Operation failed. An unknown error occurred."}, /* 764, license_err_unk */ + {336789540, "Add license operation failed, KEY: %s ID: %s"}, /* 765, license_svc_err_add */ + {336789541, "Remove license operation failed, KEY: %s"}, /* 766, license_svc_err_remove */ + {336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 767, license_eval_exists */ + {336920577, "found unknown switch"}, /* 768, gstat_unknown_switch */ + {336920578, "please retry, giving a database name"}, /* 769, gstat_retry */ + {336920579, "Wrong ODS version, expected %d, encountered %d"}, /* 770, gstat_wrong_ods */ + {336920580, "Unexpected end of database file."}, /* 771, gstat_unexpected_eof */ + {336920605, "Can't open database file %s"}, /* 772, gstat_open_err */ + {336920606, "Can't read a database page"}, /* 773, gstat_read_err */ + {336920607, "System memory exhausted"}, /* 774, gstat_sysmemex */ {0, NULL} }; diff --git a/src/include/gen/rdb_codes.h b/src/include/gen/rdb_codes.h index aecb6c1dfe..dd5eeeadae 100644 --- a/src/include/gen/rdb_codes.h +++ b/src/include/gen/rdb_codes.h @@ -792,4 +792,5 @@ static SLONG user_codes[] = { 0, 0, 0, +0, }; diff --git a/src/include/gen/sql_code.h b/src/include/gen/sql_code.h index 79e1b3e257..8f7a250968 100644 --- a/src/include/gen/sql_code.h +++ b/src/include/gen/sql_code.h @@ -735,6 +735,7 @@ static const struct { {336397210, -206}, /* 922 dsql_no_dup_name */ {336397211, -901}, /* 923 dsql_too_many_values */ {336397212, -607}, /* 924 dsql_no_array_computed */ + {336397213, -637}, /* 925 dsql_implicit_domain_name */ {336723983, -901}, /* 15 gsec_cant_open_db */ {336723984, -901}, /* 16 gsec_switches_error */ {336723985, -901}, /* 17 gsec_no_op_spec */ diff --git a/src/msgs/facilities.sql b/src/msgs/facilities.sql index 45cd22aab5..7681487c2f 100644 --- a/src/msgs/facilities.sql +++ b/src/msgs/facilities.sql @@ -16,7 +16,7 @@ INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('19 INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:39:40', 'INSTALL', 10, 1); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:41', 'TEST', 11, 4); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-07-28 06:38:03', 'GBAK', 12, 294); -INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-07-28 19:58:33', 'SQLERR', 13, 925); +INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-08-31 04:40:04', 'SQLERR', 13, 926); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:42', 'SQLWARN', 14, 102); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-02-03 18:30:00', 'JRD_BUGCHK', 15, 306); /* diff --git a/src/msgs/messages.sql b/src/msgs/messages.sql index 1efcbdf4e1..52340a8e80 100644 --- a/src/msgs/messages.sql +++ b/src/msgs/messages.sql @@ -3061,5 +3061,6 @@ INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FL INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('domnotdef', NULL, NULL, NULL, 0, 552, NULL, 'domain %s is not defined', NULL, NULL); INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('dsql_feature_not_supported_ods', '', 'ddl.cpp', NULL, 7, 25, NULL, 'Feature not supported on ODS version older than %d.%d', NULL, NULL); INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('', '', 'dyn_del.epp', NULL, 8, 239, NULL, 'Domain %s is used in procedure %s (parameter name %s) and cannot be dropped', NULL, NULL); +INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('dsql_implicit_domain_name', 'define_domain', 'ddl.cpp', NULL, 13, 925, NULL, 'Implicit domain name %s not allowed in user created domain', NULL, NULL); COMMIT WORK; diff --git a/src/msgs/system_errors.sql b/src/msgs/system_errors.sql index b4e5c86c4d..d6080d3389 100644 --- a/src/msgs/system_errors.sql +++ b/src/msgs/system_errors.sql @@ -772,5 +772,6 @@ INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-901, NULL, NULL, 551, 0, NULL, 'domain_name', NULL, NULL); INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-219, NULL, NULL, 552, 0, NULL, 'domnotdef', NULL, NULL); INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-804, NULL, NULL, 25, 7, NULL, 'dsql_feature_not_supported_ods', NULL, NULL); +INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-637, NULL, NULL, 925, 13, NULL, 'dsql_implicit_domain_name', NULL, NULL); COMMIT WORK;