From 4efb74fc5148ed8202fe74b68feb7f9e996a360d Mon Sep 17 00:00:00 2001 From: asfernandes Date: Mon, 13 Jun 2005 02:12:14 +0000 Subject: [PATCH] Removed some compiler messages --- src/dsql/gen.cpp | 8 ++++---- src/dsql/make.cpp | 8 ++++---- src/dsql/pass1.cpp | 15 ++++----------- src/jrd/inf.cpp | 6 +++++- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/dsql/gen.cpp b/src/dsql/gen.cpp index 8f2189be47..946aa18091 100644 --- a/src/dsql/gen.cpp +++ b/src/dsql/gen.cpp @@ -1532,16 +1532,16 @@ static void gen_constant( dsql_req* request, dsc* desc, bool negate_value) input += sizeof(USHORT); memcpy(input, desc->dsc_address, desc->dsc_length); - ISC_STATUS_ARRAY user_status; + tsql* tdsql = DSQL_get_thread_data(); + THREAD_EXIT(); const ISC_STATUS s = - isc_database_info(user_status, &request->req_dbb->dbb_database_handle, + isc_database_info(tdsql->tsql_status, &request->req_dbb->dbb_database_handle, inputBuffer.getCount(), (SCHAR*)inputBuffer.begin(), sizeof(buffer), buffer); THREAD_ENTER(); if (s) - ; -#pragma FB_COMPILER_MESSAGE("Adriano should put an error message here.") + Firebird::status_exception::raise(tdsql->tsql_status); l = desc->dsc_length = gds__vax_integer((UCHAR*)buffer + sizeof(UCHAR) + sizeof(USHORT), sizeof(SLONG)); diff --git a/src/dsql/make.cpp b/src/dsql/make.cpp index a6209da19a..7536ec6235 100644 --- a/src/dsql/make.cpp +++ b/src/dsql/make.cpp @@ -1720,16 +1720,16 @@ dsql_nod* MAKE_field(dsql_ctx* context, dsql_fld* field, dsql_nod* indices) *input++ = INF_internal_db_info_intl_is_legacy_charset; *input++ = INTL_GET_CHARSET(&node->nod_desc); - ISC_STATUS_ARRAY user_status; + tsql* tdsql = DSQL_get_thread_data(); + THREAD_EXIT(); const ISC_STATUS s = - isc_database_info(user_status, &context->ctx_request->req_dbb->dbb_database_handle, + isc_database_info(tdsql->tsql_status, &context->ctx_request->req_dbb->dbb_database_handle, inputBuffer.getCapacity(), (SCHAR*)inputBuffer.begin(), sizeof(buffer), buffer); THREAD_ENTER(); if (s) - ; -#pragma FB_COMPILER_MESSAGE("Adriano should put an error message here.") + Firebird::status_exception::raise(tdsql->tsql_status); if (*((UCHAR*)buffer + sizeof(UCHAR) + sizeof(USHORT))) // CHARSET_LEGACY_SEMANTICS { diff --git a/src/dsql/pass1.cpp b/src/dsql/pass1.cpp index 03248d2372..489e3c139c 100644 --- a/src/dsql/pass1.cpp +++ b/src/dsql/pass1.cpp @@ -3216,26 +3216,19 @@ static dsql_nod* pass1_constant( dsql_req* request, dsql_nod* constant) input += sizeof(USHORT); memcpy(input, constant->nod_desc.dsc_address, constant->nod_desc.dsc_length); - ISC_STATUS_ARRAY user_status; + tsql* tdsql = DSQL_get_thread_data(); + THREAD_EXIT(); const ISC_STATUS s = - isc_database_info(user_status, &request->req_dbb->dbb_database_handle, + isc_database_info(tdsql->tsql_status, &request->req_dbb->dbb_database_handle, inputBuffer.getCount(), (SCHAR*)inputBuffer.begin(), sizeof(buffer), buffer); THREAD_ENTER(); if (s) - ; -#pragma FB_COMPILER_MESSAGE("Adriano should put an error message here.") + Firebird::status_exception::raise(tdsql->tsql_status); SLONG length = gds__vax_integer((UCHAR*)buffer + sizeof(UCHAR) + sizeof(USHORT), sizeof(SLONG)); - if (length == -1) // malformed string - { - ERRD_post(isc_sqlerr, - isc_arg_number, (SLONG) - 104, - isc_arg_gds, isc_malformed_string, 0); - } - constant->nod_desc.dsc_length = length * METD_get_charset_bpc(request, INTL_GET_CHARSET(&constant->nod_desc)); constant->nod_desc.dsc_length += adjust; diff --git a/src/jrd/inf.cpp b/src/jrd/inf.cpp index 467688ed4a..acbd19f0d1 100644 --- a/src/jrd/inf.cpp +++ b/src/jrd/inf.cpp @@ -790,7 +790,11 @@ int INF_database_info(const SCHAR* items, { ULONG offendingPos; if (!charSet->wellFormed(strLen, (const UCHAR*)items, &offendingPos)) - length = INF_convert(-1, buffer); + { + ERR_post(isc_sqlerr, + isc_arg_number, (SLONG) - 104, + isc_arg_gds, isc_malformed_string, 0); + } else { length = INF_convert(charSet->length(tdbb, strLen,