8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00

Solve three problems with arrays:

- Don't allow to apply scalar/subscript syntax to fields that aren't array.
- Detect if we get corrupt database containing array with more than 16 dimensions.
- Reject attempt to subscript array with more than 16 dimensions and thus fix the buffer overrun.
This commit is contained in:
robocop 2006-09-10 09:05:40 +00:00
parent 32a4368c89
commit af8ecc26ca
18 changed files with 275 additions and 244 deletions

View File

@ -1156,6 +1156,8 @@ C --
PARAMETER (GDS__domain_name = 335544871)
INTEGER*4 GDS__domnotdef
PARAMETER (GDS__domnotdef = 335544872)
INTEGER*4 GDS__array_max_dimensions
PARAMETER (GDS__array_max_dimensions = 335544873)
INTEGER*4 GDS__gfix_db_name
PARAMETER (GDS__gfix_db_name = 335740929)
INTEGER*4 GDS__gfix_invalid_sw
@ -1490,6 +1492,8 @@ C --
PARAMETER (GDS__dsql_no_array_computed = 336397212)
INTEGER*4 GDS__dsql_implicit_domain_name
PARAMETER (GDS__dsql_implicit_domain_name = 336397213)
INTEGER*4 GDS__dsql_only_can_subscript_array
PARAMETER (GDS__dsql_only_can_subscript_array = 336397214)
INTEGER*4 GDS__gsec_cant_open_db
PARAMETER (GDS__gsec_cant_open_db = 336723983)
INTEGER*4 GDS__gsec_switches_error

View File

@ -585,6 +585,7 @@ const
gds_collation_name = 335544870;
gds_domain_name = 335544871;
gds_domnotdef = 335544872;
gds_array_max_dimensions = 335544873;
gds_gfix_db_name = 335740929;
gds_gfix_invalid_sw = 335740930;
gds_gfix_incmp_sw = 335740932;
@ -752,6 +753,7 @@ const
gds_dsql_too_many_values = 336397211;
gds_dsql_no_array_computed = 336397212;
gds_dsql_implicit_domain_name = 336397213;
gds_dsql_only_can_subscript_array = 336397214;
gds_gsec_cant_open_db = 336723983;
gds_gsec_switches_error = 336723984;
gds_gsec_no_op_spec = 336723985;

View File

@ -240,8 +240,6 @@ enum fld_flags_vals {
FLD_system = 8
};
const int MAX_ARRAY_DIMENSIONS = 16; //!< max array dimensions
//! database/log/cache file block
class dsql_fil : public pool_alloc<dsql_type_fil>
{

View File

@ -1766,7 +1766,13 @@ dsql_nod* MAKE_field(dsql_ctx* context, dsql_fld* field, dsql_nod* indices)
}
}
else {
fb_assert(!indices);
if (indices)
{
ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607,
isc_arg_gds, isc_dsql_only_can_subscript_array,
isc_arg_string, field->fld_name, 0);
}
MAKE_desc_from_field(&node->nod_desc, field);
}

View File

@ -64,6 +64,7 @@
#include <stdio.h>
#include "../jrd/common.h"
#include "../jrd/ibase.h"
#include "../jrd/constants.h"
#ifdef GPRE_FORTRAN
#if defined AIX || defined AIX_PPC || defined sun
@ -344,8 +345,6 @@ const size_t VAL_LEN = sizeof(val);
Note: the dimension (dim) block used to hold dimension information.
The preferred mechanism is the repeating tail on the array block. */
const int MAX_ARRAY_DIMENSIONS = 16;
struct ary {
USHORT ary_dtype; /* data type of array */
int ary_dimension_count; /* Number of dimensions in this array */

View File

@ -574,6 +574,7 @@ static const struct {
{"collation_name", 335544870},
{"domain_name", 335544871},
{"domnotdef", 335544872},
{"array_max_dimensions", 335544873},
{"gfix_db_name", 335740929},
{"gfix_invalid_sw", 335740930},
{"gfix_incmp_sw", 335740932},
@ -741,6 +742,7 @@ static const struct {
{"dsql_too_many_values", 336397211},
{"dsql_no_array_computed", 336397212},
{"dsql_implicit_domain_name", 336397213},
{"dsql_only_can_subscript_array", 336397214},
{"gsec_cant_open_db", 336723983},
{"gsec_switches_error", 336723984},
{"gsec_no_op_spec", 336723985},

View File

@ -607,6 +607,7 @@ const ISC_LONG isc_invalid_sort_datatype = 335544869L;
const ISC_LONG isc_collation_name = 335544870L;
const ISC_LONG isc_domain_name = 335544871L;
const ISC_LONG isc_domnotdef = 335544872L;
const ISC_LONG isc_array_max_dimensions = 335544873L;
const ISC_LONG isc_gfix_db_name = 335740929L;
const ISC_LONG isc_gfix_invalid_sw = 335740930L;
const ISC_LONG isc_gfix_incmp_sw = 335740932L;
@ -774,6 +775,7 @@ 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_dsql_only_can_subscript_array = 336397214L;
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;
@ -833,7 +835,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 = 778;
const ISC_LONG isc_err_max = 780;
#else /* c definitions */
@ -1410,6 +1412,7 @@ const ISC_LONG isc_err_max = 778;
#define isc_collation_name 335544870L
#define isc_domain_name 335544871L
#define isc_domnotdef 335544872L
#define isc_array_max_dimensions 335544873L
#define isc_gfix_db_name 335740929L
#define isc_gfix_invalid_sw 335740930L
#define isc_gfix_incmp_sw 335740932L
@ -1577,6 +1580,7 @@ const ISC_LONG isc_err_max = 778;
#define isc_dsql_too_many_values 336397211L
#define isc_dsql_no_array_computed 336397212L
#define isc_dsql_implicit_domain_name 336397213L
#define isc_dsql_only_can_subscript_array 336397214L
#define isc_gsec_cant_open_db 336723983L
#define isc_gsec_switches_error 336723984L
#define isc_gsec_no_op_spec 336723985L
@ -1636,7 +1640,7 @@ const ISC_LONG isc_err_max = 778;
#define isc_gstat_open_err 336920605L
#define isc_gstat_read_err 336920606L
#define isc_gstat_sysmemex 336920607L
#define isc_err_max 778
#define isc_err_max 780
#endif

View File

@ -574,231 +574,233 @@ static const struct {
{335544870, "COLLATION %s"}, /* 550, collation_name */
{335544871, "DOMAIN %s"}, /* 551, domain_name */
{335544872, "domain %s is not defined"}, /* 552, domnotdef */
{335740929, "data base file name (%s) already given"}, /* 553, gfix_db_name */
{335740930, "invalid switch %s"}, /* 554, gfix_invalid_sw */
{335740932, "incompatible switch combination"}, /* 555, gfix_incmp_sw */
{335740933, "replay log pathname required"}, /* 556, gfix_replay_req */
{335740934, "number of page buffers for cache required"}, /* 557, gfix_pgbuf_req */
{335740935, "numeric value required"}, /* 558, gfix_val_req */
{335740936, "positive numeric value required"}, /* 559, gfix_pval_req */
{335740937, "number of transactions per sweep required"}, /* 560, gfix_trn_req */
{335740940, "\"full\" or \"reserve\" required"}, /* 561, gfix_full_req */
{335740941, "user name required"}, /* 562, gfix_usrname_req */
{335740942, "password required"}, /* 563, gfix_pass_req */
{335740943, "subsystem name"}, /* 564, gfix_subs_name */
{335740944, "\"wal\" required"}, /* 565, gfix_wal_req */
{335740945, "number of seconds required"}, /* 566, gfix_sec_req */
{335740946, "numeric value between 0 and 32767 inclusive required"}, /* 567, gfix_nval_req */
{335740947, "must specify type of shutdown"}, /* 568, gfix_type_shut */
{335740948, "please retry, specifying an option"}, /* 569, gfix_retry */
{335740951, "please retry, giving a database name"}, /* 570, gfix_retry_db */
{335740991, "internal block exceeds maximum size"}, /* 571, gfix_exceed_max */
{335740992, "corrupt pool"}, /* 572, gfix_corrupt_pool */
{335740993, "virtual memory exhausted"}, /* 573, gfix_mem_exhausted */
{335740994, "bad pool id"}, /* 574, gfix_bad_pool */
{335740995, "Transaction state %d not in valid range."}, /* 575, gfix_trn_not_valid */
{335741012, "unexpected end of input"}, /* 576, gfix_unexp_eoi */
{335741018, "failed to reconnect to a transaction in database %s"}, /* 577, gfix_recon_fail */
{335741036, "Transaction description item unknown"}, /* 578, gfix_trn_unknown */
{335741038, "\"read_only\" or \"read_write\" required"}, /* 579, gfix_mode_req */
{335741039, " -sql_dialect set database dialect n"}, /* 580, gfix_opt_SQL_dialect */
{335741042, "positive or zero numeric value required"}, /* 581, gfix_pzval_req */
{336003074, "Cannot SELECT RDB$DB_KEY from a stored procedure."}, /* 582, dsql_dbkey_from_non_table */
{336003075, "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3"}, /* 583, dsql_transitional_numeric */
{336003076, "Use of %s expression that returns different results in dialect 1 and dialect 3"}, /* 584, dsql_dialect_warning_expr */
{336003077, "Database SQL dialect %d does not support reference to %s datatype"}, /* 585, sql_db_dialect_dtype_unsupport */
{336003079, "DB dialect %d and client dialect %d conflict with respect to numeric precision %d."}, /* 586, isc_sql_dialect_conflict_num */
{336003080, "WARNING: Numeric literal %s is interpreted as a floating-point"}, /* 587, dsql_warning_number_ambiguous */
{336003081, "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3."}, /* 588, dsql_warning_number_ambiguous1 */
{336003082, "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored"}, /* 589, dsql_warn_precision_ambiguous */
{336003083, "as approximate floating-point values in SQL dialect 1, but as 64-bit"}, /* 590, dsql_warn_precision_ambiguous1 */
{336003084, "integers in SQL dialect 3."}, /* 591, dsql_warn_precision_ambiguous2 */
{336003085, "Ambiguous field name between %s and %s"}, /* 592, dsql_ambiguous_field_name */
{336003086, "External function should have return position between 1 and %d"}, /* 593, dsql_udf_return_pos_err */
{336003087, "Label %s %s in the current scope"}, /* 594, dsql_invalid_label */
{336003088, "Datatypes %sare not comparable in expression %s"}, /* 595, dsql_datatypes_not_comparable */
{336003089, "Empty cursor name is not allowed"}, /* 596, dsql_cursor_invalid */
{336003090, "Statement already has a cursor %s assigned"}, /* 597, dsql_cursor_redefined */
{336003091, "Cursor %s is not found in the current context"}, /* 598, dsql_cursor_not_found */
{336003092, "Cursor %s already exists in the current context"}, /* 599, dsql_cursor_exists */
{336003093, "Relation %s is ambiguous in cursor %s"}, /* 600, dsql_cursor_rel_ambiguous */
{336003094, "Relation %s is not found in cursor %s"}, /* 601, dsql_cursor_rel_not_found */
{336003095, "Cursor is not open"}, /* 602, dsql_cursor_not_open */
{336003096, "Data type %s is not supported for EXTERNAL TABLES. Relation '%s', field '%s'"}, /* 603, dsql_type_not_supp_ext_tab */
{336003097, "Feature not supported on ODS version older than %d.%d"}, /* 604, dsql_feature_not_supported_ods */
{336003098, "Primary key required on table %s"}, /* 605, primary_key_required */
{336003099, "REPLACE field list does not match primary key of table %s"}, /* 606, replace_doesnt_match_pk */
{336003100, "REPLACE field list does not match MATCHING clause"}, /* 607, replace_doesnt_match_matching */
{336003101, "REPLACE without MATCHING could not be used with views based on more than one table"}, /* 608, replace_with_complex_view */
{336068796, "SQL role %s does not exist"}, /* 609, dyn_role_does_not_exist */
{336068797, "user %s has no grant admin option on SQL role %s"}, /* 610, dyn_no_grant_admin_opt */
{336068798, "user %s is not a member of SQL role %s"}, /* 611, dyn_user_not_role_member */
{336068799, "%s is not the owner of SQL role %s"}, /* 612, dyn_delete_role_failed */
{336068800, "%s is a SQL role and not a user"}, /* 613, dyn_grant_role_to_user */
{336068801, "user name %s could not be used for SQL role"}, /* 614, dyn_inv_sql_role_name */
{336068802, "SQL role %s already exists"}, /* 615, dyn_dup_sql_role */
{336068803, "keyword %s can not be used as a SQL role name"}, /* 616, dyn_kywd_spec_for_role */
{336068804, "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required."}, /* 617, dyn_roles_not_supported */
{336068812, "Cannot rename domain %s to %s. A domain with that name already exists."}, /* 618, dyn_domain_name_exists */
{336068813, "Cannot rename column %s to %s. A column with that name already exists in table %s."}, /* 619, dyn_field_name_exists */
{336068814, "Column %s from table %s is referenced in %s"}, /* 620, dyn_dependency_exists */
{336068815, "Cannot change datatype for column %s. Changing datatype is not supported for BLOB or ARRAY columns."}, /* 621, dyn_dtype_invalid */
{336068816, "New size specified for column %s must be at least %d characters."}, /* 622, dyn_char_fld_too_small */
{336068817, "Cannot change datatype for %s. Conversion from base type %s to %s is not supported."}, /* 623, dyn_invalid_dtype_conversion */
{336068818, "Cannot change datatype for column %s from a character type to a non-character type."}, /* 624, dyn_dtype_conv_invalid */
{336068820, "Zero length identifiers are not allowed"}, /* 625, dyn_zero_len_id */
{336068840, "%s cannot reference %s"}, /* 626, dyn_wrong_gtt_scope */
{336330753, "found unknown switch"}, /* 627, gbak_unknown_switch */
{336330754, "page size parameter missing"}, /* 628, gbak_page_size_missing */
{336330755, "Page size specified (%ld) greater than limit (16384 bytes)"}, /* 629, gbak_page_size_toobig */
{336330756, "redirect location for output is not specified"}, /* 630, gbak_redir_ouput_missing */
{336330757, "conflicting switches for backup/restore"}, /* 631, gbak_switches_conflict */
{336330758, "device type %s not known"}, /* 632, gbak_unknown_device */
{336330759, "protection is not there yet"}, /* 633, gbak_no_protection */
{336330760, "page size is allowed only on restore or create"}, /* 634, gbak_page_size_not_allowed */
{336330761, "multiple sources or destinations specified"}, /* 635, gbak_multi_source_dest */
{336330762, "requires both input and output filenames"}, /* 636, gbak_filename_missing */
{336330763, "input and output have the same name. Disallowed."}, /* 637, gbak_dup_inout_names */
{336330764, "expected page size, encountered \"%s\""}, /* 638, gbak_inv_page_size */
{336330765, "REPLACE specified, but the first file %s is a database"}, /* 639, gbak_db_specified */
{336330766, "database %s already exists. To replace it, use the -REP switch"}, /* 640, gbak_db_exists */
{336330767, "device type not specified"}, /* 641, gbak_unk_device */
{336330772, "gds_$blob_info failed"}, /* 642, gbak_blob_info_failed */
{336330773, "do not understand BLOB INFO item %ld"}, /* 643, gbak_unk_blob_item */
{336330774, "gds_$get_segment failed"}, /* 644, gbak_get_seg_failed */
{336330775, "gds_$close_blob failed"}, /* 645, gbak_close_blob_failed */
{336330776, "gds_$open_blob failed"}, /* 646, gbak_open_blob_failed */
{336330777, "Failed in put_blr_gen_id"}, /* 647, gbak_put_blr_gen_id_failed */
{336330778, "data type %ld not understood"}, /* 648, gbak_unk_type */
{336330779, "gds_$compile_request failed"}, /* 649, gbak_comp_req_failed */
{336330780, "gds_$start_request failed"}, /* 650, gbak_start_req_failed */
{336330781, " gds_$receive failed"}, /* 651, gbak_rec_failed */
{336330782, "gds_$release_request failed"}, /* 652, gbak_rel_req_failed */
{336330783, " gds_$database_info failed"}, /* 653, gbak_db_info_failed */
{336330784, "Expected database description record"}, /* 654, gbak_no_db_desc */
{336330785, "failed to create database %s"}, /* 655, gbak_db_create_failed */
{336330786, "RESTORE: decompression length error"}, /* 656, gbak_decomp_len_error */
{336330787, "cannot find table %s"}, /* 657, gbak_tbl_missing */
{336330788, "Cannot find column for BLOB"}, /* 658, gbak_blob_col_missing */
{336330789, "gds_$create_blob failed"}, /* 659, gbak_create_blob_failed */
{336330790, "gds_$put_segment failed"}, /* 660, gbak_put_seg_failed */
{336330791, "expected record length"}, /* 661, gbak_rec_len_exp */
{336330792, "wrong length record, expected %ld encountered %ld"}, /* 662, gbak_inv_rec_len */
{336330793, "expected data attribute"}, /* 663, gbak_exp_data_type */
{336330794, "Failed in store_blr_gen_id"}, /* 664, gbak_gen_id_failed */
{336330795, "do not recognize record type %ld"}, /* 665, gbak_unk_rec_type */
{336330796, "Expected backup version 1..8. Found %ld"}, /* 666, gbak_inv_bkup_ver */
{336330797, "expected backup description record"}, /* 667, gbak_missing_bkup_desc */
{336330798, "string truncated"}, /* 668, gbak_string_trunc */
{336330799, " warning -- record could not be restored"}, /* 669, gbak_cant_rest_record */
{336330800, "gds_$send failed"}, /* 670, gbak_send_failed */
{336330801, "no table name for data"}, /* 671, gbak_no_tbl_name */
{336330802, "unexpected end of file on backup file"}, /* 672, gbak_unexp_eof */
{336330803, "database format %ld is too old to restore to"}, /* 673, gbak_db_format_too_old */
{336330804, "array dimension for column %s is invalid"}, /* 674, gbak_inv_array_dim */
{336330807, "Expected XDR record length"}, /* 675, gbak_xdr_len_expected */
{336330817, "cannot open backup file %s"}, /* 676, gbak_open_bkup_error */
{336330818, "cannot open status and error output file %s"}, /* 677, gbak_open_error */
{336330934, "blocking factor parameter missing"}, /* 678, gbak_missing_block_fac */
{336330935, "expected blocking factor, encountered \"%s\""}, /* 679, gbak_inv_block_fac */
{336330936, "a blocking factor may not be used in conjunction with device CT"}, /* 680, gbak_block_fac_specified */
{336330940, "user name parameter missing"}, /* 681, gbak_missing_username */
{336330941, "password parameter missing"}, /* 682, gbak_missing_password */
{336330952, " missing parameter for the number of bytes to be skipped"}, /* 683, gbak_missing_skipped_bytes */
{336330953, "expected number of bytes to be skipped, encountered \"%s\""}, /* 684, gbak_inv_skipped_bytes */
{336330965, "character set"}, /* 685, gbak_err_restore_charset */
{336330967, "collation"}, /* 686, gbak_err_restore_collation */
{336330972, "Unexpected I/O error while reading from backup file"}, /* 687, gbak_read_error */
{336330973, "Unexpected I/O error while writing to backup file"}, /* 688, gbak_write_error */
{336330985, "could not drop database %s (database might be in use)"}, /* 689, gbak_db_in_use */
{336330990, "System memory exhausted"}, /* 690, gbak_sysmemex */
{336331002, "SQL role"}, /* 691, gbak_restore_role_failed */
{336331005, "SQL role parameter missing"}, /* 692, gbak_role_op_missing */
{336331010, "page buffers parameter missing"}, /* 693, gbak_page_buffers_missing */
{336331011, "expected page buffers, encountered \"%s\""}, /* 694, gbak_page_buffers_wrong_param */
{336331012, "page buffers is allowed only on restore or create"}, /* 695, gbak_page_buffers_restore */
{336331014, "size specification either missing or incorrect for file %s"}, /* 696, gbak_inv_size */
{336331015, "file %s out of sequence"}, /* 697, gbak_file_outof_sequence */
{336331016, "can't join -- one of the files missing"}, /* 698, gbak_join_file_missing */
{336331017, " standard input is not supported when using join operation"}, /* 699, gbak_stdin_not_supptd */
{336331018, "standard output is not supported when using split operation"}, /* 700, gbak_stdout_not_supptd */
{336331019, "backup file %s might be corrupt"}, /* 701, gbak_bkup_corrupt */
{336331020, "database file specification missing"}, /* 702, gbak_unk_db_file_spec */
{336331021, "can't write a header record to file %s"}, /* 703, gbak_hdr_write_failed */
{336331022, "free disk space exhausted"}, /* 704, gbak_disk_space_ex */
{336331023, "file size given (%d) is less than minimum allowed (%d)"}, /* 705, gbak_size_lt_min */
{336331025, "service name parameter missing"}, /* 706, gbak_svc_name_missing */
{336331026, "Cannot restore over current database, must be SYSDBA or owner of the existing database."}, /* 707, gbak_not_ownr */
{336331031, "\"read_only\" or \"read_write\" required"}, /* 708, gbak_mode_req */
{336331033, "just data ignore all constraints etc."}, /* 709, gbak_just_data */
{336331034, "restoring data only ignoring foreign key, unique, not null & other constraints"}, /* 710, gbak_data_only */
{336397205, "ODS versions before ODS%d are not supported"}, /* 711, dsql_too_old_ods */
{336397206, "Table %s does not exist"}, /* 712, dsql_table_not_found */
{336397207, "View %s does not exist"}, /* 713, dsql_view_not_found */
{336397208, "At line %d, column %d"}, /* 714, dsql_line_col_error */
{336397209, "At unknown line and column"}, /* 715, dsql_unknown_pos */
{336397210, "Column %s cannot be repeated in %s statement"}, /* 716, dsql_no_dup_name */
{336397211, "Too many values (more than %d) in member list to match against"}, /* 717, dsql_too_many_values */
{336397212, "Array and BLOB data types not allowed in computed field"}, /* 718, dsql_no_array_computed */
{336397213, "Implicit domain name %s not allowed in user created domain"}, /* 719, dsql_implicit_domain_name */
{336723983, "unable to open database"}, /* 720, gsec_cant_open_db */
{336723984, "error in switch specifications"}, /* 721, gsec_switches_error */
{336723985, "no operation specified"}, /* 722, gsec_no_op_spec */
{336723986, "no user name specified"}, /* 723, gsec_no_usr_name */
{336723987, "add record error"}, /* 724, gsec_err_add */
{336723988, "modify record error"}, /* 725, gsec_err_modify */
{336723989, "find/modify record error"}, /* 726, gsec_err_find_mod */
{336723990, "record not found for user: %s"}, /* 727, gsec_err_rec_not_found */
{336723991, "delete record error"}, /* 728, gsec_err_delete */
{336723992, "find/delete record error"}, /* 729, gsec_err_find_del */
{336723996, "find/display record error"}, /* 730, gsec_err_find_disp */
{336723997, "invalid parameter, no switch defined"}, /* 731, gsec_inv_param */
{336723998, "operation already specified"}, /* 732, gsec_op_specified */
{336723999, "password already specified"}, /* 733, gsec_pw_specified */
{336724000, "uid already specified"}, /* 734, gsec_uid_specified */
{336724001, "gid already specified"}, /* 735, gsec_gid_specified */
{336724002, "project already specified"}, /* 736, gsec_proj_specified */
{336724003, "organization already specified"}, /* 737, gsec_org_specified */
{336724004, "first name already specified"}, /* 738, gsec_fname_specified */
{336724005, "middle name already specified"}, /* 739, gsec_mname_specified */
{336724006, "last name already specified"}, /* 740, gsec_lname_specified */
{336724008, "invalid switch specified"}, /* 741, gsec_inv_switch */
{336724009, "ambiguous switch specified"}, /* 742, gsec_amb_switch */
{336724010, "no operation specified for parameters"}, /* 743, gsec_no_op_specified */
{336724011, "no parameters allowed for this operation"}, /* 744, gsec_params_not_allowed */
{336724012, "incompatible switches specified"}, /* 745, gsec_incompat_switch */
{336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 746, gsec_inv_username */
{336724045, "Warning - maximum 8 significant bytes of password used"}, /* 747, gsec_inv_pw_length */
{336724046, "database already specified"}, /* 748, gsec_db_specified */
{336724047, "database administrator name already specified"}, /* 749, gsec_db_admin_specified */
{336724048, "database administrator password already specified"}, /* 750, gsec_db_admin_pw_specified */
{336724049, "SQL role name already specified"}, /* 751, gsec_sql_role_specified */
{336789504, "The license file does not exist or could not be opened for read"}, /* 752, license_no_file */
{336789523, "operation already specified"}, /* 753, license_op_specified */
{336789524, "no operation specified"}, /* 754, license_op_missing */
{336789525, "invalid switch"}, /* 755, license_inv_switch */
{336789526, "invalid switch combination"}, /* 756, license_inv_switch_combo */
{336789527, "illegal operation/switch combination"}, /* 757, license_inv_op_combo */
{336789528, "ambiguous switch"}, /* 758, license_amb_switch */
{336789529, "invalid parameter, no switch specified"}, /* 759, license_inv_parameter */
{336789530, "switch does not take any parameter"}, /* 760, license_param_specified */
{336789531, "switch requires a parameter"}, /* 761, license_param_req */
{336789532, "syntax error in command line"}, /* 762, license_syntx_error */
{336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 763, license_dup_id */
{336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 764, license_inv_id_key */
{336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 765, license_err_remove */
{336789537, "An error occurred updating the license file. Operation cancelled."}, /* 766, license_err_update */
{336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 767, license_err_convert */
{336789539, "Operation failed. An unknown error occurred."}, /* 768, license_err_unk */
{336789540, "Add license operation failed, KEY: %s ID: %s"}, /* 769, license_svc_err_add */
{336789541, "Remove license operation failed, KEY: %s"}, /* 770, license_svc_err_remove */
{336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 771, license_eval_exists */
{336920577, "found unknown switch"}, /* 772, gstat_unknown_switch */
{336920578, "please retry, giving a database name"}, /* 773, gstat_retry */
{336920579, "Wrong ODS version, expected %d, encountered %d"}, /* 774, gstat_wrong_ods */
{336920580, "Unexpected end of database file."}, /* 775, gstat_unexpected_eof */
{336920605, "Can't open database file %s"}, /* 776, gstat_open_err */
{336920606, "Can't read a database page"}, /* 777, gstat_read_err */
{336920607, "System memory exhausted"}, /* 778, gstat_sysmemex */
{335544873, "Array data type can use up to %d dimensions"}, /* 553, array_max_dimensions */
{335740929, "data base file name (%s) already given"}, /* 554, gfix_db_name */
{335740930, "invalid switch %s"}, /* 555, gfix_invalid_sw */
{335740932, "incompatible switch combination"}, /* 556, gfix_incmp_sw */
{335740933, "replay log pathname required"}, /* 557, gfix_replay_req */
{335740934, "number of page buffers for cache required"}, /* 558, gfix_pgbuf_req */
{335740935, "numeric value required"}, /* 559, gfix_val_req */
{335740936, "positive numeric value required"}, /* 560, gfix_pval_req */
{335740937, "number of transactions per sweep required"}, /* 561, gfix_trn_req */
{335740940, "\"full\" or \"reserve\" required"}, /* 562, gfix_full_req */
{335740941, "user name required"}, /* 563, gfix_usrname_req */
{335740942, "password required"}, /* 564, gfix_pass_req */
{335740943, "subsystem name"}, /* 565, gfix_subs_name */
{335740944, "\"wal\" required"}, /* 566, gfix_wal_req */
{335740945, "number of seconds required"}, /* 567, gfix_sec_req */
{335740946, "numeric value between 0 and 32767 inclusive required"}, /* 568, gfix_nval_req */
{335740947, "must specify type of shutdown"}, /* 569, gfix_type_shut */
{335740948, "please retry, specifying an option"}, /* 570, gfix_retry */
{335740951, "please retry, giving a database name"}, /* 571, gfix_retry_db */
{335740991, "internal block exceeds maximum size"}, /* 572, gfix_exceed_max */
{335740992, "corrupt pool"}, /* 573, gfix_corrupt_pool */
{335740993, "virtual memory exhausted"}, /* 574, gfix_mem_exhausted */
{335740994, "bad pool id"}, /* 575, gfix_bad_pool */
{335740995, "Transaction state %d not in valid range."}, /* 576, gfix_trn_not_valid */
{335741012, "unexpected end of input"}, /* 577, gfix_unexp_eoi */
{335741018, "failed to reconnect to a transaction in database %s"}, /* 578, gfix_recon_fail */
{335741036, "Transaction description item unknown"}, /* 579, gfix_trn_unknown */
{335741038, "\"read_only\" or \"read_write\" required"}, /* 580, gfix_mode_req */
{335741039, " -sql_dialect set database dialect n"}, /* 581, gfix_opt_SQL_dialect */
{335741042, "positive or zero numeric value required"}, /* 582, gfix_pzval_req */
{336003074, "Cannot SELECT RDB$DB_KEY from a stored procedure."}, /* 583, dsql_dbkey_from_non_table */
{336003075, "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3"}, /* 584, dsql_transitional_numeric */
{336003076, "Use of %s expression that returns different results in dialect 1 and dialect 3"}, /* 585, dsql_dialect_warning_expr */
{336003077, "Database SQL dialect %d does not support reference to %s datatype"}, /* 586, sql_db_dialect_dtype_unsupport */
{336003079, "DB dialect %d and client dialect %d conflict with respect to numeric precision %d."}, /* 587, isc_sql_dialect_conflict_num */
{336003080, "WARNING: Numeric literal %s is interpreted as a floating-point"}, /* 588, dsql_warning_number_ambiguous */
{336003081, "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3."}, /* 589, dsql_warning_number_ambiguous1 */
{336003082, "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored"}, /* 590, dsql_warn_precision_ambiguous */
{336003083, "as approximate floating-point values in SQL dialect 1, but as 64-bit"}, /* 591, dsql_warn_precision_ambiguous1 */
{336003084, "integers in SQL dialect 3."}, /* 592, dsql_warn_precision_ambiguous2 */
{336003085, "Ambiguous field name between %s and %s"}, /* 593, dsql_ambiguous_field_name */
{336003086, "External function should have return position between 1 and %d"}, /* 594, dsql_udf_return_pos_err */
{336003087, "Label %s %s in the current scope"}, /* 595, dsql_invalid_label */
{336003088, "Datatypes %sare not comparable in expression %s"}, /* 596, dsql_datatypes_not_comparable */
{336003089, "Empty cursor name is not allowed"}, /* 597, dsql_cursor_invalid */
{336003090, "Statement already has a cursor %s assigned"}, /* 598, dsql_cursor_redefined */
{336003091, "Cursor %s is not found in the current context"}, /* 599, dsql_cursor_not_found */
{336003092, "Cursor %s already exists in the current context"}, /* 600, dsql_cursor_exists */
{336003093, "Relation %s is ambiguous in cursor %s"}, /* 601, dsql_cursor_rel_ambiguous */
{336003094, "Relation %s is not found in cursor %s"}, /* 602, dsql_cursor_rel_not_found */
{336003095, "Cursor is not open"}, /* 603, dsql_cursor_not_open */
{336003096, "Data type %s is not supported for EXTERNAL TABLES. Relation '%s', field '%s'"}, /* 604, dsql_type_not_supp_ext_tab */
{336003097, "Feature not supported on ODS version older than %d.%d"}, /* 605, dsql_feature_not_supported_ods */
{336003098, "Primary key required on table %s"}, /* 606, primary_key_required */
{336003099, "REPLACE field list does not match primary key of table %s"}, /* 607, replace_doesnt_match_pk */
{336003100, "REPLACE field list does not match MATCHING clause"}, /* 608, replace_doesnt_match_matching */
{336003101, "REPLACE without MATCHING could not be used with views based on more than one table"}, /* 609, replace_with_complex_view */
{336068796, "SQL role %s does not exist"}, /* 610, dyn_role_does_not_exist */
{336068797, "user %s has no grant admin option on SQL role %s"}, /* 611, dyn_no_grant_admin_opt */
{336068798, "user %s is not a member of SQL role %s"}, /* 612, dyn_user_not_role_member */
{336068799, "%s is not the owner of SQL role %s"}, /* 613, dyn_delete_role_failed */
{336068800, "%s is a SQL role and not a user"}, /* 614, dyn_grant_role_to_user */
{336068801, "user name %s could not be used for SQL role"}, /* 615, dyn_inv_sql_role_name */
{336068802, "SQL role %s already exists"}, /* 616, dyn_dup_sql_role */
{336068803, "keyword %s can not be used as a SQL role name"}, /* 617, dyn_kywd_spec_for_role */
{336068804, "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required."}, /* 618, dyn_roles_not_supported */
{336068812, "Cannot rename domain %s to %s. A domain with that name already exists."}, /* 619, dyn_domain_name_exists */
{336068813, "Cannot rename column %s to %s. A column with that name already exists in table %s."}, /* 620, dyn_field_name_exists */
{336068814, "Column %s from table %s is referenced in %s"}, /* 621, dyn_dependency_exists */
{336068815, "Cannot change datatype for column %s. Changing datatype is not supported for BLOB or ARRAY columns."}, /* 622, dyn_dtype_invalid */
{336068816, "New size specified for column %s must be at least %d characters."}, /* 623, dyn_char_fld_too_small */
{336068817, "Cannot change datatype for %s. Conversion from base type %s to %s is not supported."}, /* 624, dyn_invalid_dtype_conversion */
{336068818, "Cannot change datatype for column %s from a character type to a non-character type."}, /* 625, dyn_dtype_conv_invalid */
{336068820, "Zero length identifiers are not allowed"}, /* 626, dyn_zero_len_id */
{336068840, "%s cannot reference %s"}, /* 627, dyn_wrong_gtt_scope */
{336330753, "found unknown switch"}, /* 628, gbak_unknown_switch */
{336330754, "page size parameter missing"}, /* 629, gbak_page_size_missing */
{336330755, "Page size specified (%ld) greater than limit (16384 bytes)"}, /* 630, gbak_page_size_toobig */
{336330756, "redirect location for output is not specified"}, /* 631, gbak_redir_ouput_missing */
{336330757, "conflicting switches for backup/restore"}, /* 632, gbak_switches_conflict */
{336330758, "device type %s not known"}, /* 633, gbak_unknown_device */
{336330759, "protection is not there yet"}, /* 634, gbak_no_protection */
{336330760, "page size is allowed only on restore or create"}, /* 635, gbak_page_size_not_allowed */
{336330761, "multiple sources or destinations specified"}, /* 636, gbak_multi_source_dest */
{336330762, "requires both input and output filenames"}, /* 637, gbak_filename_missing */
{336330763, "input and output have the same name. Disallowed."}, /* 638, gbak_dup_inout_names */
{336330764, "expected page size, encountered \"%s\""}, /* 639, gbak_inv_page_size */
{336330765, "REPLACE specified, but the first file %s is a database"}, /* 640, gbak_db_specified */
{336330766, "database %s already exists. To replace it, use the -REP switch"}, /* 641, gbak_db_exists */
{336330767, "device type not specified"}, /* 642, gbak_unk_device */
{336330772, "gds_$blob_info failed"}, /* 643, gbak_blob_info_failed */
{336330773, "do not understand BLOB INFO item %ld"}, /* 644, gbak_unk_blob_item */
{336330774, "gds_$get_segment failed"}, /* 645, gbak_get_seg_failed */
{336330775, "gds_$close_blob failed"}, /* 646, gbak_close_blob_failed */
{336330776, "gds_$open_blob failed"}, /* 647, gbak_open_blob_failed */
{336330777, "Failed in put_blr_gen_id"}, /* 648, gbak_put_blr_gen_id_failed */
{336330778, "data type %ld not understood"}, /* 649, gbak_unk_type */
{336330779, "gds_$compile_request failed"}, /* 650, gbak_comp_req_failed */
{336330780, "gds_$start_request failed"}, /* 651, gbak_start_req_failed */
{336330781, " gds_$receive failed"}, /* 652, gbak_rec_failed */
{336330782, "gds_$release_request failed"}, /* 653, gbak_rel_req_failed */
{336330783, " gds_$database_info failed"}, /* 654, gbak_db_info_failed */
{336330784, "Expected database description record"}, /* 655, gbak_no_db_desc */
{336330785, "failed to create database %s"}, /* 656, gbak_db_create_failed */
{336330786, "RESTORE: decompression length error"}, /* 657, gbak_decomp_len_error */
{336330787, "cannot find table %s"}, /* 658, gbak_tbl_missing */
{336330788, "Cannot find column for BLOB"}, /* 659, gbak_blob_col_missing */
{336330789, "gds_$create_blob failed"}, /* 660, gbak_create_blob_failed */
{336330790, "gds_$put_segment failed"}, /* 661, gbak_put_seg_failed */
{336330791, "expected record length"}, /* 662, gbak_rec_len_exp */
{336330792, "wrong length record, expected %ld encountered %ld"}, /* 663, gbak_inv_rec_len */
{336330793, "expected data attribute"}, /* 664, gbak_exp_data_type */
{336330794, "Failed in store_blr_gen_id"}, /* 665, gbak_gen_id_failed */
{336330795, "do not recognize record type %ld"}, /* 666, gbak_unk_rec_type */
{336330796, "Expected backup version 1..8. Found %ld"}, /* 667, gbak_inv_bkup_ver */
{336330797, "expected backup description record"}, /* 668, gbak_missing_bkup_desc */
{336330798, "string truncated"}, /* 669, gbak_string_trunc */
{336330799, " warning -- record could not be restored"}, /* 670, gbak_cant_rest_record */
{336330800, "gds_$send failed"}, /* 671, gbak_send_failed */
{336330801, "no table name for data"}, /* 672, gbak_no_tbl_name */
{336330802, "unexpected end of file on backup file"}, /* 673, gbak_unexp_eof */
{336330803, "database format %ld is too old to restore to"}, /* 674, gbak_db_format_too_old */
{336330804, "array dimension for column %s is invalid"}, /* 675, gbak_inv_array_dim */
{336330807, "Expected XDR record length"}, /* 676, gbak_xdr_len_expected */
{336330817, "cannot open backup file %s"}, /* 677, gbak_open_bkup_error */
{336330818, "cannot open status and error output file %s"}, /* 678, gbak_open_error */
{336330934, "blocking factor parameter missing"}, /* 679, gbak_missing_block_fac */
{336330935, "expected blocking factor, encountered \"%s\""}, /* 680, gbak_inv_block_fac */
{336330936, "a blocking factor may not be used in conjunction with device CT"}, /* 681, gbak_block_fac_specified */
{336330940, "user name parameter missing"}, /* 682, gbak_missing_username */
{336330941, "password parameter missing"}, /* 683, gbak_missing_password */
{336330952, " missing parameter for the number of bytes to be skipped"}, /* 684, gbak_missing_skipped_bytes */
{336330953, "expected number of bytes to be skipped, encountered \"%s\""}, /* 685, gbak_inv_skipped_bytes */
{336330965, "character set"}, /* 686, gbak_err_restore_charset */
{336330967, "collation"}, /* 687, gbak_err_restore_collation */
{336330972, "Unexpected I/O error while reading from backup file"}, /* 688, gbak_read_error */
{336330973, "Unexpected I/O error while writing to backup file"}, /* 689, gbak_write_error */
{336330985, "could not drop database %s (database might be in use)"}, /* 690, gbak_db_in_use */
{336330990, "System memory exhausted"}, /* 691, gbak_sysmemex */
{336331002, "SQL role"}, /* 692, gbak_restore_role_failed */
{336331005, "SQL role parameter missing"}, /* 693, gbak_role_op_missing */
{336331010, "page buffers parameter missing"}, /* 694, gbak_page_buffers_missing */
{336331011, "expected page buffers, encountered \"%s\""}, /* 695, gbak_page_buffers_wrong_param */
{336331012, "page buffers is allowed only on restore or create"}, /* 696, gbak_page_buffers_restore */
{336331014, "size specification either missing or incorrect for file %s"}, /* 697, gbak_inv_size */
{336331015, "file %s out of sequence"}, /* 698, gbak_file_outof_sequence */
{336331016, "can't join -- one of the files missing"}, /* 699, gbak_join_file_missing */
{336331017, " standard input is not supported when using join operation"}, /* 700, gbak_stdin_not_supptd */
{336331018, "standard output is not supported when using split operation"}, /* 701, gbak_stdout_not_supptd */
{336331019, "backup file %s might be corrupt"}, /* 702, gbak_bkup_corrupt */
{336331020, "database file specification missing"}, /* 703, gbak_unk_db_file_spec */
{336331021, "can't write a header record to file %s"}, /* 704, gbak_hdr_write_failed */
{336331022, "free disk space exhausted"}, /* 705, gbak_disk_space_ex */
{336331023, "file size given (%d) is less than minimum allowed (%d)"}, /* 706, gbak_size_lt_min */
{336331025, "service name parameter missing"}, /* 707, gbak_svc_name_missing */
{336331026, "Cannot restore over current database, must be SYSDBA or owner of the existing database."}, /* 708, gbak_not_ownr */
{336331031, "\"read_only\" or \"read_write\" required"}, /* 709, gbak_mode_req */
{336331033, "just data ignore all constraints etc."}, /* 710, gbak_just_data */
{336331034, "restoring data only ignoring foreign key, unique, not null & other constraints"}, /* 711, gbak_data_only */
{336397205, "ODS versions before ODS%d are not supported"}, /* 712, dsql_too_old_ods */
{336397206, "Table %s does not exist"}, /* 713, dsql_table_not_found */
{336397207, "View %s does not exist"}, /* 714, dsql_view_not_found */
{336397208, "At line %d, column %d"}, /* 715, dsql_line_col_error */
{336397209, "At unknown line and column"}, /* 716, dsql_unknown_pos */
{336397210, "Column %s cannot be repeated in %s statement"}, /* 717, dsql_no_dup_name */
{336397211, "Too many values (more than %d) in member list to match against"}, /* 718, dsql_too_many_values */
{336397212, "Array and BLOB data types not allowed in computed field"}, /* 719, dsql_no_array_computed */
{336397213, "Implicit domain name %s not allowed in user created domain"}, /* 720, dsql_implicit_domain_name */
{336397214, "scalar operator used on field %s which is not an array"}, /* 721, dsql_only_can_subscript_array */
{336723983, "unable to open database"}, /* 722, gsec_cant_open_db */
{336723984, "error in switch specifications"}, /* 723, gsec_switches_error */
{336723985, "no operation specified"}, /* 724, gsec_no_op_spec */
{336723986, "no user name specified"}, /* 725, gsec_no_usr_name */
{336723987, "add record error"}, /* 726, gsec_err_add */
{336723988, "modify record error"}, /* 727, gsec_err_modify */
{336723989, "find/modify record error"}, /* 728, gsec_err_find_mod */
{336723990, "record not found for user: %s"}, /* 729, gsec_err_rec_not_found */
{336723991, "delete record error"}, /* 730, gsec_err_delete */
{336723992, "find/delete record error"}, /* 731, gsec_err_find_del */
{336723996, "find/display record error"}, /* 732, gsec_err_find_disp */
{336723997, "invalid parameter, no switch defined"}, /* 733, gsec_inv_param */
{336723998, "operation already specified"}, /* 734, gsec_op_specified */
{336723999, "password already specified"}, /* 735, gsec_pw_specified */
{336724000, "uid already specified"}, /* 736, gsec_uid_specified */
{336724001, "gid already specified"}, /* 737, gsec_gid_specified */
{336724002, "project already specified"}, /* 738, gsec_proj_specified */
{336724003, "organization already specified"}, /* 739, gsec_org_specified */
{336724004, "first name already specified"}, /* 740, gsec_fname_specified */
{336724005, "middle name already specified"}, /* 741, gsec_mname_specified */
{336724006, "last name already specified"}, /* 742, gsec_lname_specified */
{336724008, "invalid switch specified"}, /* 743, gsec_inv_switch */
{336724009, "ambiguous switch specified"}, /* 744, gsec_amb_switch */
{336724010, "no operation specified for parameters"}, /* 745, gsec_no_op_specified */
{336724011, "no parameters allowed for this operation"}, /* 746, gsec_params_not_allowed */
{336724012, "incompatible switches specified"}, /* 747, gsec_incompat_switch */
{336724044, "Invalid user name (maximum 31 bytes allowed)"}, /* 748, gsec_inv_username */
{336724045, "Warning - maximum 8 significant bytes of password used"}, /* 749, gsec_inv_pw_length */
{336724046, "database already specified"}, /* 750, gsec_db_specified */
{336724047, "database administrator name already specified"}, /* 751, gsec_db_admin_specified */
{336724048, "database administrator password already specified"}, /* 752, gsec_db_admin_pw_specified */
{336724049, "SQL role name already specified"}, /* 753, gsec_sql_role_specified */
{336789504, "The license file does not exist or could not be opened for read"}, /* 754, license_no_file */
{336789523, "operation already specified"}, /* 755, license_op_specified */
{336789524, "no operation specified"}, /* 756, license_op_missing */
{336789525, "invalid switch"}, /* 757, license_inv_switch */
{336789526, "invalid switch combination"}, /* 758, license_inv_switch_combo */
{336789527, "illegal operation/switch combination"}, /* 759, license_inv_op_combo */
{336789528, "ambiguous switch"}, /* 760, license_amb_switch */
{336789529, "invalid parameter, no switch specified"}, /* 761, license_inv_parameter */
{336789530, "switch does not take any parameter"}, /* 762, license_param_specified */
{336789531, "switch requires a parameter"}, /* 763, license_param_req */
{336789532, "syntax error in command line"}, /* 764, license_syntx_error */
{336789534, "The certificate was not added. A duplicate ID exists in the license file."}, /* 765, license_dup_id */
{336789535, "The certificate was not added. Invalid certificate ID / Key combination."}, /* 766, license_inv_id_key */
{336789536, "The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license."}, /* 767, license_err_remove */
{336789537, "An error occurred updating the license file. Operation cancelled."}, /* 768, license_err_update */
{336789538, "The certificate could not be validated based on the information given. Please recheck the ID and key information."}, /* 769, license_err_convert */
{336789539, "Operation failed. An unknown error occurred."}, /* 770, license_err_unk */
{336789540, "Add license operation failed, KEY: %s ID: %s"}, /* 771, license_svc_err_add */
{336789541, "Remove license operation failed, KEY: %s"}, /* 772, license_svc_err_remove */
{336789563, "The evaluation license has already been used on this server. You need to purchase a non-evaluation license."}, /* 773, license_eval_exists */
{336920577, "found unknown switch"}, /* 774, gstat_unknown_switch */
{336920578, "please retry, giving a database name"}, /* 775, gstat_retry */
{336920579, "Wrong ODS version, expected %d, encountered %d"}, /* 776, gstat_wrong_ods */
{336920580, "Unexpected end of database file."}, /* 777, gstat_unexpected_eof */
{336920605, "Can't open database file %s"}, /* 778, gstat_open_err */
{336920606, "Can't read a database page"}, /* 779, gstat_read_err */
{336920607, "System memory exhausted"}, /* 780, gstat_sysmemex */
{0, NULL}
};

View File

@ -797,4 +797,6 @@ static SLONG user_codes[] = {
0,
0,
0,
0,
0,
};

View File

@ -573,6 +573,7 @@ static const struct {
{335544870, -901}, /* 550 collation_name */
{335544871, -901}, /* 551 domain_name */
{335544872, -219}, /* 552 domnotdef */
{335544873, -171}, /* 553 array_max_dimensions */
{335740929, -901}, /* 1 gfix_db_name */
{335740930, -901}, /* 2 gfix_invalid_sw */
{335740932, -901}, /* 4 gfix_incmp_sw */
@ -740,6 +741,7 @@ static const struct {
{336397211, -901}, /* 923 dsql_too_many_values */
{336397212, -607}, /* 924 dsql_no_array_computed */
{336397213, -637}, /* 925 dsql_implicit_domain_name */
{336397214, -607}, /* 926 dsql_only_can_subscript_array */
{336723983, -901}, /* 15 gsec_cant_open_db */
{336723984, -901}, /* 16 gsec_switches_error */
{336723985, -901}, /* 17 gsec_no_op_spec */

View File

@ -921,6 +921,8 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
IBERROR(223); // msg 223 argument of scalar operation must be an array
}
*desc = array->arr_desc.iad_rpt[0].iad_desc;
if (array->arr_desc.iad_dimensions > MAX_ARRAY_DIMENSIONS)
IBERROR(306); // Found array data type with more than 16 dimensions
return;
}

View File

@ -62,7 +62,7 @@ const size_t MAX_SQL_IDENTIFIER_SIZE = 32;
const size_t MAX_SQL_IDENTIFIER_LEN = MAX_SQL_IDENTIFIER_SIZE - 1;
typedef TEXT SqlIdentifier[MAX_SQL_IDENTIFIER_SIZE];
const char* const NULL_STRING = "*** null ***";
const char* const NULL_STRING_MARK = "*** null ***";
const char* const NULL_ROLE = "NONE";
@ -153,6 +153,8 @@ const size_t DEFAULT_TIME_PRECISION = 0;
// Should be 6 as per SQL spec
const size_t DEFAULT_TIMESTAMP_PRECISION = 3;
const size_t MAX_ARRAY_DIMENSIONS = 16;
// relation types
enum rel_t {

View File

@ -1245,7 +1245,7 @@ bool EVL_field(jrd_rel* relation, Record* record, USHORT id, dsc* desc)
{
ERR_post(isc_not_valid,
isc_arg_string, temp_field->fld_name.c_str(),
isc_arg_string, NULL_STRING, 0);
isc_arg_string, NULL_STRING_MARK, 0);
}
fb_assert(default_literal->nod_type == nod_literal);
@ -4194,9 +4194,11 @@ static dsc* scalar(thread_db* tdbb, jrd_nod* node, impure_value* impure)
IBERROR(261); // msg 261 scalar operator used on field which is not an array
jrd_nod* list = node->nod_arg[e_scl_subscripts];
if (list->nod_count > MAX_ARRAY_DIMENSIONS)
ERR_post(isc_array_max_dimensions, isc_arg_number, SLONG(MAX_ARRAY_DIMENSIONS), 0);
SLONG subscripts[16];
int iter = 0;
SLONG subscripts[MAX_ARRAY_DIMENSIONS];
int iter = 0;
jrd_nod** ptr = list->nod_arg;
for (const jrd_nod* const* const end = ptr + list->nod_count; ptr < end;)
{
@ -4266,8 +4268,7 @@ static bool sleuth(thread_db* tdbb, jrd_nod* node, const dsc* desc1, const dsc*
/* Merge search and control strings */
UCHAR control[BUFFER_SMALL];
l2 = obj->sleuth_merge(tdbb, p2, l2, p1, l1, control,
BUFFER_SMALL);
l2 = obj->sleuth_merge(tdbb, p2, l2, p1, l1, control, BUFFER_SMALL);
/* l2 is result's byte-count */

View File

@ -3718,7 +3718,7 @@ static void validate(thread_db* tdbb, jrd_nod* list)
if (!desc || (request->req_flags & req_null))
{
value = NULL_STRING;
value = NULL_STRING_MARK;
}
else if (!length)
{

View File

@ -408,7 +408,7 @@ void IDX_create_index(
ERR_post(isc_not_valid,
isc_arg_string, bad_fld->fld_name.c_str(),
isc_arg_string, NULL_STRING, 0);
isc_arg_string, NULL_STRING_MARK, 0);
}
}
else {

View File

@ -1,5 +1,5 @@
/* MAX_NUMBER is the next number to be used, always one more than the highest message number. */
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-08-18 22:35:00', 'JRD', 0, 553);
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-09-10 03:10:53', 'JRD', 0, 554);
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2005-09-02 00:55:59', 'QLI', 1, 513);
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 ('2005-07-20 04:04:04', 'GFIX', 3, 115);
@ -16,9 +16,9 @@ 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-08-31 04:40:04', 'SQLERR', 13, 926);
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-09-10 03:59:22', 'SQLERR', 13, 927);
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);
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307);
/*
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:43', 'GJRN', 16, 241);
*/

View File

@ -3071,5 +3071,8 @@ 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 ('NO_SECCLASS', 'SHOW_metadata', 'show.epp', NULL, 17, 151, NULL, 'There are no security classes for %s', NULL, NULL);
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('NO_DB_WIDE_SECCLASS', 'SHOW_metadata', 'show.epp', NULL, 17, 152, NULL, 'There is no database-wide security class', NULL, NULL);
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('CANNOT_GET_SRV_VER', 'SHOW_metadata', 'show.epp', NULL, 17, 153, NULL, 'Cannot get server version without database connection', NULL, NULL);
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'CMP_get_desc', 'cmp.cpp', NULL, 15, 306, NULL, 'Found array data type with more than 16 dimensions', NULL, NULL);
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('array_max_dimensions', 'scalar', 'evl.cpp', NULL, 0, 553, NULL, 'Array data type can use up to %d dimensions', NULL, NULL);
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES ('dsql_only_can_subscript_array', 'MAKE_field', 'make.cpp', NULL, 13, 926, NULL, 'scalar operator used on field %s which is not an array', NULL, NULL);
COMMIT WORK;

View File

@ -777,5 +777,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 (-313, NULL, NULL, 27, 7, NULL, 'replace_doesnt_match_pk', NULL, NULL);
INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-313, NULL, NULL, 28, 7, NULL, 'replace_doesnt_match_matching', NULL, NULL);
INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-817, NULL, NULL, 29, 7, NULL, 'replace_with_complex_view', NULL, NULL);
INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-171, NULL, NULL, 553, 0, NULL, 'array_max_dimensions', NULL, NULL);
INSERT INTO SYSTEM_ERRORS (SQL_CODE, SQL_CLASS, SQL_SUBCLASS, NUMBER, FAC_CODE, VMS_CODE, GDS_SYMBOL, SEVERITY, SEVERITY_TEXT) VALUES (-607, NULL, NULL, 926, 13, NULL, 'dsql_only_can_subscript_array', NULL, NULL);
COMMIT WORK;