8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 04:43:03 +01:00
This commit is contained in:
robocop 2009-06-10 14:09:39 +00:00
parent 94925236bd
commit 6e1ec65c25

View File

@ -1121,7 +1121,7 @@ void VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
* stub. * stub.
* *
**************************************/ **************************************/
DSC desc, desc2;
// Revokee is only 32 bytes. UserId would be truncated. // Revokee is only 32 bytes. UserId would be truncated.
SqlIdentifier relation_name, revokee, privilege, procedure_name; SqlIdentifier relation_name, revokee, privilege, procedure_name;
@ -1173,6 +1173,8 @@ void VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
/* If we're about to erase a system relation, check to make sure /* If we're about to erase a system relation, check to make sure
everything is completely kosher. */ everything is completely kosher. */
DSC desc, desc2;
if (needDfw(tdbb, transaction)) if (needDfw(tdbb, transaction))
{ {
jrd_rel* r2; jrd_rel* r2;
@ -2086,8 +2088,6 @@ void VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb,
* Modify an existing record. * Modify an existing record.
* *
**************************************/ **************************************/
DSC desc1, desc2;
SET_TDBB(tdbb); SET_TDBB(tdbb);
#ifdef VIO_DEBUG #ifdef VIO_DEBUG
@ -2136,6 +2136,8 @@ void VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb,
/* If we're about to modify a system relation, check to make sure /* If we're about to modify a system relation, check to make sure
everything is completely kosher. */ everything is completely kosher. */
DSC desc1, desc2;
if (needDfw(tdbb, transaction)) if (needDfw(tdbb, transaction))
{ {
switch ((RIDS) relation->rel_id) switch ((RIDS) relation->rel_id)
@ -2530,9 +2532,9 @@ void VIO_start_save_point(thread_db* tdbb, jrd_tra* transaction)
* *
**************************************/ **************************************/
SET_TDBB(tdbb); SET_TDBB(tdbb);
Savepoint* sav_point; Savepoint* sav_point = transaction->tra_save_free;
if ( (sav_point = transaction->tra_save_free) ) { if (sav_point) {
transaction->tra_save_free = sav_point->sav_next; transaction->tra_save_free = sav_point->sav_next;
} }
else { else {
@ -2557,8 +2559,6 @@ void VIO_store(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
* Store a new record. * Store a new record.
* *
**************************************/ **************************************/
DSC desc, desc2;
SET_TDBB(tdbb); SET_TDBB(tdbb);
jrd_req* request = tdbb->getRequest(); jrd_req* request = tdbb->getRequest();
DeferredWork* work = NULL; DeferredWork* work = NULL;
@ -2573,6 +2573,7 @@ void VIO_store(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)
transaction->tra_flags |= TRA_write; transaction->tra_flags |= TRA_write;
jrd_rel* relation = rpb->rpb_relation; jrd_rel* relation = rpb->rpb_relation;
DSC desc, desc2;
if (needDfw(tdbb, transaction)) if (needDfw(tdbb, transaction))
{ {
@ -3750,11 +3751,6 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg)
CHECK_DBB(dbb); CHECK_DBB(dbb);
Database::SyncGuard dsGuard(dbb); Database::SyncGuard dsGuard(dbb);
record_param rpb;
MOVE_CLEAR(&rpb, sizeof(record_param));
jrd_rel* relation = NULL;
jrd_tra* transaction = NULL;
ISC_STATUS_ARRAY status_vector; ISC_STATUS_ARRAY status_vector;
MOVE_CLEAR(status_vector, sizeof(status_vector)); MOVE_CLEAR(status_vector, sizeof(status_vector));
@ -3769,6 +3765,8 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg)
/* Surrender if resources to start up aren't available. */ /* Surrender if resources to start up aren't available. */
bool found = false, flush = false; bool found = false, flush = false;
record_param rpb;
MOVE_CLEAR(&rpb, sizeof(record_param));
try { try {
/* Pseudo attachment needed for lock owner identification. */ /* Pseudo attachment needed for lock owner identification. */
@ -3791,6 +3789,9 @@ static THREAD_ENTRY_DECLARE garbage_collector(THREAD_ENTRY_PARAM arg)
goto gc_exit; goto gc_exit;
} }
jrd_rel* relation = NULL;
jrd_tra* transaction = NULL;
try { try {
/* Initialize status vector after logging error. */ /* Initialize status vector after logging error. */
@ -4897,7 +4898,7 @@ static void update_in_place(thread_db* tdbb,
temp2.rpb_line = line; temp2.rpb_line = line;
} }
UCHAR* address = org_rpb->rpb_address; UCHAR* const save_address = org_rpb->rpb_address;
const USHORT length = org_rpb->rpb_length; const USHORT length = org_rpb->rpb_length;
const USHORT format_number = org_rpb->rpb_format_number; const USHORT format_number = org_rpb->rpb_format_number;
org_rpb->rpb_address = new_rpb->rpb_address; org_rpb->rpb_address = new_rpb->rpb_address;
@ -4909,7 +4910,7 @@ static void update_in_place(thread_db* tdbb,
replace_record(tdbb, org_rpb, &stack, transaction); replace_record(tdbb, org_rpb, &stack, transaction);
DEBUG; DEBUG;
org_rpb->rpb_address = address; org_rpb->rpb_address = save_address;
org_rpb->rpb_length = length; org_rpb->rpb_length = length;
org_rpb->rpb_format_number = format_number; org_rpb->rpb_format_number = format_number;
org_rpb->rpb_undo = old_data; org_rpb->rpb_undo = old_data;