8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00
This commit is contained in:
asfernandes 2008-08-31 01:10:41 +00:00
parent a2026308da
commit 96194d08ba
11 changed files with 73 additions and 70 deletions

View File

@ -469,7 +469,7 @@ static void ExtractDriveLetter(const TEXT*, ULONG*);
static Database* init(thread_db*, const PathName&, bool);
static void prepare(thread_db*, jrd_tra*, USHORT, const UCHAR*);
static void release_attachment(thread_db*, Attachment*, ISC_STATUS* = 0);
static void release_attachment(thread_db*, Attachment*, ISC_STATUS* = NULL);
static void detachLocksFromAttachment(Attachment*);
static void rollback(thread_db*, jrd_tra*, const bool);
static void shutdown_database(Database*, const bool);
@ -3797,11 +3797,13 @@ bool JRD_reschedule(thread_db* tdbb, SLONG quantum, bool punt)
attachment->att_flags & ATT_shutdown)
{
const PathName& file_name = attachment->att_filename;
if (punt) {
if (punt)
{
CCH_unwind(tdbb, false);
ERR_post(Arg::Gds(isc_shutdown) << Arg::Str(file_name));
}
else {
else
{
ERR_build_status(tdbb->tdbb_status_vector,
Arg::Gds(isc_shutdown) << Arg::Str(file_name));
return true;
@ -3810,11 +3812,13 @@ bool JRD_reschedule(thread_db* tdbb, SLONG quantum, bool punt)
else if (attachment->att_flags & ATT_shutdown &&
!(tdbb->tdbb_flags & TDBB_shutdown_manager))
{
if (punt) {
if (punt)
{
CCH_unwind(tdbb, false);
ERR_post(Arg::Gds(isc_att_shutdown));
}
else {
else
{
ERR_build_status(tdbb->tdbb_status_vector,
Arg::Gds(isc_att_shutdown));
return true;
@ -3833,11 +3837,13 @@ bool JRD_reschedule(thread_db* tdbb, SLONG quantum, bool punt)
(!transaction || !(transaction->tra_flags & TRA_system)))
{
attachment->att_flags &= ~ATT_cancel_raise;
if (punt) {
if (punt)
{
CCH_unwind(tdbb, false);
ERR_post(Arg::Gds(isc_cancelled));
}
else {
else
{
ERR_build_status(tdbb->tdbb_status_vector, Arg::Gds(isc_cancelled));
return true;
}
@ -4954,7 +4960,7 @@ Attachment::Attachment(MemoryPool* pool, Database* dbb)
att_remote_process(*pool),
att_dsql_cache(*pool),
att_udf_pointers(*pool),
att_strings_buffer(0)
att_strings_buffer(NULL)
{
att_mutex.enter();
}

View File

@ -571,11 +571,9 @@ bool BackupManager::actualize_alloc(thread_db* tdbb)
}
last_allocated_page = temp_bdb.bdb_page.getPageNum() + alloc_buffer[0];
if (alloc_buffer[0] == database->dbb_page_size / sizeof(ULONG) - 1)
// if page is full adjust position for next pointer page
last_allocated_page++;
last_allocated_page++; // if page is full adjust position for next pointer page
else
// We finished reading allocation table
break;
break; // We finished reading allocation table
}
}
catch (const Firebird::Exception& ex) {
@ -769,8 +767,7 @@ bool BackupManager::actualize_state(thread_db* tdbb)
temp_bdb.bdb_page = HEADER_PAGE_NUMBER;
temp_bdb.bdb_dbb = database;
temp_bdb.bdb_buffer = reinterpret_cast<Ods::pag*>(header);
PageSpace* pageSpace =
database->dbb_page_manager.findPageSpace(DB_PAGE_SPACE);
PageSpace* pageSpace = database->dbb_page_manager.findPageSpace(DB_PAGE_SPACE);
fb_assert(pageSpace);
jrd_file* file = pageSpace->file;
while (!PIO_read(file, &temp_bdb, temp_bdb.bdb_buffer, status)) {

View File

@ -1448,8 +1448,7 @@ void PAG_init(thread_db* tdbb)
(dbb->dbb_page_size - OFFSETA(tx_inv_page*, tip_transactions)) * 4;
pageSpace->ppFirst = 1;
/* dbb_ods_version can be 0 when a new database is being created */
if ((dbb->dbb_ods_version == 0)
|| (dbb->dbb_ods_version >= ODS_VERSION10))
if ((dbb->dbb_ods_version == 0) || (dbb->dbb_ods_version >= ODS_VERSION10))
{
pageMgr.gensPerPage =
(dbb->dbb_page_size -

View File

@ -1660,8 +1660,7 @@ static jrd_nod* par_message(thread_db* tdbb, CompilerScratch* csb)
}
if (offset > MAX_FORMAT_SIZE)
error(csb, Arg::Gds(isc_imp_exc) <<
Arg::Gds(isc_blktoobig));
error(csb, Arg::Gds(isc_imp_exc) << Arg::Gds(isc_blktoobig));
format->fmt_length = (USHORT) offset;
@ -2081,8 +2080,10 @@ static void par_procedure_parms(
(count != procedure->prc_outputs))
{
/** They don't match...Hmmm...Its OK if we were dropping the procedure **/
if (!(tdbb->tdbb_flags & TDBB_prc_being_dropped)) {
error(csb, Arg::Gds(input_flag ? isc_prcmismat : isc_prc_out_param_mismatch) << Arg::Str(procedure->prc_name));
if (!(tdbb->tdbb_flags & TDBB_prc_being_dropped))
{
error(csb, Arg::Gds(input_flag ? isc_prcmismat : isc_prc_out_param_mismatch) <<
Arg::Str(procedure->prc_name));
}
else
mismatch = true;
@ -2176,7 +2177,8 @@ static void par_procedure_parms(
else if ((input_flag ? procedure->prc_inputs : procedure->prc_outputs) &&
!mismatch)
{
error(csb, Arg::Gds(input_flag ? isc_prcmismat : isc_prc_out_param_mismatch) << Arg::Str(procedure->prc_name));
error(csb, Arg::Gds(input_flag ? isc_prcmismat : isc_prc_out_param_mismatch) <<
Arg::Str(procedure->prc_name));
}
}
@ -2984,8 +2986,7 @@ jrd_nod* PAR_parse_node(thread_db* tdbb, CompilerScratch* csb, USHORT expected,
n = BLR_BYTE;
if (n >= csb->csb_rpt.getCount() || !(csb->csb_rpt[n].csb_flags & csb_used))
error(csb, Arg::Gds(isc_ctxnotdef));
node->nod_arg[e_erase_stream] =
(jrd_nod*) (IPTR) csb->csb_rpt[n].csb_stream;
node->nod_arg[e_erase_stream] = (jrd_nod*) (IPTR) csb->csb_rpt[n].csb_stream;
break;
case blr_modify:
@ -3016,8 +3017,7 @@ jrd_nod* PAR_parse_node(thread_db* tdbb, CompilerScratch* csb, USHORT expected,
if (BLR_PEEK == (UCHAR) blr_stall)
node->nod_arg[e_for_stall] = PAR_parse_node(tdbb, csb, STATEMENT);
if (BLR_PEEK == (UCHAR) blr_rse ||
BLR_PEEK == (UCHAR) blr_singular)
if (BLR_PEEK == (UCHAR) blr_rse || BLR_PEEK == (UCHAR) blr_singular)
node->nod_arg[e_for_re] = PAR_parse_node(tdbb, csb, TYPE_RSE);
else
node->nod_arg[e_for_re] = par_rse(tdbb, csb, blr_operator);

View File

@ -144,9 +144,11 @@ bool PCMET_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork* work,
}
if (IDX.RDB$SEGMENT_COUNT)
{
/* Msg359: segments not allowed in expression index %s */
ERR_post(Arg::Gds(isc_no_meta_update) <<
Arg::Gds(isc_no_segments_err) << Arg::Str(work->dfw_name));
/* Msg359: segments not allowed in expression index %s */
}
if (IDX.RDB$UNIQUE_FLAG)
idx.idx_flags |= idx_unique;
if (IDX.RDB$INDEX_TYPE == 1)

View File

@ -2749,7 +2749,6 @@ static void inet_error(
}
else {
/* No status value, just format the basic arguments. */
inet_gen_error(port,
Arg::Gds(isc_network_error) << Arg::Str(port->port_connection->str_data) <<
Arg::Gds(operation));