From: Alexander P. <ale...@us...> - 2008-06-27 07:32:04
|
Build Version : T2.5.0.20490 Firebird 2.5 Alpha 1 (writeBuildNum.sh,v 1.20651 2008/06/27 07:30:34 alexpeshkof ) Update of /cvsroot/firebird/firebird2/src/dsql In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8642/dsql Modified Files: Tag: B2_1_Release ddl.cpp dsql.cpp gen.cpp make.cpp parse.y pass1.cpp user_dsql.cpp Log Message: Fixed CORE-1964: Use of 0 instead of isc_arg_end to terminate list of ERR_post's (and cousines) arguments is invalid. Also cleaned up use of gds__log() in a few places. Index: ddl.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/ddl.cpp,v retrieving revision 1.207.4.4 retrieving revision 1.207.4.5 diff -b -U3 -r1.207.4.4 -r1.207.4.5 --- ddl.cpp 2 May 2008 07:28:23 -0000 1.207.4.4 +++ ddl.cpp 27 Jun 2008 07:30:20 -0000 1.207.4.5 @@ -385,7 +385,7 @@ **************************************/ if (request->req_dbb->dbb_flags & DBB_read_only) { - ERRD_post(isc_read_only_database, 0); + ERRD_post(isc_read_only_database, isc_arg_end); return; } @@ -496,7 +496,7 @@ isc_arg_number, 11, isc_arg_number, 1, // Feature not supported on ODS version older than %d.%d - 0); + isc_arg_end); } if (!METD_get_domain(request, field, field->fld_type_of_name)) @@ -506,7 +506,7 @@ isc_arg_gds, isc_dsql_domain_not_found, isc_arg_string, field->fld_type_of_name, // Specified domain or source field does not exist - 0); + isc_arg_end); } } @@ -517,7 +517,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, - isc_arg_gds, isc_collation_requires_text, 0); + isc_arg_gds, isc_collation_requires_text, isc_arg_end); } return; } @@ -535,7 +535,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_dsql_blob_type_unknown, isc_arg_string, - ((dsql_str*) field->fld_sub_type_name)->str_data, 0); + ((dsql_str*) field->fld_sub_type_name)->str_data, isc_arg_end); } field->fld_sub_type = blob_sub_type; } @@ -543,7 +543,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, - isc_subtype_for_internal_use, 0); + isc_subtype_for_internal_use, isc_arg_end); } if (field->fld_character_set && (field->fld_sub_type == isc_blob_untyped)) { @@ -553,13 +553,13 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, - isc_collation_requires_text, 0); + isc_collation_requires_text, isc_arg_end); } if (collation_name && (field->fld_sub_type != isc_blob_text)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, - isc_collation_requires_text, 0); + isc_collation_requires_text, isc_arg_end); } if (field->fld_sub_type != isc_blob_text) { return; @@ -658,7 +658,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_charset_not_found, isc_arg_string, - charset_name, 0); + charset_name, isc_arg_end); } field->fld_character_set_id = resolved_charset->intlsym_charset_id; resolved_type = resolved_charset; @@ -683,7 +683,7 @@ isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_collation_not_found, isc_arg_string, collation_name->str_data, - isc_arg_string, charSetName.c_str(), 0); + isc_arg_string, charSetName.c_str(), isc_arg_end); } // If both specified, must be for same character set @@ -696,7 +696,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_collation_not_for_charset, isc_arg_string, - collation_name->str_data, 0); + collation_name->str_data, isc_arg_end); } field->fld_explicit_collation = true; @@ -745,7 +745,7 @@ isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_imp_exc, isc_arg_gds, isc_field_name, isc_arg_string, - field->fld_name, 0); + field->fld_name, isc_arg_end); } field->fld_length = (USHORT) field_length; } @@ -979,7 +979,7 @@ ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_duplicate_spec, isc_arg_string, error_msg, - 0); + isc_arg_end); } } @@ -1094,7 +1094,7 @@ if (is_array_or_blob(request, input)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -607, - isc_arg_gds, isc_dsql_no_array_computed, 0); + isc_arg_gds, isc_dsql_no_array_computed, isc_arg_end); } // try to calculate size of the computed field. The calculated size @@ -1621,7 +1621,7 @@ if (dims > MAX_ARRAY_DIMENSIONS) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -604, - isc_arg_gds, isc_dsql_max_arr_dim_exceeded, 0); + isc_arg_gds, isc_dsql_max_arr_dim_exceeded, isc_arg_end); } request->append_number(isc_dyn_fld_dimensions, (SSHORT) dims); @@ -1644,7 +1644,7 @@ if (lrange >= hrange) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -604, - isc_arg_gds, isc_dsql_arr_range_error, 0); + isc_arg_gds, isc_dsql_arr_range_error, isc_arg_end); } } } @@ -1670,7 +1670,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_implicit_domain_name, - isc_arg_string, field->fld_name, 0); + isc_arg_string, field->fld_name, isc_arg_end); } request->append_cstring(isc_dyn_def_global_fld, field->fld_name); @@ -1730,7 +1730,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_duplicate_spec, - isc_arg_string, "NOT NULL", 0); + isc_arg_string, "NOT NULL", isc_arg_end); } } else if (node1->nod_type == nod_def_constraint) @@ -1740,7 +1740,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_duplicate_spec, isc_arg_string, "DOMAIN CHECK CONSTRAINT", - 0); + isc_arg_end); } check_flag = true; @@ -1880,7 +1880,7 @@ isc_arg_gds, isc_dsql_domain_not_found, isc_arg_string, domain_name->str_data, // Specified domain or source field does not exist - 0); + isc_arg_end); } DDL_resolve_intl_type( request, @@ -1923,7 +1923,7 @@ isc_arg_string, typeName, isc_arg_string, relation->rel_name, isc_arg_string, field->fld_name, - 0); + isc_arg_end); } if (position != -1) @@ -1988,7 +1988,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_bad_default_value, isc_arg_gds, isc_invalid_clause, - isc_arg_string, "default null not null", 0); + isc_arg_string, "default null not null", isc_arg_end); } if (!not_null_flag) { @@ -2119,7 +2119,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_dsql_datatype_err, isc_arg_gds, isc_dsql_blob_type_unknown, isc_arg_string, - ((const dsql_str*)(node->nod_arg[0]))->str_data, 0); + ((const dsql_str*)(node->nod_arg[0]))->str_data, isc_arg_end); } return blob_sub_type; } @@ -2183,7 +2183,7 @@ // specified character set not found ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -504, isc_arg_gds, isc_charset_not_found, isc_arg_string, - coll_for->str_data, 0); + coll_for->str_data, isc_arg_end); } if (coll_specific_attributes) @@ -2207,7 +2207,7 @@ isc_arg_gds, isc_collation_not_found, isc_arg_string, ((dsql_str*)coll_from->nod_arg[0])->str_data, isc_arg_string, resolved_charset->intlsym_name, - 0); + isc_arg_end); } request->append_number(isc_dyn_coll_from, @@ -2577,7 +2577,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_bad_default_value, isc_arg_gds, isc_invalid_clause, - isc_arg_string, "defaults must be last", 0); + isc_arg_string, "defaults must be last", isc_arg_end); } *ptr = MAKE_variable(field, field->fld_name, @@ -3099,7 +3099,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -607, isc_arg_gds, isc_dsql_command_err, - isc_arg_gds, isc_dsql_shadow_number_err, 0); + isc_arg_gds, isc_dsql_shadow_number_err, isc_arg_end); } request->append_number(isc_dyn_def_shadow, (SSHORT)(IPTR) (ptr[e_shadow_number])); @@ -3133,7 +3133,7 @@ isc_arg_gds, isc_dsql_file_length_err, isc_arg_number, (ISC_STATUS) file->fil_name->str_data, // Preceding file did not specify length, so %s must include starting page number - 0); + isc_arg_end); } const SLONG start = file->fil_start; @@ -3187,7 +3187,7 @@ { ERRD_post(isc_dsql_command_err, isc_arg_gds, isc_dsql_incompatible_trigger_type, - 0); + isc_arg_end); } const dsql_str* relation_name = @@ -3203,7 +3203,7 @@ { ERRD_post(isc_dsql_command_err, isc_arg_gds, isc_dsql_incompatible_trigger_type, - 0); + isc_arg_end); } } @@ -3230,7 +3230,7 @@ { ERRD_post(isc_dsql_command_err, isc_arg_gds, isc_dsql_incompatible_trigger_type, - 0); + isc_arg_end); } relation_node = FB_NEW_RPT(*tdsql->getDefaultPool(), e_rln_count) dsql_nod; @@ -3244,7 +3244,7 @@ { ERRD_post(isc_dsql_command_err, isc_arg_gds, isc_dsql_db_trigger_type_cant_change, - 0); + isc_arg_end); } } } @@ -3403,7 +3403,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_return_mode_err, // Return mode by value not allowed for this data type - 0); + isc_arg_end); } /* For functions returning a blob, coerce return argument position to @@ -3419,7 +3419,7 @@ isc_arg_gds, isc_extern_func_err, // External functions can not have more than 10 parameters // Or 9 if the function returns a BLOB - 0); + isc_arg_end); } request->append_number(isc_dyn_func_return_argument, blob_position); @@ -3448,7 +3448,7 @@ // External functions can not have more than 10 parameters // Not strictly correct -- return position error - 0); + isc_arg_end); } // We'll verify that SCALAR_ARRAY can't be used as a return type. @@ -3462,7 +3462,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -607, isc_arg_gds, isc_random, isc_arg_string, "BY SCALAR_ARRAY can't be used as a return parameter", - 0); + isc_arg_end); } request->append_number(isc_dyn_func_return_argument, position); @@ -3514,7 +3514,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_extern_func_err, // External functions can not have more than 10 parameters - 0); + isc_arg_end); } /*field = (dsql_fld*) *ptr; */ @@ -3868,7 +3868,7 @@ if (procedure) { // Disallow procedure-based views - ERRD_post(isc_wish_list, 0); + ERRD_post(isc_wish_list, isc_arg_end); } const char* name = relation ? relation->rel_name : procedure->prc_name; request->append_cstring(isc_dyn_view_relation, name); @@ -3945,7 +3945,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_specify_field_err, // must specify field name for view select expression - 0); + isc_arg_end); } /* CVC: Small modification here to catch any mismatch between number of @@ -4000,7 +4000,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_num_field_err, // number of fields does not match select list - 0); + isc_arg_end); } // setup to define triggers for WITH CHECK OPTION @@ -4015,7 +4015,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_col_name_err, // Only simple column names permitted for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } select_expr = select_expr->nod_arg[e_sel_query_spec]; @@ -4026,7 +4026,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_table_view_err, // Only one table allowed for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } if (select_expr->nod_arg[e_qry_from]->nod_count != 1) @@ -4035,7 +4035,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_table_view_err, // Only one table allowed for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } if (!(select_expr->nod_arg[e_qry_where])) @@ -4044,7 +4044,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_where_err, // No where clause for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } if (select_expr->nod_arg[e_qry_distinct] || @@ -4055,7 +4055,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_distinct_err, // DISTINCT, GROUP or HAVING not permitted for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } dsql_nod* relation_node = MAKE_node(nod_relation_name, e_rln_count); @@ -4535,7 +4535,7 @@ isc_arg_gds, isc_reftable_requires_pk, /* "REFERENCES table" without "(column)" requires PRIMARY KEY on referenced table */ - 0); + isc_arg_end); } } @@ -4545,7 +4545,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_key_field_count_err, // foreign key field count does not match primary key - 0); + isc_arg_end); } /* define the foreign key index and the triggers that may be needed @@ -5322,7 +5322,7 @@ isc_arg_number, (SLONG) domain_node->nod_line, isc_arg_number, (SLONG) domain_node->nod_column + domain_name->str_length + strlen(" DEFAULT"), - 0); + isc_arg_end); } // CVC End modification. defVal = PASS1_node(request, defVal, false); @@ -5358,7 +5358,7 @@ isc_arg_gds, isc_dsql_domain_not_found, isc_arg_string, domain_name->str_data, // Specified domain or source field does not exist - 0); + isc_arg_end); } if (element->nod_arg[e_cnstr_condition]) { @@ -5679,7 +5679,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 204, isc_arg_gds, isc_dsql_relation_err, isc_arg_gds, isc_random, isc_arg_string, relation_name->str_data, isc_arg_gds, - isc_random, isc_arg_string, linecol, 0); + isc_random, isc_arg_string, linecol, isc_arg_end); } /* need to handle error that occur in generating dyn string. @@ -5761,7 +5761,7 @@ // Unsupported DSQL construct ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -901, isc_arg_gds, isc_dsql_command_err, - isc_arg_gds, isc_dsql_construct_err, 0); + isc_arg_gds, isc_dsql_construct_err, isc_arg_end); } fb_assert((element->nod_arg[1])->nod_type == nod_restrict); @@ -5812,7 +5812,7 @@ isc_arg_number, (SLONG) node->nod_line, isc_arg_number, (SLONG) node->nod_column + obj_name->str_length, // + strlen("FUNCTION"), - 0); + isc_arg_end); request->append_cstring(isc_dyn_mod_function, obj_name->str_data); const dsql_str* entry_point_name = (dsql_str*) node->nod_arg[e_mod_udf_entry_pt]; @@ -6194,7 +6194,7 @@ if (!strcmp(field->fld_name, rest_field->fld_name)) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_duplicate_spec, - isc_arg_string, field->fld_name, 0); + isc_arg_string, field->fld_name, isc_arg_end); } } @@ -6281,7 +6281,7 @@ isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_subquery_err, // No subqueries permitted for VIEW WITH CHECK OPTION - 0); + isc_arg_end); } if ((*ptr)->nod_type == nod_field_name) @@ -6673,7 +6673,7 @@ isc_arg_gds, isc_dsql_domain_not_found, // Specified domain or source field does not exist isc_arg_string, domain_name->str_data, - 0); + isc_arg_end); } DDL_resolve_intl_type(request, field, NULL); } @@ -6779,7 +6779,7 @@ if (length > 0xFFFF) { // TODO : need appropriate error message, like "too long BLR" ERRD_post(isc_invalid_blr, isc_arg_number, (SLONG) length, - 0); + isc_arg_end); } *blr_base++ = (UCHAR) length; Index: dsql.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/dsql.cpp,v retrieving revision 1.204.2.2 retrieving revision 1.204.2.3 diff -b -U3 -r1.204.2.2 -r1.204.2.3 --- dsql.cpp 1 May 2008 07:31:05 -0000 1.204.2.2 +++ dsql.cpp 27 Jun 2008 07:30:23 -0000 1.204.2.3 @@ -519,7 +519,7 @@ { ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -901, isc_arg_gds, isc_bad_req_handle, - 0); + isc_arg_end); } DsqlContextPoolHolder context(tdsql, &request->req_pool); @@ -532,7 +532,7 @@ if (*trans_handle == 0 && request->req_type != REQ_START_TRANS) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, - isc_arg_gds, isc_bad_trans_handle, 0); + isc_arg_gds, isc_bad_trans_handle, isc_arg_end); } /* If the request is a SELECT or blob statement then this is an open. @@ -549,7 +549,7 @@ if (request->req_flags & REQ_cursor_open) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, - isc_arg_gds, isc_dsql_cursor_open_err, 0); + isc_arg_gds, isc_dsql_cursor_open_err, isc_arg_end); } } @@ -974,7 +974,7 @@ if (!(request->req_flags & REQ_cursor_open)) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 504, isc_arg_gds, isc_dsql_cursor_err, - isc_arg_gds, isc_dsql_cursor_not_open, 0); + isc_arg_gds, isc_dsql_cursor_not_open, isc_arg_end); } #ifdef SCROLLABLE_CURSORS @@ -1040,7 +1040,7 @@ default: ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } if (offset) @@ -1183,7 +1183,7 @@ if (!(request->req_flags & REQ_cursor_open)) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 501, - isc_arg_gds, isc_dsql_cursor_close_err, 0); + isc_arg_gds, isc_dsql_cursor_close_err, isc_arg_end); close_cursor(request); } @@ -1234,7 +1234,7 @@ { ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -901, isc_arg_gds, isc_bad_req_handle, - 0); + isc_arg_end); } DsqlContextPoolHolder context(tdsql, &request->req_pool); @@ -1244,7 +1244,7 @@ if (!(request->req_flags & REQ_cursor_open)) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 504, isc_arg_gds, isc_dsql_cursor_err, - isc_arg_gds, isc_dsql_cursor_not_open, 0); + isc_arg_gds, isc_dsql_cursor_not_open, isc_arg_end); dsql_msg* message = (dsql_msg*) request->req_receive; @@ -1321,7 +1321,7 @@ if (!old_request) { ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -901, isc_arg_gds, isc_bad_req_handle, - 0); + isc_arg_end); } dsql_dbb* database; @@ -1330,7 +1330,7 @@ if (!database) { ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -901, isc_arg_gds, isc_bad_req_handle, - 0); + isc_arg_end); } } @@ -1338,7 +1338,7 @@ if (old_request && (old_request->req_flags & REQ_cursor_open)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 519, - isc_arg_gds, isc_dsql_open_cursor_request, 0); + isc_arg_gds, isc_dsql_open_cursor_request, isc_arg_end); } /* Allocate a new request block and then prepare the request. We want to @@ -1362,7 +1362,7 @@ isc_arg_gds, isc_command_end_err2, // CVC: Nothing will be line 1, column 1 for the user. isc_arg_number, (SLONG) 1, isc_arg_number, (SLONG) 1, - 0); // Unexpected end of command + isc_arg_end); // Unexpected end of command } if (!length) { @@ -1411,7 +1411,7 @@ (request->req_ddl_node->nod_type == nod_def_database)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 530, - isc_arg_gds, isc_dsql_crdb_prepare_err, 0); + isc_arg_gds, isc_dsql_crdb_prepare_err, isc_arg_end); } request->req_flags |= REQ_prepared; @@ -1510,7 +1510,7 @@ if (length == 0) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, isc_arg_gds, isc_dsql_decl_err, - isc_arg_gds, isc_dsql_cursor_invalid, 0); + isc_arg_gds, isc_dsql_cursor_invalid, isc_arg_end); } if (length > MAX_CURSOR_LENGTH) { length = MAX_CURSOR_LENGTH; @@ -1529,7 +1529,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, isc_arg_gds, isc_dsql_decl_err, isc_arg_gds, isc_dsql_cursor_redefined, - isc_arg_string, symbol->sym_string, 0); + isc_arg_string, symbol->sym_string, isc_arg_end); } /* If there already is a cursor and its name isn't the same, ditto. @@ -1544,7 +1544,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, isc_arg_gds, isc_dsql_decl_err, isc_arg_gds, isc_dsql_cursor_redefined, - isc_arg_string, request->req_cursor->sym_string, 0); + isc_arg_string, request->req_cursor->sym_string, isc_arg_end); } } catch (const Firebird::Exception& ex) @@ -3534,7 +3534,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 913, isc_arg_gds, isc_deadlock, isc_arg_gds, - isc_update_conflict, 0); + isc_update_conflict, isc_arg_end); } } else if (request->req_type == REQ_DELETE_CURSOR) @@ -3549,7 +3549,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 913, isc_arg_gds, isc_deadlock, isc_arg_gds, - isc_update_conflict, 0); + isc_update_conflict, isc_arg_end); } } @@ -4304,7 +4304,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, isc_arg_gds, isc_dsql_too_old_ods, - isc_arg_number, (SLONG) 8, 0); + isc_arg_number, (SLONG) 8, isc_arg_end); } break; @@ -4435,7 +4435,7 @@ if (parameter || count) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } dsql_par* dbkey; @@ -4504,13 +4504,13 @@ if (*blr != blr_version4 && *blr != blr_version5) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } blr++; // skip the blr_version if (*blr++ != blr_begin || *blr++ != blr_message) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } ++blr; // skip the message number @@ -4619,7 +4619,7 @@ default: ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } USHORT align = type_alignments[desc.dsc_dtype]; @@ -4630,7 +4630,7 @@ if (*blr++ != blr_short || *blr++ != 0) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); align = type_alignments[dtype_short]; if (align) @@ -4656,7 +4656,7 @@ if (*blr++ != (UCHAR) blr_end || offset != msg_length) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_sqlda_err, 0); + isc_arg_gds, isc_dsql_sqlda_err, isc_arg_end); } return count; @@ -4691,7 +4691,7 @@ if (client_dialect > SQL_DIALECT_CURRENT) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, - isc_arg_gds, isc_wish_list, 0); + isc_arg_gds, isc_wish_list, isc_arg_end); if (!string_length) string_length = strlen(string); @@ -4724,7 +4724,7 @@ // This may be a special case, but we don't know about positions here. ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_command_end_err, // Unexpected end of command - 0); + isc_arg_end); } // allocate the send and receive messages @@ -4766,7 +4766,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 817, isc_arg_gds, isc_ddl_not_allowed_by_db_sql_dial, isc_arg_number, - (SLONG) request->req_dbb->dbb_db_SQL_dialect, 0); + (SLONG) request->req_dbb->dbb_db_SQL_dialect, isc_arg_end); } if (request->req_type == REQ_COMMIT || @@ -5175,7 +5175,7 @@ default: ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_datatype_err, 0); + isc_arg_gds, isc_dsql_datatype_err, isc_arg_end); } if (sql_type && (param->par_desc.dsc_flags & DSC_nullable)) Index: gen.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/gen.cpp,v retrieving revision 1.133 retrieving revision 1.133.2.1 diff -b -U3 -r1.133 -r1.133.2.1 --- gen.cpp 19 Nov 2007 00:21:01 -0000 1.133 +++ gen.cpp 27 Jun 2008 07:30:23 -0000 1.133.2.1 @@ -163,7 +163,7 @@ ddl_node->nod_type == nod_mod_domain)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, - isc_arg_gds, isc_dsql_domain_err, 0); + isc_arg_gds, isc_dsql_domain_err, isc_arg_end); } stuff(request, blr_fid); stuff(request, 0); // Context @@ -518,7 +518,7 @@ isc_arg_gds, isc_dsql_internal_err, isc_arg_gds, isc_expression_eval_err, // expression evaluation not supported - 0); + isc_arg_end); } stuff(request, blr_operator); @@ -666,7 +666,7 @@ isc_arg_number, (SLONG) request->req_client_dialect, isc_arg_string, DSC_dtype_tostring(parameter->par_desc.dsc_dtype), - 0); + isc_arg_end); break; default: // No special action for other data types @@ -685,7 +685,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -204, isc_arg_gds, isc_imp_exc, isc_arg_gds, isc_blktoobig, - 0); + isc_arg_end); } message->msg_length = (USHORT) offset; @@ -839,7 +839,7 @@ case nod_access: if (sw_access) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); sw_access = true; if (ptr->nod_flags & NOD_READ_ONLY) @@ -851,7 +851,7 @@ case nod_wait: if (sw_wait) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); sw_wait = true; if (ptr->nod_flags & NOD_NO_WAIT) @@ -863,7 +863,7 @@ case nod_isolation: if (sw_isolation) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); sw_isolation = true; @@ -892,7 +892,7 @@ { if (sw_reserve) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); sw_reserve = true; const dsql_nod* reserve = ptr->nod_arg[0]; @@ -911,7 +911,7 @@ case nod_tra_misc: if (misc_flags & ptr->nod_flags) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); misc_flags |= ptr->nod_flags; if (ptr->nod_flags & NOD_NO_AUTO_UNDO) @@ -925,7 +925,7 @@ case nod_lock_timeout: if (sw_lock_timeout) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_dup_option, 0); + isc_arg_gds, isc_dsql_dup_option, isc_arg_end); sw_lock_timeout = true; if (ptr->nod_count == 1 && ptr->nod_arg[0]->nod_type == nod_constant) @@ -939,7 +939,7 @@ default: ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_tran_err, 0); + isc_arg_gds, isc_dsql_tran_err, isc_arg_end); } } } @@ -1241,7 +1241,7 @@ dsql_nod* list = cursor->nod_arg[e_cur_rse]->nod_arg[e_rse_items]; if (list->nod_count != list_into->nod_count) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 313, - isc_arg_gds, isc_dsql_count_mismatch, 0); + isc_arg_gds, isc_dsql_count_mismatch, isc_arg_end); stuff(request, blr_begin); ptr = list->nod_arg; end = ptr + list->nod_count; @@ -1265,7 +1265,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, isc_arg_gds, isc_dsql_internal_err, isc_arg_gds, isc_node_err, // gen.c: node not supported - 0); + isc_arg_end); } } @@ -1467,7 +1467,7 @@ */ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_arith_except, 0); + isc_arg_gds, isc_arith_except, isc_arg_end); } /* We and the lexer both agree that this is an SINT64 constant, @@ -1523,7 +1523,7 @@ default: // gen_constant: datatype not understood ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 103, - isc_arg_gds, isc_dsql_constant_err, 0); + isc_arg_gds, isc_dsql_constant_err, isc_arg_end); } } @@ -1643,7 +1643,7 @@ default: // don't understand dtype ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 804, - isc_arg_gds, isc_dsql_datatype_err, 0); + isc_arg_gds, isc_dsql_datatype_err, isc_arg_end); } } @@ -1722,7 +1722,7 @@ isc_arg_number, (SLONG) request->req_client_dialect, isc_arg_string, DSC_dtype_tostring(static_cast < UCHAR > - (field->fld_dtype)), 0); + (field->fld_dtype)), isc_arg_end); break; default: // No special action for other data types @@ -1808,7 +1808,7 @@ { if (list->nod_count != list_to->nod_count) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 313, - isc_arg_gds, isc_dsql_count_mismatch, 0); + isc_arg_gds, isc_dsql_count_mismatch, isc_arg_end); dsql_nod** ptr = list->nod_arg; dsql_nod** ptr_to = list_to->nod_arg; for (const dsql_nod* const* const end = ptr + list->nod_count; ptr < end; @@ -2932,14 +2932,14 @@ static void stuff_context(dsql_req* request, const dsql_ctx* context) { if (context->ctx_context > MAX_UCHAR) { - ERRD_post(isc_too_many_contexts, 0); + ERRD_post(isc_too_many_contexts, isc_arg_end); } stuff(request, context->ctx_context); if (context->ctx_flags & CTX_recursive) { if (context->ctx_recursive > MAX_UCHAR) { - ERRD_post(isc_too_many_contexts, 0); + ERRD_post(isc_too_many_contexts, isc_arg_end); } stuff(request, context->ctx_recursive); } Index: make.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/make.cpp,v retrieving revision 1.146.4.1 retrieving revision 1.146.4.2 diff -b -U3 -r1.146.4.1 -r1.146.4.2 --- make.cpp 25 Jun 2008 16:10:59 -0000 1.146.4.1 +++ make.cpp 27 Jun 2008 07:30:24 -0000 1.146.4.2 @@ -381,7 +381,7 @@ if (!DTYPE_IS_NUMERIC(desc->dsc_dtype) && !DTYPE_IS_TEXT(desc->dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } else if (DTYPE_IS_TEXT(desc->dsc_dtype)) { desc->dsc_dtype = dtype_double; @@ -394,7 +394,7 @@ desc->dsc_flags = DSC_nullable; dtype = desc->dsc_dtype; if (!DTYPE_IS_NUMERIC(dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } else if (DTYPE_IS_EXACT(dtype)) { desc->dsc_dtype = dtype_int64; @@ -412,7 +412,7 @@ if (!DTYPE_IS_NUMERIC(desc->dsc_dtype) && !DTYPE_IS_TEXT(desc->dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } else if (desc->dsc_dtype == dtype_short) { desc->dsc_dtype = dtype_long; @@ -433,7 +433,7 @@ MAKE_desc(request, desc, node->nod_arg[0], null_replacement); dtype = desc->dsc_dtype; if (!DTYPE_IS_NUMERIC(dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } else if (DTYPE_IS_EXACT(dtype)) { desc->dsc_dtype = dtype_int64; @@ -572,7 +572,7 @@ if (DTYPE_IS_BLOB(dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } desc->dsc_flags = (desc1.dsc_flags | desc2.dsc_flags) & DSC_nullable; @@ -584,7 +584,7 @@ if (DTYPE_IS_TEXT(desc1.dsc_dtype) || DTYPE_IS_TEXT(desc2.dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } case dtype_timestamp: @@ -621,7 +621,7 @@ dtype = dtype_timestamp; } else { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } if (dtype == dtype_sql_date) { @@ -651,7 +651,7 @@ } else { /* <date> + <date> */ - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } } else if (DTYPE_IS_DATE(desc1.dsc_dtype) || (node->nod_type == nod_add)) @@ -668,7 +668,7 @@ else { /* <non-date> - <date> */ fb_assert(node->nod_type == nod_subtract); - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -711,14 +711,14 @@ // Arrays and blobs can never partipate in addition/subtraction if (DTYPE_IS_BLOB(dtype1) || DTYPE_IS_BLOB(dtype2)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } // In Dialect 2 or 3, strings can never partipate in addition / sub // (use a specific cast instead) if (DTYPE_IS_TEXT(dtype1) || DTYPE_IS_TEXT(dtype2)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } /* Determine the TYPE of arithmetic to perform, store it @@ -782,7 +782,7 @@ dtype = dtype_timestamp; } else { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } if (dtype == dtype_sql_date) { @@ -813,7 +813,7 @@ } else { /* <date> + <date> */ - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } } else if (DTYPE_IS_DATE(desc1.dsc_dtype) || (node->nod_type == nod_add2)) @@ -830,7 +830,7 @@ else { /* <non-date> - <date> */ fb_assert(node->nod_type == nod_subtract2); - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -864,7 +864,7 @@ default: // a type which cannot participate in an add or subtract - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -883,7 +883,7 @@ // Arrays and blobs can never partipate in multiplication if (DTYPE_IS_BLOB(desc1.dsc_dtype) || DTYPE_IS_BLOB(desc2.dsc_dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } dtype = DSC_multiply_blr4_result[desc1.dsc_dtype][desc2.dsc_dtype]; @@ -905,7 +905,7 @@ break; default: - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -925,13 +925,13 @@ // (use a specific cast instead) if (DTYPE_IS_TEXT(desc1.dsc_dtype) || DTYPE_IS_TEXT(desc2.dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } // Arrays and blobs can never partipate in multiplication if (DTYPE_IS_BLOB(desc1.dsc_dtype) || DTYPE_IS_BLOB(desc2.dsc_dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } dtype = DSC_multiply_result[desc1.dsc_dtype][desc2.dsc_dtype]; @@ -954,7 +954,7 @@ break; default: - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -983,7 +983,7 @@ // Arrays and blobs can never partipate in division if (DTYPE_IS_BLOB(desc1.dsc_dtype) || DTYPE_IS_BLOB(desc2.dsc_dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } dtype1 = desc1.dsc_dtype; @@ -997,7 +997,7 @@ dtype = MAX(dtype1, dtype2); if (!DTYPE_IS_NUMERIC(dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } desc->dsc_dtype = dtype_double; @@ -1022,13 +1022,13 @@ // (use a specific cast instead) if (DTYPE_IS_TEXT(desc1.dsc_dtype) || DTYPE_IS_TEXT(desc2.dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } // Arrays and blobs can never partipate in division if (DTYPE_IS_BLOB(desc1.dsc_dtype) || DTYPE_IS_BLOB(desc2.dsc_dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } dtype = DSC_multiply_result[desc1.dsc_dtype][desc2.dsc_dtype]; @@ -1048,7 +1048,7 @@ break; default: - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -1067,7 +1067,7 @@ // (use a specific cast instead) if (DTYPE_IS_TEXT(desc->dsc_dtype)) { if (request->req_client_dialect >= SQL_DIALECT_V6_TRANSITION) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } desc->dsc_dtype = dtype_double; desc->dsc_length = sizeof(double); @@ -1076,11 +1076,11 @@ else if (DTYPE_IS_BLOB(desc->dsc_dtype)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_no_blob_array, 0); + isc_arg_gds, isc_dsql_no_blob_array, isc_arg_end); } // Forbid other not numeric datatypes else if (!DTYPE_IS_NUMERIC(desc->dsc_dtype)) { - ERRD_post(isc_expression_eval_err, 0); + ERRD_post(isc_expression_eval_err, isc_arg_end); } return; @@ -1103,7 +1103,7 @@ } else { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 607, - isc_arg_gds, isc_dsql_dbkey_from_non_table, 0); + isc_arg_gds, isc_dsql_dbkey_from_non_table, isc_arg_end); } return; @@ -1192,7 +1192,7 @@ else { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 203, - isc_arg_gds, isc_dsql_field_ref, 0); + isc_arg_gds, isc_dsql_field_ref, isc_arg_end); } return; @@ -1454,7 +1454,7 @@ { 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); + isc_arg_string, field->fld_name, isc_arg_end); } MAKE_desc_from_field(&node->nod_desc, field); @@ -1555,7 +1555,7 @@ { if (!message) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, - isc_arg_gds, isc_badmsgnum, 0); + isc_arg_gds, isc_badmsgnum, isc_arg_end); } DEV_BLKCHK(message, dsql_type_msg); Index: parse.y =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/parse.y,v retrieving revision 1.252.2.2 retrieving revision 1.252.2.3 diff -b -U3 -r1.252.2.2 -r1.252.2.3 --- parse.y 1 Jun 2008 01:22:11 -0000 1.252.2.2 +++ parse.y 27 Jun 2008 07:30:25 -0000 1.252.2.3 @@ -2549,13 +2549,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "BIGINT", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "BIGINT", - 0); + isc_arg_end); lex.g_field->fld_dtype = dtype_int64; lex.g_field->fld_length = sizeof (SINT64); } @@ -2576,7 +2576,7 @@ { /* Post warning saying that DATE is equivalent to TIMESTAMP */ ERRD_post_warning (isc_sqlwarn, isc_arg_number, (SLONG) 301, - isc_arg_warning, isc_dtype_renamed, 0); + isc_arg_warning, isc_dtype_renamed, isc_arg_end); lex.g_field->fld_dtype = dtype_timestamp; lex.g_field->fld_length = sizeof (GDS_TIMESTAMP); } @@ -2595,13 +2595,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); lex.g_field->fld_dtype = dtype_sql_time; lex.g_field->fld_length = sizeof (SLONG); } @@ -2775,7 +2775,7 @@ isc_arg_gds, isc_ddl_not_allowed_by_db_sql_dial, isc_arg_number, (SLONG) db_dialect, - 0); + isc_arg_end); if (client_dialect <= SQL_DIALECT_V5) { lex.g_field->fld_dtype = dtype_double; @@ -2832,7 +2832,7 @@ isc_arg_gds, isc_ddl_not_allowed_by_db_sql_dial, isc_arg_number, (SLONG) db_dialect, - 0); + isc_arg_end); if (client_dialect <= SQL_DIALECT_V5) { lex.g_field->fld_dtype = dtype_double; @@ -4060,13 +4060,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "DATE", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "DATE", - 0); + isc_arg_end); $$ = make_node (nod_current_date, 0, NULL); } | CURRENT_TIME sec_precision_opt @@ -4076,13 +4076,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); $$ = make_node (nod_current_time, 1, $2); } | CURRENT_TIMESTAMP sec_precision_opt @@ -4137,13 +4137,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "DATE", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "DATE", - 0); + isc_arg_end); $$ = MAKE_constant ((dsql_str*) $2, CONSTANT_DATE); } | TIME STRING @@ -4153,13 +4153,13 @@ isc_arg_gds, isc_sql_dialect_datatype_unsupport, isc_arg_number, (SLONG) client_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); if (db_dialect < SQL_DIALECT_V6_TRANSITION) ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, isc_arg_gds, isc_sql_db_dialect_dtype_unsupport, isc_arg_number, (SLONG) db_dialect, isc_arg_string, "TIME", - 0); + isc_arg_end); $$ = MAKE_constant ((dsql_str*) $2, CONSTANT_TIME); } | TIMESTAMP STRING @@ -5744,7 +5744,7 @@ isc_arg_gds, isc_command_end_err2, /* Unexpected end of command */ isc_arg_number, lines, isc_arg_number, (SLONG) (lex.last_token - line_start + 1), - 0); + isc_arg_end); else { ERRD_post (isc_sqlerr, isc_arg_number, (SLONG) -104, @@ -5755,7 +5755,7 @@ /* Show the token */ isc_arg_gds, isc_random, isc_arg_cstring, (int) (lex.ptr - lex.last_token), lex.last_token, - 0); + isc_arg_end); } } @@ -5785,5 +5785,5 @@ **************************************/ ERRD_post (isc_sqlerr, isc_arg_number, sql_code, - isc_arg_gds, error_symbol, 0); + isc_arg_gds, error_symbol, isc_arg_end); } Index: pass1.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/dsql/pass1.cpp,v retrieving revision 1.348.2.5 retrieving revision 1.348.2.6 diff -b -U3 -r1.348.2.5 -r1.348.2.6 --- pass1.cpp 2 May 2008 11:23:13 -0000 1.348.2.5 +++ pass1.cpp 27 Jun 2008 07:30:26 -0000 1.348.2.6 @@ -362,7 +362,7 @@ isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) relation_node->nod_line, isc_arg_number, (int) relation_node->nod_column, - 0); + isc_arg_end); } } else if ((cte = request->findCTE(relation_name))) @@ -384,7 +384,7 @@ isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) relation_node->nod_line, isc_arg_number, (int) relation_node->nod_column, - 0); + isc_arg_end); } } @@ -395,7 +395,7 @@ isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) relation_node->nod_line, isc_arg_number, (int) relation_node->nod_column, - 0); + isc_arg_end); } // Set up context block. @@ -479,7 +479,7 @@ if (!strcmp(conflict_name, context->ctx_alias)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 204, isc_arg_gds, error_code, - isc_arg_string, conflict_name, 0); + isc_arg_string, conflict_name, isc_arg_end); } } } @@ -500,7 +500,7 @@ count < procedure->prc_in_count - procedure->prc_def_count) { ERRD_post(isc_prcmismat, isc_arg_string, - relation_name->str_data, 0); + relation_name->str_data, isc_arg_end); } if (count) @@ -633,7 +633,7 @@ sub1->nod_desc.dsc_dtype != dtype_timestamp) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 105, - isc_arg_gds, isc_extract_input_mismatch, 0); + isc_arg_gds, isc_extract_input_mismatch, isc_arg_end); } break; case blr_extract_hour: @@ -645,7 +645,7 @@ sub1->nod_desc.dsc_dtype != dtype_timestamp) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 105, - isc_arg_gds, isc_extract_input_mismatch, 0); + isc_arg_gds, isc_extract_input_mismatch, isc_arg_end); } break; default: @@ -677,7 +677,7 @@ case nod_select: case nod_with: ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_command_err, 0); + isc_arg_gds, isc_dsql_command_err, isc_arg_end); case nod_derived_table: return pass1_derived_table(request, input, proc_flag, NULL); @@ -686,7 +686,7 @@ { if (proc_flag) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 206, - isc_arg_gds, isc_dsql_subselect_err, 0); + isc_arg_gds, isc_dsql_subselect_err, isc_arg_end); const DsqlContextStack::iterator base(*request->req_context); node = MAKE_node(nod_via, e_via_count); @@ -727,7 +727,7 @@ case nod_array: if (proc_flag) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_invalid_array, 0); + isc_arg_gds, isc_dsql_invalid_array, isc_arg_end); else return pass1_field(request, input, false, NULL); @@ -774,7 +774,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_dsql_cte_wrong_reference, // Recursive CTE member (%s) can refer itself only in FROM clause isc_arg_string, rel_name->str_data, - 0); + isc_arg_end); } for (DsqlNodStack::iterator stack(request->req_curr_ctes); stack.hasData(); ++stack) @@ -784,7 +784,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_dsql_cte_cycle, // CTE %s has cyclic dependencies isc_arg_string, rel_name->str_data, - 0); + isc_arg_end); } } @@ -822,7 +822,7 @@ case nod_parameter: if (proc_flag) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_command_err, 0); + isc_arg_gds, isc_dsql_command_err, isc_arg_end); node = MAKE_node(input->nod_type, e_par_count); node->nod_count = 0; node->nod_arg[e_par_parameter] = (dsql_nod*) @@ -908,14 +908,14 @@ isc_arg_gds, isc_imp_exc, isc_arg_gds, isc_dsql_too_many_values, isc_arg_number, MAX_MEMBER_LIST, - 0); + isc_arg_end); return PASS1_node(request, node, proc_flag); } if (sub2->nod_type == nod_select_expr) { if (proc_flag) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 206, - isc_arg_gds, isc_dsql_subselect_err, 0); + isc_arg_gds, isc_dsql_subselect_err, isc_arg_end); if (sub2->nod_flags & NOD_SELECT_EXPR_SINGLETON) { const DsqlContextStack::iterator base(*request->req_context); @@ -984,7 +984,7 @@ case nod_agg_list: if (proc_flag) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_command_err, 0); + isc_arg_gds, isc_dsql_command_err, isc_arg_end); } if (!(request->req_in_select_list || request->req_in_where_clause || request->req_in_group_by_clause || request->req_in_having_clause || @@ -993,7 +993,7 @@ /* not part of a select list, where clause, group by clause, having clause, or order by clause */ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_agg_ref_err, 0); + isc_arg_gds, isc_dsql_agg_ref_err, isc_arg_end); } node = MAKE_node(input->nod_type, e_agg_function_count); node->nod_count = input->nod_count; // Copy count, because this must be exactly the same as input. @@ -1052,7 +1052,7 @@ if (req_mask && !(request->req_flags & req_mask)) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, InternalInfo::getAlias(id), 0); + isc_arg_gds, isc_random, isc_arg_string, InternalInfo::getAlias(id), isc_arg_end); } break; @@ -1066,7 +1066,7 @@ fb_assert(precision >= 0); if (unsigned(precision) > MAX_TIME_PRECISION) { ERRD_post(isc_invalid_time_precision, - isc_arg_number, MAX_TIME_PRECISION, 0); + isc_arg_number, MAX_TIME_PRECISION, isc_arg_end); } } } @@ -1347,7 +1347,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, isc_arg_gds, isc_dsql_var_conflict, isc_arg_string, - field->fld_name, 0); + field->fld_name, isc_arg_end); } } @@ -1365,7 +1365,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, isc_arg_gds, isc_dsql_var_conflict, isc_arg_string, - field->fld_name, 0); + field->fld_name, isc_arg_end); } } } @@ -1413,7 +1413,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 204, isc_arg_gds, isc_dsql_procedure_err, isc_arg_gds, isc_random, - isc_arg_string, name->str_data, 0); + isc_arg_string, name->str_data, isc_arg_end); } if (!proc_flag) { @@ -1431,7 +1431,7 @@ if (count > procedure->prc_in_count || count < procedure->prc_in_count - procedure->prc_def_count) { - ERRD_post(isc_prcmismat, isc_arg_string, name->str_data, 0); + ERRD_post(isc_prcmismat, isc_arg_string, name->str_data, isc_arg_end); } node->nod_arg[e_exe_inputs] = @@ -1461,7 +1461,7 @@ if (count != procedure->prc_out_count) { ERRD_post(isc_prc_out_param_mismatch, - isc_arg_string, name->str_data, 0); + isc_arg_string, name->str_data, isc_arg_end); } node->nod_arg[e_exe_outputs] = @@ -1471,7 +1471,7 @@ if (temp) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "RETURNING_VALUES", 0); + isc_arg_gds, isc_random, isc_arg_string, "RETURNING_VALUES", isc_arg_end); } node->nod_arg[e_exe_outputs] = explode_outputs(request, request->req_procedure); @@ -1690,7 +1690,7 @@ if (!request->req_loop_level) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "BREAK/LEAVE", 0); + isc_arg_gds, isc_random, isc_arg_string, "BREAK/LEAVE", isc_arg_end); input->nod_arg[e_breakleave_label] = pass1_label(request, input); return input; @@ -1699,7 +1699,7 @@ { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "SUSPEND", 0); + isc_arg_gds, isc_random, isc_arg_string, "SUSPEND", isc_arg_end); } request->req_flags |= REQ_selectable; @@ -1767,7 +1767,7 @@ if (request->req_flags & REQ_block) // blocks, procedures and triggers ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "SAVEPOINT", 0); + isc_arg_gds, isc_random, isc_arg_string, "SAVEPOINT", isc_arg_end); request->req_type = REQ_SAVEPOINT; return input; @@ -1775,7 +1775,7 @@ if (request->req_flags & REQ_block) // blocks, procedures and triggers ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "RELEASE", 0); + isc_arg_gds, isc_random, isc_arg_string, "RELEASE", isc_arg_end); request->req_type = REQ_SAVEPOINT; return input; @@ -1783,7 +1783,7 @@ if (request->req_flags & REQ_block) // blocks, procedures and triggers ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, isc_arg_gds, isc_token_err, // Token unknown - isc_arg_gds, isc_random, isc_arg_string, "ROLLBACK", 0); + isc_arg_gds, isc_random, isc_arg_string, "ROLLBACK", isc_arg_end); request->req_type = REQ_SAVEPOINT; return input; @@ -1810,7 +1810,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_union_err, // union not supported - 0); + isc_arg_end); break; case nod_cursor: @@ -1870,7 +1870,7 @@ ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 901, isc_arg_gds, isc_dsql_command_err, isc_arg_gds, isc_dsql_construct_err, // Unsupported DSQL construct - 0); + isc_arg_end); break; } @@ -2257,7 +2257,7 @@ isc_arg_string, ++p, isc_arg_gds, isc_random, isc_arg_string, name->str_data, - 0); + isc_arg_end); return NULL; } @@ -2267,7 +2267,7 @@ isc_arg_string, ++p, isc_arg_gds, isc_random, isc_arg_string, name->str_data, - 0); + isc_arg_end); return node; } @@ -2360,7 +2360,7 @@ else { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -637, isc_arg_gds, isc_dsql_duplicate_spec, - isc_arg_string, name, 0); + isc_arg_string, name, isc_arg_end); } } } @@ -2550,7 +2550,7 @@ isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) flawed_node->nod_line, isc_arg_number, (int) flawed_node->nod_column, - 0); + isc_arg_end); } @@ -2587,14 +2587,14 @@ isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) flawed_node->nod_line, isc_arg_number, (int) flawed_node->nod_column, - 0); + isc_arg_end); else ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -206, isc_arg_gds, isc_dsql_field_err, isc_arg_gds, isc_dsql_line_col_error, isc_arg_number, (int) flawed_node->nod_line, isc_arg_number, (int) flawed_node->nod_column, - 0); + isc_arg_end); } else { @@ -2603,12 +2603,12 @@ isc_arg_gds, isc_dsql_field_err, isc_arg_gds, isc_random, isc_arg_string, field_name, isc_arg_gds, isc_dsql_unknown_pos, - 0); + isc_arg_end); else ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) -206, isc_arg_gds, isc_dsql_field_err, isc_arg_gds, isc_dsql_unknown_pos, - 0); + isc_arg_end); } } @@ -2893,7 +2893,7 @@ FIELD_MATCH_TYPE_EQUAL, true)) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_dsql_agg_nested_err, 0); + isc_arg_gds, isc_dsql_agg_nested_err, isc_arg_end); // Nested aggregate functions are not allowed } } @@ -3442,7 +3442,7 @@ dsql_nod* field = pass1_field(request, input->nod_arg[e_blb_field], false, NULL); if (field->nod_desc.dsc_dtype != dtype_blob) ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 206, - isc_arg_gds, isc_dsql_blob_err, 0); + isc_arg_gds, isc_dsql_blob_err, isc_arg_end); request->req_type = (input->nod_type == nod_get_segment) ? REQ_GET_SEGMENT : REQ_PUT_SEGMENT; @@ -3610,7 +3610,7 @@ else { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 204, isc_arg_gds, isc_dsql_datatype_err, - isc_arg_gds, isc_collation_requires_text, 0); + isc_arg_gds, isc_collation_requires_text, isc_arg_end); } DDL_resolve_intl_type(request, field, collation); MAKE_desc_from_field(&node->nod_desc, field); @@ -3660,7 +3660,7 @@ // character set name is not defined ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 504, isc_arg_gds, isc_charset_not_found, isc_arg_string, string->str_charset, - 0); + isc_arg_end); } if (global_temp_collation_name) @@ -3676,7 +3676,7 @@ isc_dsql_datatype_err, isc_arg_gds, isc_collation_not_found, isc_arg_string, global_temp_collation_name->str_data, - isc_arg_string, resolved->intlsym_name, 0); + isc_arg_string, resolved->intlsym_name, isc_arg_end); } resolved = resolved_collation; } @@ -3750,7 +3750,7 @@ // cursor with DISTINCT is not updatable ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 510, isc_arg_gds, isc_dsql_cursor_update_err, - isc_arg_string, string->str_data, 0); + isc_arg_string, string->str_data, isc_arg_end); } const dsql_nod* temp = rse->nod_arg[e_rse_streams]; @@ -3774,7 +3774,7 @@ isc_arg_gds, isc_dsql_cursor_err, isc_arg_gds, isc_dsql_cursor_rel_ambiguous, isc_arg_string, rname->str_data, - isc_arg_string, string->str_data, 0); + isc_arg_string, string->str_data, isc_arg_end); else context = candidate; } @@ -3783,7 +3783,7 @@ // cursor with aggregation is not updatable ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 510, isc_arg_gds, isc_dsql_cursor_update_err, - isc_arg_string, string->str_data, 0); + isc_arg_string, string->str_data, isc_arg_end); } // note that nod_union and nod_join will cause the error below, // as well as derived tables. Some cases deserve fixing in the future @@ -3794,7 +3794,7 @@ isc_arg_gds, isc_dsql_cursor_err, isc_arg_gds, isc_dsql_cursor_rel_not_found, isc_arg_string, rname->str_data, - isc_arg_string, string->str_data, 0); + isc_arg_string, string->str_data, isc_arg_end); return context; } @@ -3823,12 +3823,12 @@ if (existence_flag) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 504, isc_arg_gds, isc_dsql_cursor_err, - isc_arg_gds, isc_dsql_cursor_invalid, 0); + isc_arg_gds, isc_dsql_cursor_invalid, isc_arg_end); } else { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, isc_arg_gds, isc_dsql_decl_err, - isc_arg_gds, isc_dsql_cursor_invalid, 0); + isc_arg_gds, isc_dsql_cursor_invalid, isc_arg_end); } } @@ -3845,14 +3845,14 @@ isc_arg_gds, isc_dsql_cursor_err, isc_arg_gds, isc_dsql_cursor_not_found, isc_arg_string, string->str_data, - 0); + isc_arg_end); } else if (cursor && !existence_flag) { ERRD_post(isc_sqlerr, isc_arg_number, (SLONG) - 502, i... [truncated message content] |