diff --git a/lang_helpers/gds_codes.ftn b/lang_helpers/gds_codes.ftn index 60ccd891cc..cf9aa8cf59 100644 --- a/lang_helpers/gds_codes.ftn +++ b/lang_helpers/gds_codes.ftn @@ -1086,6 +1086,10 @@ C -- PARAMETER (GDS__concat_overflow = 335544836) INTEGER*4 GDS__bad_substring_param PARAMETER (GDS__bad_substring_param = 335544837) + INTEGER*4 GDS__foreign_key_target_doesnt_exist + PARAMETER (GDS__foreign_key_target_doesnt_exist = 335544838) + INTEGER*4 GDS__foreign_key_references_present + PARAMETER (GDS__foreign_key_references_present = 335544839) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw diff --git a/lang_helpers/gds_codes.pas b/lang_helpers/gds_codes.pas index 190366529f..46e5046a2c 100644 --- a/lang_helpers/gds_codes.pas +++ b/lang_helpers/gds_codes.pas @@ -550,6 +550,8 @@ const gds_bad_shutdown_mode = 335544835; gds_concat_overflow = 335544836; gds_bad_substring_param = 335544837; + gds_foreign_key_target_doesnt_exist = 335544838; + gds_foreign_key_references_present = 335544839; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; diff --git a/src/include/gen/codetext.h b/src/include/gen/codetext.h index b023855370..b90d330075 100644 --- a/src/include/gen/codetext.h +++ b/src/include/gen/codetext.h @@ -539,6 +539,8 @@ static const struct { {"bad_shutdown_mode", 335544835}, {"concat_overflow", 335544836}, {"bad_substring_param", 335544837}, + {"foreign_key_target_doesnt_exist", 335544838}, + {"foreign_key_references_present", 335544839}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, diff --git a/src/include/gen/iberror.h b/src/include/gen/iberror.h index 964665c8bb..860f2a3290 100644 --- a/src/include/gen/iberror.h +++ b/src/include/gen/iberror.h @@ -572,6 +572,8 @@ const SLONG isc_invalid_cursor_state = 335544834L; const SLONG isc_bad_shutdown_mode = 335544835L; const SLONG isc_concat_overflow = 335544836L; const SLONG isc_bad_substring_param = 335544837L; +const SLONG isc_foreign_key_target_doesnt_exist = 335544838L; +const SLONG isc_foreign_key_references_present = 335544839L; const SLONG isc_gfix_db_name = 335740929L; const SLONG isc_gfix_invalid_sw = 335740930L; const SLONG isc_gfix_incmp_sw = 335740932L; @@ -774,7 +776,7 @@ const SLONG isc_gstat_unexpected_eof = 336920580L; const SLONG isc_gstat_open_err = 336920605L; const SLONG isc_gstat_read_err = 336920606L; const SLONG isc_gstat_sysmemex = 336920607L; -const SLONG isc_err_max = 719; +const SLONG isc_err_max = 721; #else /* c definitions */ @@ -1316,6 +1318,8 @@ const SLONG isc_err_max = 719; #define isc_bad_shutdown_mode 335544835L #define isc_concat_overflow 335544836L #define isc_bad_substring_param 335544837L +#define isc_foreign_key_target_doesnt_exist 335544838L +#define isc_foreign_key_references_present 335544839L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -1518,7 +1522,7 @@ const SLONG isc_err_max = 719; #define isc_gstat_open_err 336920605L #define isc_gstat_read_err 336920606L #define isc_gstat_sysmemex 336920607L -#define isc_err_max 719 +#define isc_err_max 721 #endif diff --git a/src/include/gen/msgs.h b/src/include/gen/msgs.h index 4fb4748ae4..d656cb1da9 100644 --- a/src/include/gen/msgs.h +++ b/src/include/gen/msgs.h @@ -537,207 +537,209 @@ static const SCHAR * const messages[] = { "Target shutdown mode is invalid for database \"%s\"", /* 515, bad_shutdown_mode */ "Concatenation overflow. Resulting string cannot exceed 32K in length.", /* 516, concat_overflow */ "Invalid %s parameter to SUBSTRING. Only positive integers are allowed.", /* 517, bad_substring_param */ - "data base file name (%s) already given", /* 518, gfix_db_name */ - "invalid switch %s", /* 519, gfix_invalid_sw */ - "incompatible switch combination", /* 520, gfix_incmp_sw */ - "replay log pathname required", /* 521, gfix_replay_req */ - "number of page buffers for cache required", /* 522, gfix_pgbuf_req */ - "numeric value required", /* 523, gfix_val_req */ - "positive numeric value required", /* 524, gfix_pval_req */ - "number of transactions per sweep required", /* 525, gfix_trn_req */ - "\"full\" or \"reserve\" required", /* 526, gfix_full_req */ - "user name required", /* 527, gfix_usrname_req */ - "password required", /* 528, gfix_pass_req */ - "subsystem name", /* 529, gfix_subs_name */ - "\"wal\" required", /* 530, gfix_wal_req */ - "number of seconds required", /* 531, gfix_sec_req */ - "numeric value between 0 and 32767 inclusive required", /* 532, gfix_nval_req */ - "must specify type of shutdown", /* 533, gfix_type_shut */ - "please retry, specifying an option", /* 534, gfix_retry */ - "please retry, giving a database name", /* 535, gfix_retry_db */ - "internal block exceeds maximum size", /* 536, gfix_exceed_max */ - "corrupt pool", /* 537, gfix_corrupt_pool */ - "virtual memory exhausted", /* 538, gfix_mem_exhausted */ - "bad pool id", /* 539, gfix_bad_pool */ - "Transaction state %d not in valid range.", /* 540, gfix_trn_not_valid */ - "unexpected end of input", /* 541, gfix_unexp_eoi */ - "failed to reconnect to a transaction in database %s", /* 542, gfix_recon_fail */ - "Transaction description item unknown", /* 543, gfix_trn_unknown */ - "\"read_only\" or \"read_write\" required", /* 544, gfix_mode_req */ - " -sql_dialect set database dialect n", /* 545, gfix_opt_SQL_dialect */ - "Cannot SELECT RDB$DB_KEY from a stored procedure.", /* 546, dsql_dbkey_from_non_table */ - "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3", /* 547, dsql_transitional_numeric */ - "Use of %s expression that returns different results in dialect 1 and dialect 3", /* 548, dsql_dialect_warning_expr */ - "Database SQL dialect %d does not support reference to %s datatype", /* 549, sql_db_dialect_dtype_unsupport */ - "DB dialect %d and client dialect %d conflict with respect to numeric precision %d.", /* 550, isc_sql_dialect_conflict_num */ - "WARNING: Numeric literal %s is interpreted as a floating-point", /* 551, dsql_warning_number_ambiguous */ - "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3.", /* 552, dsql_warning_number_ambiguous1 */ - "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored", /* 553, dsql_warn_precision_ambiguous */ - "as approximate floating-point values in SQL dialect 1, but as 64-bit", /* 554, dsql_warn_precision_ambiguous1 */ - "integers in SQL dialect 3.", /* 555, dsql_warn_precision_ambiguous2 */ - "Ambiguous field name between %s and %s", /* 556, dsql_ambiguous_field_name */ - "External function should have return position between 1 and %d", /* 557, dsql_udf_return_pos_err */ - "Label %s %s in the current scope", /* 558, dsql_invalid_label */ - "Datatypes %sare not comparable in expression %s", /* 559, dsql_datatypes_not_comparable */ - "SQL role %s does not exist", /* 560, dyn_role_does_not_exist */ - "user %s has no grant admin option on SQL role %s", /* 561, dyn_no_grant_admin_opt */ - "user %s is not a member of SQL role %s", /* 562, dyn_user_not_role_member */ - "%s is not the owner of SQL role %s", /* 563, dyn_delete_role_failed */ - "%s is a SQL role and not a user", /* 564, dyn_grant_role_to_user */ - "user name %s could not be used for SQL role", /* 565, dyn_inv_sql_role_name */ - "SQL role %s already exists", /* 566, dyn_dup_sql_role */ - "keyword %s can not be used as a SQL role name", /* 567, dyn_kywd_spec_for_role */ - "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required.", /* 568, dyn_roles_not_supported */ - "Cannot rename domain %s to %s. A domain with that name already exists.", /* 569, dyn_domain_name_exists */ - "Cannot rename column %s to %s. A column with that name already exists in table %s.", /* 570, dyn_field_name_exists */ - "Column %s from table %s is referenced in %s", /* 571, dyn_dependency_exists */ - "Cannot change datatype for column %s. Changing datatype is not supported for BLOB or ARRAY columns.", /* 572, dyn_dtype_invalid */ - "New size specified for column %s must be at least %d characters.", /* 573, dyn_char_fld_too_small */ - "Cannot change datatype for %s. Conversion from base type %s to %s is not supported.", /* 574, dyn_invalid_dtype_conversion */ - "Cannot change datatype for column %s from a character type to a non-character type.", /* 575, dyn_dtype_conv_invalid */ - "Zero length identifiers are not allowed", /* 576, dyn_zero_len_id */ - "found unknown switch", /* 577, gbak_unknown_switch */ - "page size parameter missing", /* 578, gbak_page_size_missing */ - "Page size specified (%ld) greater than limit (8192 bytes)", /* 579, gbak_page_size_toobig */ - "redirect location for output is not specified", /* 580, gbak_redir_ouput_missing */ - "conflicting switches for backup/restore", /* 581, gbak_switches_conflict */ - "device type %s not known", /* 582, gbak_unknown_device */ - "protection is not there yet", /* 583, gbak_no_protection */ - "page size is allowed only on restore or create", /* 584, gbak_page_size_not_allowed */ - "multiple sources or destinations specified", /* 585, gbak_multi_source_dest */ - "requires both input and output filenames", /* 586, gbak_filename_missing */ - "input and output have the same name. Disallowed.", /* 587, gbak_dup_inout_names */ - "expected page size, encountered \"%s\"", /* 588, gbak_inv_page_size */ - "REPLACE specified, but the first file %s is a database", /* 589, gbak_db_specified */ - "database %s already exists. To replace it, use the -R switch", /* 590, gbak_db_exists */ - "device type not specified", /* 591, gbak_unk_device */ - "gds_$blob_info failed", /* 592, gbak_blob_info_failed */ - "do not understand BLOB INFO item %ld", /* 593, gbak_unk_blob_item */ - "gds_$get_segment failed", /* 594, gbak_get_seg_failed */ - "gds_$close_blob failed", /* 595, gbak_close_blob_failed */ - "gds_$open_blob failed", /* 596, gbak_open_blob_failed */ - "Failed in put_blr_gen_id", /* 597, gbak_put_blr_gen_id_failed */ - "data type %ld not understood", /* 598, gbak_unk_type */ - "gds_$compile_request failed", /* 599, gbak_comp_req_failed */ - "gds_$start_request failed", /* 600, gbak_start_req_failed */ - " gds_$receive failed", /* 601, gbak_rec_failed */ - "gds_$release_request failed", /* 602, gbak_rel_req_failed */ - " gds_$database_info failed", /* 603, gbak_db_info_failed */ - "Expected database description record", /* 604, gbak_no_db_desc */ - "failed to create database %s", /* 605, gbak_db_create_failed */ - "RESTORE: decompression length error", /* 606, gbak_decomp_len_error */ - "cannot find table %s", /* 607, gbak_tbl_missing */ - "Cannot find column for BLOB", /* 608, gbak_blob_col_missing */ - "gds_$create_blob failed", /* 609, gbak_create_blob_failed */ - "gds_$put_segment failed", /* 610, gbak_put_seg_failed */ - "expected record length", /* 611, gbak_rec_len_exp */ - "wrong length record, expected %ld encountered %ld", /* 612, gbak_inv_rec_len */ - "expected data attribute", /* 613, gbak_exp_data_type */ - "Failed in store_blr_gen_id", /* 614, gbak_gen_id_failed */ - "do not recognize record type %ld", /* 615, gbak_unk_rec_type */ - "Expected backup version 1, 2, or 3. Found %ld", /* 616, gbak_inv_bkup_ver */ - "expected backup description record", /* 617, gbak_missing_bkup_desc */ - "string truncated", /* 618, gbak_string_trunc */ - " warning -- record could not be restored", /* 619, gbak_cant_rest_record */ - "gds_$send failed", /* 620, gbak_send_failed */ - "no table name for data", /* 621, gbak_no_tbl_name */ - "unexpected end of file on backup file", /* 622, gbak_unexp_eof */ - "database format %ld is too old to restore to", /* 623, gbak_db_format_too_old */ - "array dimension for column %s is invalid", /* 624, gbak_inv_array_dim */ - "Expected XDR record length", /* 625, gbak_xdr_len_expected */ - "cannot open backup file %s", /* 626, gbak_open_bkup_error */ - "cannot open status and error output file %s", /* 627, gbak_open_error */ - "blocking factor parameter missing", /* 628, gbak_missing_block_fac */ - "expected blocking factor, encountered \"%s\"", /* 629, gbak_inv_block_fac */ - "a blocking factor may not be used in conjunction with device CT", /* 630, gbak_block_fac_specified */ - "user name parameter missing", /* 631, gbak_missing_username */ - "password parameter missing", /* 632, gbak_missing_password */ - " missing parameter for the number of bytes to be skipped", /* 633, gbak_missing_skipped_bytes */ - "expected number of bytes to be skipped, encountered \"%s\"", /* 634, gbak_inv_skipped_bytes */ - "Bad attribute for RDB$CHARACTER_SETS", /* 635, gbak_err_restore_charset */ - "Bad attribute for RDB$COLLATIONS", /* 636, gbak_err_restore_collation */ - "Unexpected I/O error while reading from backup file", /* 637, gbak_read_error */ - "Unexpected I/O error while writing to backup file", /* 638, gbak_write_error */ - "could not drop database %s (database might be in use)", /* 639, gbak_db_in_use */ - "System memory exhausted", /* 640, gbak_sysmemex */ - "Bad attributes for restoring SQL role", /* 641, gbak_restore_role_failed */ - "SQL role parameter missing", /* 642, gbak_role_op_missing */ - "page buffers parameter missing", /* 643, gbak_page_buffers_missing */ - "expected page buffers, encountered \"%s\"", /* 644, gbak_page_buffers_wrong_param */ - "page buffers is allowed only on restore or create", /* 645, gbak_page_buffers_restore */ - "size specification either missing or incorrect for file %s", /* 646, gbak_inv_size */ - "file %s out of sequence", /* 647, gbak_file_outof_sequence */ - "can't join -- one of the files missing", /* 648, gbak_join_file_missing */ - " standard input is not supported when using join operation", /* 649, gbak_stdin_not_supptd */ - "standard output is not supported when using split operation", /* 650, gbak_stdout_not_supptd */ - "backup file %s might be corrupt", /* 651, gbak_bkup_corrupt */ - "database file specification missing", /* 652, gbak_unk_db_file_spec */ - "can't write a header record to file %s", /* 653, gbak_hdr_write_failed */ - "free disk space exhausted", /* 654, gbak_disk_space_ex */ - "file size given (%d) is less than minimum allowed (%d)", /* 655, gbak_size_lt_min */ - "service name parameter missing", /* 656, gbak_svc_name_missing */ - "Cannot restore over current database, must be SYSDBA or owner of the existing database.", /* 657, gbak_not_ownr */ - "\"read_only\" or \"read_write\" required", /* 658, gbak_mode_req */ - "just data ignore all constraints etc.", /* 659, gbak_just_data */ - "restoring data only ignoring foreign key, unique, not null & other constraints", /* 660, gbak_data_only */ - "unable to open database", /* 661, gsec_cant_open_db */ - "error in switch specifications", /* 662, gsec_switches_error */ - "no operation specified", /* 663, gsec_no_op_spec */ - "no user name specified", /* 664, gsec_no_usr_name */ - "add record error", /* 665, gsec_err_add */ - "modify record error", /* 666, gsec_err_modify */ - "find/modify record error", /* 667, gsec_err_find_mod */ - "record not found for user: %s", /* 668, gsec_err_rec_not_found */ - "delete record error", /* 669, gsec_err_delete */ - "find/delete record error", /* 670, gsec_err_find_del */ - "find/display record error", /* 671, gsec_err_find_disp */ - "invalid parameter, no switch defined", /* 672, gsec_inv_param */ - "operation already specified", /* 673, gsec_op_specified */ - "password already specified", /* 674, gsec_pw_specified */ - "uid already specified", /* 675, gsec_uid_specified */ - "gid already specified", /* 676, gsec_gid_specified */ - "project already specified", /* 677, gsec_proj_specified */ - "organization already specified", /* 678, gsec_org_specified */ - "first name already specified", /* 679, gsec_fname_specified */ - "middle name already specified", /* 680, gsec_mname_specified */ - "last name already specified", /* 681, gsec_lname_specified */ - "invalid switch specified", /* 682, gsec_inv_switch */ - "ambiguous switch specified", /* 683, gsec_amb_switch */ - "no operation specified for parameters", /* 684, gsec_no_op_specified */ - "no parameters allowed for this operation", /* 685, gsec_params_not_allowed */ - "incompatible switches specified", /* 686, gsec_incompat_switch */ - "Invalid user name (maximum 31 bytes allowed)", /* 687, gsec_inv_username */ - "Warning - maximum 8 significant bytes of password used", /* 688, gsec_inv_pw_length */ - "database already specified", /* 689, gsec_db_specified */ - "database administrator name already specified", /* 690, gsec_db_admin_specified */ - "database administrator password already specified", /* 691, gsec_db_admin_pw_specified */ - "SQL role name already specified", /* 692, gsec_sql_role_specified */ - "The license file does not exist or could not be opened for read", /* 693, license_no_file */ - "operation already specified", /* 694, license_op_specified */ - "no operation specified", /* 695, license_op_missing */ - "invalid switch", /* 696, license_inv_switch */ - "invalid switch combination", /* 697, license_inv_switch_combo */ - "illegal operation/switch combination", /* 698, license_inv_op_combo */ - "ambiguous switch", /* 699, license_amb_switch */ - "invalid parameter, no switch specified", /* 700, license_inv_parameter */ - "switch does not take any parameter", /* 701, license_param_specified */ - "switch requires a parameter", /* 702, license_param_req */ - "syntax error in command line", /* 703, license_syntx_error */ - "The certificate was not added. A duplicate ID exists in the license file.", /* 704, license_dup_id */ - "The certificate was not added. Invalid certificate ID / Key combination.", /* 705, license_inv_id_key */ - "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license.", /* 706, license_err_remove */ - "An error occurred updating the license file. Operation cancelled.", /* 707, license_err_update */ - "The certificate could not be validated based on the information given. Please recheck the ID and key information.", /* 708, license_err_convert */ - "Operation failed. An unknown error occurred.", /* 709, license_err_unk */ - "Add license operation failed, KEY: %s ID: %s", /* 710, license_svc_err_add */ - "Remove license operation failed, KEY: %s", /* 711, license_svc_err_remove */ - "The evaluation license has already been used on this server. You need to purchase a non-evaluation license.", /* 712, license_eval_exists */ - "found unknown switch", /* 713, gstat_unknown_switch */ - "please retry, giving a database name", /* 714, gstat_retry */ - "Wrong ODS version, expected %d, encountered %d", /* 715, gstat_wrong_ods */ - "Unexpected end of database file.", /* 716, gstat_unexpected_eof */ - "Can't open database file %s", /* 717, gstat_open_err */ - "Can't read a database page", /* 718, gstat_read_err */ - "System memory exhausted", /* 719, gstat_sysmemex */ + "Foreign key reference target does not exist", /* 518, foreign_key_target_doesnt_exist */ + "Foreign key references are present for the record", /* 519, foreign_key_references_present */ + "data base file name (%s) already given", /* 520, gfix_db_name */ + "invalid switch %s", /* 521, gfix_invalid_sw */ + "incompatible switch combination", /* 522, gfix_incmp_sw */ + "replay log pathname required", /* 523, gfix_replay_req */ + "number of page buffers for cache required", /* 524, gfix_pgbuf_req */ + "numeric value required", /* 525, gfix_val_req */ + "positive numeric value required", /* 526, gfix_pval_req */ + "number of transactions per sweep required", /* 527, gfix_trn_req */ + "\"full\" or \"reserve\" required", /* 528, gfix_full_req */ + "user name required", /* 529, gfix_usrname_req */ + "password required", /* 530, gfix_pass_req */ + "subsystem name", /* 531, gfix_subs_name */ + "\"wal\" required", /* 532, gfix_wal_req */ + "number of seconds required", /* 533, gfix_sec_req */ + "numeric value between 0 and 32767 inclusive required", /* 534, gfix_nval_req */ + "must specify type of shutdown", /* 535, gfix_type_shut */ + "please retry, specifying an option", /* 536, gfix_retry */ + "please retry, giving a database name", /* 537, gfix_retry_db */ + "internal block exceeds maximum size", /* 538, gfix_exceed_max */ + "corrupt pool", /* 539, gfix_corrupt_pool */ + "virtual memory exhausted", /* 540, gfix_mem_exhausted */ + "bad pool id", /* 541, gfix_bad_pool */ + "Transaction state %d not in valid range.", /* 542, gfix_trn_not_valid */ + "unexpected end of input", /* 543, gfix_unexp_eoi */ + "failed to reconnect to a transaction in database %s", /* 544, gfix_recon_fail */ + "Transaction description item unknown", /* 545, gfix_trn_unknown */ + "\"read_only\" or \"read_write\" required", /* 546, gfix_mode_req */ + " -sql_dialect set database dialect n", /* 547, gfix_opt_SQL_dialect */ + "Cannot SELECT RDB$DB_KEY from a stored procedure.", /* 548, dsql_dbkey_from_non_table */ + "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3", /* 549, dsql_transitional_numeric */ + "Use of %s expression that returns different results in dialect 1 and dialect 3", /* 550, dsql_dialect_warning_expr */ + "Database SQL dialect %d does not support reference to %s datatype", /* 551, sql_db_dialect_dtype_unsupport */ + "DB dialect %d and client dialect %d conflict with respect to numeric precision %d.", /* 552, isc_sql_dialect_conflict_num */ + "WARNING: Numeric literal %s is interpreted as a floating-point", /* 553, dsql_warning_number_ambiguous */ + "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3.", /* 554, dsql_warning_number_ambiguous1 */ + "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored", /* 555, dsql_warn_precision_ambiguous */ + "as approximate floating-point values in SQL dialect 1, but as 64-bit", /* 556, dsql_warn_precision_ambiguous1 */ + "integers in SQL dialect 3.", /* 557, dsql_warn_precision_ambiguous2 */ + "Ambiguous field name between %s and %s", /* 558, dsql_ambiguous_field_name */ + "External function should have return position between 1 and %d", /* 559, dsql_udf_return_pos_err */ + "Label %s %s in the current scope", /* 560, dsql_invalid_label */ + "Datatypes %sare not comparable in expression %s", /* 561, dsql_datatypes_not_comparable */ + "SQL role %s does not exist", /* 562, dyn_role_does_not_exist */ + "user %s has no grant admin option on SQL role %s", /* 563, dyn_no_grant_admin_opt */ + "user %s is not a member of SQL role %s", /* 564, dyn_user_not_role_member */ + "%s is not the owner of SQL role %s", /* 565, dyn_delete_role_failed */ + "%s is a SQL role and not a user", /* 566, dyn_grant_role_to_user */ + "user name %s could not be used for SQL role", /* 567, dyn_inv_sql_role_name */ + "SQL role %s already exists", /* 568, dyn_dup_sql_role */ + "keyword %s can not be used as a SQL role name", /* 569, dyn_kywd_spec_for_role */ + "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required.", /* 570, dyn_roles_not_supported */ + "Cannot rename domain %s to %s. A domain with that name already exists.", /* 571, dyn_domain_name_exists */ + "Cannot rename column %s to %s. A column with that name already exists in table %s.", /* 572, dyn_field_name_exists */ + "Column %s from table %s is referenced in %s", /* 573, dyn_dependency_exists */ + "Cannot change datatype for column %s. Changing datatype is not supported for BLOB or ARRAY columns.", /* 574, dyn_dtype_invalid */ + "New size specified for column %s must be at least %d characters.", /* 575, dyn_char_fld_too_small */ + "Cannot change datatype for %s. Conversion from base type %s to %s is not supported.", /* 576, dyn_invalid_dtype_conversion */ + "Cannot change datatype for column %s from a character type to a non-character type.", /* 577, dyn_dtype_conv_invalid */ + "Zero length identifiers are not allowed", /* 578, dyn_zero_len_id */ + "found unknown switch", /* 579, gbak_unknown_switch */ + "page size parameter missing", /* 580, gbak_page_size_missing */ + "Page size specified (%ld) greater than limit (8192 bytes)", /* 581, gbak_page_size_toobig */ + "redirect location for output is not specified", /* 582, gbak_redir_ouput_missing */ + "conflicting switches for backup/restore", /* 583, gbak_switches_conflict */ + "device type %s not known", /* 584, gbak_unknown_device */ + "protection is not there yet", /* 585, gbak_no_protection */ + "page size is allowed only on restore or create", /* 586, gbak_page_size_not_allowed */ + "multiple sources or destinations specified", /* 587, gbak_multi_source_dest */ + "requires both input and output filenames", /* 588, gbak_filename_missing */ + "input and output have the same name. Disallowed.", /* 589, gbak_dup_inout_names */ + "expected page size, encountered \"%s\"", /* 590, gbak_inv_page_size */ + "REPLACE specified, but the first file %s is a database", /* 591, gbak_db_specified */ + "database %s already exists. To replace it, use the -R switch", /* 592, gbak_db_exists */ + "device type not specified", /* 593, gbak_unk_device */ + "gds_$blob_info failed", /* 594, gbak_blob_info_failed */ + "do not understand BLOB INFO item %ld", /* 595, gbak_unk_blob_item */ + "gds_$get_segment failed", /* 596, gbak_get_seg_failed */ + "gds_$close_blob failed", /* 597, gbak_close_blob_failed */ + "gds_$open_blob failed", /* 598, gbak_open_blob_failed */ + "Failed in put_blr_gen_id", /* 599, gbak_put_blr_gen_id_failed */ + "data type %ld not understood", /* 600, gbak_unk_type */ + "gds_$compile_request failed", /* 601, gbak_comp_req_failed */ + "gds_$start_request failed", /* 602, gbak_start_req_failed */ + " gds_$receive failed", /* 603, gbak_rec_failed */ + "gds_$release_request failed", /* 604, gbak_rel_req_failed */ + " gds_$database_info failed", /* 605, gbak_db_info_failed */ + "Expected database description record", /* 606, gbak_no_db_desc */ + "failed to create database %s", /* 607, gbak_db_create_failed */ + "RESTORE: decompression length error", /* 608, gbak_decomp_len_error */ + "cannot find table %s", /* 609, gbak_tbl_missing */ + "Cannot find column for BLOB", /* 610, gbak_blob_col_missing */ + "gds_$create_blob failed", /* 611, gbak_create_blob_failed */ + "gds_$put_segment failed", /* 612, gbak_put_seg_failed */ + "expected record length", /* 613, gbak_rec_len_exp */ + "wrong length record, expected %ld encountered %ld", /* 614, gbak_inv_rec_len */ + "expected data attribute", /* 615, gbak_exp_data_type */ + "Failed in store_blr_gen_id", /* 616, gbak_gen_id_failed */ + "do not recognize record type %ld", /* 617, gbak_unk_rec_type */ + "Expected backup version 1, 2, or 3. Found %ld", /* 618, gbak_inv_bkup_ver */ + "expected backup description record", /* 619, gbak_missing_bkup_desc */ + "string truncated", /* 620, gbak_string_trunc */ + " warning -- record could not be restored", /* 621, gbak_cant_rest_record */ + "gds_$send failed", /* 622, gbak_send_failed */ + "no table name for data", /* 623, gbak_no_tbl_name */ + "unexpected end of file on backup file", /* 624, gbak_unexp_eof */ + "database format %ld is too old to restore to", /* 625, gbak_db_format_too_old */ + "array dimension for column %s is invalid", /* 626, gbak_inv_array_dim */ + "Expected XDR record length", /* 627, gbak_xdr_len_expected */ + "cannot open backup file %s", /* 628, gbak_open_bkup_error */ + "cannot open status and error output file %s", /* 629, gbak_open_error */ + "blocking factor parameter missing", /* 630, gbak_missing_block_fac */ + "expected blocking factor, encountered \"%s\"", /* 631, gbak_inv_block_fac */ + "a blocking factor may not be used in conjunction with device CT", /* 632, gbak_block_fac_specified */ + "user name parameter missing", /* 633, gbak_missing_username */ + "password parameter missing", /* 634, gbak_missing_password */ + " missing parameter for the number of bytes to be skipped", /* 635, gbak_missing_skipped_bytes */ + "expected number of bytes to be skipped, encountered \"%s\"", /* 636, gbak_inv_skipped_bytes */ + "Bad attribute for RDB$CHARACTER_SETS", /* 637, gbak_err_restore_charset */ + "Bad attribute for RDB$COLLATIONS", /* 638, gbak_err_restore_collation */ + "Unexpected I/O error while reading from backup file", /* 639, gbak_read_error */ + "Unexpected I/O error while writing to backup file", /* 640, gbak_write_error */ + "could not drop database %s (database might be in use)", /* 641, gbak_db_in_use */ + "System memory exhausted", /* 642, gbak_sysmemex */ + "Bad attributes for restoring SQL role", /* 643, gbak_restore_role_failed */ + "SQL role parameter missing", /* 644, gbak_role_op_missing */ + "page buffers parameter missing", /* 645, gbak_page_buffers_missing */ + "expected page buffers, encountered \"%s\"", /* 646, gbak_page_buffers_wrong_param */ + "page buffers is allowed only on restore or create", /* 647, gbak_page_buffers_restore */ + "size specification either missing or incorrect for file %s", /* 648, gbak_inv_size */ + "file %s out of sequence", /* 649, gbak_file_outof_sequence */ + "can't join -- one of the files missing", /* 650, gbak_join_file_missing */ + " standard input is not supported when using join operation", /* 651, gbak_stdin_not_supptd */ + "standard output is not supported when using split operation", /* 652, gbak_stdout_not_supptd */ + "backup file %s might be corrupt", /* 653, gbak_bkup_corrupt */ + "database file specification missing", /* 654, gbak_unk_db_file_spec */ + "can't write a header record to file %s", /* 655, gbak_hdr_write_failed */ + "free disk space exhausted", /* 656, gbak_disk_space_ex */ + "file size given (%d) is less than minimum allowed (%d)", /* 657, gbak_size_lt_min */ + "service name parameter missing", /* 658, gbak_svc_name_missing */ + "Cannot restore over current database, must be SYSDBA or owner of the existing database.", /* 659, gbak_not_ownr */ + "\"read_only\" or \"read_write\" required", /* 660, gbak_mode_req */ + "just data ignore all constraints etc.", /* 661, gbak_just_data */ + "restoring data only ignoring foreign key, unique, not null & other constraints", /* 662, gbak_data_only */ + "unable to open database", /* 663, gsec_cant_open_db */ + "error in switch specifications", /* 664, gsec_switches_error */ + "no operation specified", /* 665, gsec_no_op_spec */ + "no user name specified", /* 666, gsec_no_usr_name */ + "add record error", /* 667, gsec_err_add */ + "modify record error", /* 668, gsec_err_modify */ + "find/modify record error", /* 669, gsec_err_find_mod */ + "record not found for user: %s", /* 670, gsec_err_rec_not_found */ + "delete record error", /* 671, gsec_err_delete */ + "find/delete record error", /* 672, gsec_err_find_del */ + "find/display record error", /* 673, gsec_err_find_disp */ + "invalid parameter, no switch defined", /* 674, gsec_inv_param */ + "operation already specified", /* 675, gsec_op_specified */ + "password already specified", /* 676, gsec_pw_specified */ + "uid already specified", /* 677, gsec_uid_specified */ + "gid already specified", /* 678, gsec_gid_specified */ + "project already specified", /* 679, gsec_proj_specified */ + "organization already specified", /* 680, gsec_org_specified */ + "first name already specified", /* 681, gsec_fname_specified */ + "middle name already specified", /* 682, gsec_mname_specified */ + "last name already specified", /* 683, gsec_lname_specified */ + "invalid switch specified", /* 684, gsec_inv_switch */ + "ambiguous switch specified", /* 685, gsec_amb_switch */ + "no operation specified for parameters", /* 686, gsec_no_op_specified */ + "no parameters allowed for this operation", /* 687, gsec_params_not_allowed */ + "incompatible switches specified", /* 688, gsec_incompat_switch */ + "Invalid user name (maximum 31 bytes allowed)", /* 689, gsec_inv_username */ + "Warning - maximum 8 significant bytes of password used", /* 690, gsec_inv_pw_length */ + "database already specified", /* 691, gsec_db_specified */ + "database administrator name already specified", /* 692, gsec_db_admin_specified */ + "database administrator password already specified", /* 693, gsec_db_admin_pw_specified */ + "SQL role name already specified", /* 694, gsec_sql_role_specified */ + "The license file does not exist or could not be opened for read", /* 695, license_no_file */ + "operation already specified", /* 696, license_op_specified */ + "no operation specified", /* 697, license_op_missing */ + "invalid switch", /* 698, license_inv_switch */ + "invalid switch combination", /* 699, license_inv_switch_combo */ + "illegal operation/switch combination", /* 700, license_inv_op_combo */ + "ambiguous switch", /* 701, license_amb_switch */ + "invalid parameter, no switch specified", /* 702, license_inv_parameter */ + "switch does not take any parameter", /* 703, license_param_specified */ + "switch requires a parameter", /* 704, license_param_req */ + "syntax error in command line", /* 705, license_syntx_error */ + "The certificate was not added. A duplicate ID exists in the license file.", /* 706, license_dup_id */ + "The certificate was not added. Invalid certificate ID / Key combination.", /* 707, license_inv_id_key */ + "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license.", /* 708, license_err_remove */ + "An error occurred updating the license file. Operation cancelled.", /* 709, license_err_update */ + "The certificate could not be validated based on the information given. Please recheck the ID and key information.", /* 710, license_err_convert */ + "Operation failed. An unknown error occurred.", /* 711, license_err_unk */ + "Add license operation failed, KEY: %s ID: %s", /* 712, license_svc_err_add */ + "Remove license operation failed, KEY: %s", /* 713, license_svc_err_remove */ + "The evaluation license has already been used on this server. You need to purchase a non-evaluation license.", /* 714, license_eval_exists */ + "found unknown switch", /* 715, gstat_unknown_switch */ + "please retry, giving a database name", /* 716, gstat_retry */ + "Wrong ODS version, expected %d, encountered %d", /* 717, gstat_wrong_ods */ + "Unexpected end of database file.", /* 718, gstat_unexpected_eof */ + "Can't open database file %s", /* 719, gstat_open_err */ + "Can't read a database page", /* 720, gstat_read_err */ + "System memory exhausted", /* 721, gstat_sysmemex */ 0 /* Null entry to terminate list */ }; diff --git a/src/include/gen/rdb_codes.h b/src/include/gen/rdb_codes.h index 51e3054e58..39892ecb49 100644 --- a/src/include/gen/rdb_codes.h +++ b/src/include/gen/rdb_codes.h @@ -738,4 +738,6 @@ static SLONG user_codes[] = { 0, 0, 0, +0, +0, }; diff --git a/src/include/gen/sql_code.h b/src/include/gen/sql_code.h index 3d2b2886b3..3b37efba4e 100644 --- a/src/include/gen/sql_code.h +++ b/src/include/gen/sql_code.h @@ -536,6 +536,8 @@ static const SSHORT gds__sql_code [] = { -901 /* 515 bad_shutdown_mode */, -802 /* 516 concat_overflow */, -204 /* 517 bad_substring_param */, +-530 /* 518 foreign_key_target_doesnt_exist */, +-530 /* 519 foreign_key_references_present */, -901 /* 1 gfix_db_name */, -901 /* 2 gfix_invalid_sw */, -901 /* 4 gfix_incmp_sw */, diff --git a/src/jrd/err.cpp b/src/jrd/err.cpp index a87db20c58..9b655c0416 100644 --- a/src/jrd/err.cpp +++ b/src/jrd/err.cpp @@ -203,10 +203,16 @@ void ERR_duplicate_error(IDX_E code, ERR_punt(); break; - case idx_e_foreign: - ERR_post(isc_foreign_key, - isc_arg_string, ERR_cstring(constraint_name), - isc_arg_string, relation->rel_name, 0); + case idx_e_foreign_target_doesnt_exist: + ERR_post(isc_foreign_key, isc_arg_string, ERR_cstring(constraint_name), + isc_arg_string, relation->rel_name, + isc_arg_gds, isc_foreign_key_target_doesnt_exist, 0); + break; + + case idx_e_foreign_references_present: + ERR_post(isc_foreign_key, isc_arg_string, ERR_cstring(constraint_name), + isc_arg_string, relation->rel_name, + isc_arg_gds, isc_foreign_key_references_present, 0); break; default: diff --git a/src/jrd/err_proto.h b/src/jrd/err_proto.h index 44cbfe7bcc..1582205021 100644 --- a/src/jrd/err_proto.h +++ b/src/jrd/err_proto.h @@ -37,7 +37,8 @@ enum idx_e { idx_e_duplicate, idx_e_keytoobig, idx_e_conversion, - idx_e_foreign + idx_e_foreign_target_doesnt_exist, + idx_e_foreign_references_present }; typedef idx_e IDX_E; diff --git a/src/jrd/idx.cpp b/src/jrd/idx.cpp index 3f134ac7d4..75d55afe48 100644 --- a/src/jrd/idx.cpp +++ b/src/jrd/idx.cpp @@ -1130,13 +1130,13 @@ static IDX_E check_partner_index( result = check_duplicates(tdbb, record, idx, &insertion, relation); if (idx->idx_flags & (idx_primary | idx_unique)) - result = result ? idx_e_foreign : idx_e_ok; + result = result ? idx_e_foreign_references_present : idx_e_ok; if (idx->idx_flags & idx_foreign) - result = result ? idx_e_ok : idx_e_foreign; + result = result ? idx_e_ok : idx_e_foreign_target_doesnt_exist; SBM_release(bitmap); } else if (idx->idx_flags & idx_foreign) { - result = idx_e_foreign; + result = idx_e_foreign_target_doesnt_exist; } } diff --git a/src/msgs/facilities.sql b/src/msgs/facilities.sql index d41e4d464a..aff96d93a1 100644 --- a/src/msgs/facilities.sql +++ b/src/msgs/facilities.sql @@ -1,6 +1,6 @@ CONNECT "msg.fdb"; -INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2004-02-24 01:05:00', 'JRD', 0, 516); +INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2004-08-28 16:14:00', 'JRD', 0, 519); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:37', 'QLI', 1, 509); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:37', 'GDEF', 2, 345); INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2004-04-02 21:18:26', 'GFIX', 3, 114); diff --git a/src/msgs/messages.sql b/src/msgs/messages.sql index 91acfce4da..ffa65f9f79 100644 --- a/src/msgs/messages.sql +++ b/src/msgs/messages.sql @@ -3173,5 +3173,7 @@ 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 ('concat_overflow', NULL, 'evl.cpp', NULL, 0, 516, NULL, 'Concatenation overflow. Resulting string cannot exceed 32K in length.', NULL, NULL); INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('bad_substring_param', NULL, 'evl.cpp', NULL, 0, 517, NULL, 'Invalid %s parameter to SUBSTRING. Only positive integers are allowed.', NULL, NULL); INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('HLP_SETPLANONLY', 'help', 'isql.epp', NULL, 17, 109, NULL, ' SET HEADING -- toggle display of query column titles', NULL, NULL); +INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('foreign_key_target_doesnt_exist', 'check_partner_index', 'IDX.C', NULL, 0, 518, NULL, 'Foreign key reference target does not exist', NULL, NULL); +INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('foreign_key_references_present', 'check_partner_index', 'IDX.C', NULL, 0, 519, NULL, 'Foreign key references are present for the record', NULL, NULL); COMMIT WORK; diff --git a/src/msgs/system_errors.sql b/src/msgs/system_errors.sql index a173db87d1..4f6e5a3247 100644 --- a/src/msgs/system_errors.sql +++ b/src/msgs/system_errors.sql @@ -720,5 +720,7 @@ 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, 515, 0, NULL, 'bad_shutdown_mode', NULL, NULL); INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-802, NULL, NULL, 516, 0, NULL, 'concat_overflow', NULL, NULL); INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-204, NULL, NULL, 517, 0, NULL, 'bad_substring_param', NULL, NULL); +INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-530, NULL, NULL, 518, 0, NULL, 'foreign_key_target_doesnt_exist', NULL, NULL); +INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-530, NULL, NULL, 519, 0, NULL, 'foreign_key_references_present', NULL, NULL); COMMIT WORK;