mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Cleanup:
const correctness BOOLEAN -> bool Vars in scope Formatting JRD_REQ -> jrd_req* JRD_TRA -> jrd_tra* JRD_REL -> jrd_rel* JRD_FLD -> jrd_fld* event -> event_t, EVENT_T dropped, EVENT should go in the future Frank's corrections alice's STR -> alice_str* remote's STR -> rem_str* etc. It creates entities and backups and restores for me. :-)
This commit is contained in:
parent
0cbf9b3765
commit
fd93837ec3
@ -72,13 +72,12 @@ typedef struct user_action
|
||||
|
||||
/* String block: used to store a string of constant length. */
|
||||
|
||||
class str : public pool_alloc_rpt<UCHAR, alice_type_str>
|
||||
class alice_str : public pool_alloc_rpt<UCHAR, alice_type_str>
|
||||
{
|
||||
public:
|
||||
USHORT str_length;
|
||||
UCHAR str_data[2];
|
||||
};
|
||||
typedef str* STR;
|
||||
|
||||
/* Transaction block: used to store info about a multidatabase transaction. */
|
||||
|
||||
@ -86,10 +85,10 @@ typedef struct tdr : public pool_alloc<alice_type_tdr>
|
||||
{
|
||||
tdr* tdr_next; /* next subtransaction */
|
||||
SLONG tdr_id; /* database-specific transaction id */
|
||||
str* tdr_fullpath; /* full (possibly) remote pathname */
|
||||
alice_str* tdr_fullpath; /* full (possibly) remote pathname */
|
||||
const TEXT* tdr_filename; /* filename within full pathname */
|
||||
str* tdr_host_site; /* host for transaction */
|
||||
str* tdr_remote_site; /* site for remote transaction */
|
||||
alice_str* tdr_host_site; /* host for transaction */
|
||||
alice_str* tdr_remote_site; /* site for remote transaction */
|
||||
FRBRD* tdr_handle; /* reconnected transaction handle */
|
||||
FRBRD* tdr_db_handle; /* reattached database handle */
|
||||
USHORT tdr_db_caps; /* capabilities of database */
|
||||
|
@ -27,7 +27,7 @@
|
||||
*
|
||||
*____________________________________________________________
|
||||
*
|
||||
* $Id: alice_meta.epp,v 1.28 2003-11-18 12:33:43 brodsom Exp $
|
||||
* $Id: alice_meta.epp,v 1.29 2004-01-03 10:59:34 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -57,7 +57,7 @@ DATABASE DB = STATIC FILENAME "yachts.lnk";
|
||||
#define DB tdgbl->db_handle
|
||||
#define gds_trans tdgbl->tr_handle
|
||||
|
||||
static STR alloc_string(TEXT**);
|
||||
static alice_str* alloc_string(const TEXT**);
|
||||
static USHORT get_capabilities(ISC_STATUS*);
|
||||
static TDR get_description(SLONG[2]);
|
||||
static void parse_fullpath(TDR);
|
||||
@ -244,18 +244,19 @@ void MET_set_capabilities(ISC_STATUS* user_status, TDR trans)
|
||||
* Eat a string with a byte-encoded length.
|
||||
*/
|
||||
|
||||
static STR alloc_string(TEXT** ptr)
|
||||
static alice_str* alloc_string(const TEXT** ptr)
|
||||
{
|
||||
TGBL tdgbl = GET_THREAD_DATA;
|
||||
|
||||
TEXT* p = *ptr;
|
||||
const TEXT* p = *ptr;
|
||||
|
||||
USHORT length = (USHORT) *p++;
|
||||
STR string = FB_NEW_RPT(*tdgbl->ALICE_default_pool, length + 1) str;
|
||||
alice_str* string = FB_NEW_RPT(*tdgbl->ALICE_default_pool, length + 1) alice_str;
|
||||
|
||||
TEXT* q = (TEXT *) string->str_data;
|
||||
while (length--)
|
||||
while (length--) {
|
||||
*q++ = *p++;
|
||||
}
|
||||
*q = 0;
|
||||
|
||||
*ptr = p;
|
||||
@ -314,7 +315,7 @@ static TDR get_description(SLONG blob_id[2])
|
||||
TEXT* bigger_buffer = 0;
|
||||
TGBL tdgbl = GET_THREAD_DATA;
|
||||
|
||||
TEXT* p = buffer;
|
||||
const TEXT* p = buffer;
|
||||
const USHORT length = snarf_blob(blob_id, (USHORT) sizeof(buffer), buffer);
|
||||
if (length) {
|
||||
p = bigger_buffer = (TEXT *) gds__alloc((SLONG) length);
|
||||
@ -322,7 +323,8 @@ static TDR get_description(SLONG blob_id[2])
|
||||
}
|
||||
|
||||
TDR trans = NULL;
|
||||
STR host_site = NULL, database_path = NULL;
|
||||
alice_str* host_site = NULL;
|
||||
alice_str* database_path = NULL;
|
||||
|
||||
// skip version number
|
||||
++p;
|
||||
@ -330,7 +332,7 @@ static TDR get_description(SLONG blob_id[2])
|
||||
TDR ptr;
|
||||
SLONG id_length, id;
|
||||
|
||||
while (*p)
|
||||
while (*p) {
|
||||
switch (*p++) {
|
||||
case TDR_HOST_SITE:
|
||||
host_site = alloc_string(&p);
|
||||
@ -342,10 +344,11 @@ static TDR get_description(SLONG blob_id[2])
|
||||
|
||||
case TDR_TRANSACTION_ID:
|
||||
id_length = *p++;
|
||||
id = gds__vax_integer(reinterpret_cast<UCHAR*>(p), id_length);
|
||||
id = gds__vax_integer(reinterpret_cast<const UCHAR*>(p), id_length);
|
||||
p += id_length;
|
||||
if (!trans)
|
||||
if (!trans) {
|
||||
trans = ptr = FB_NEW(*tdgbl->ALICE_default_pool) tdr;
|
||||
}
|
||||
else {
|
||||
ptr->tdr_next = FB_NEW(*tdgbl->ALICE_default_pool) tdr;
|
||||
ptr = ptr->tdr_next;
|
||||
@ -361,13 +364,16 @@ static TDR get_description(SLONG blob_id[2])
|
||||
ALICE_print(108, 0, 0, 0, 0, 0);
|
||||
// msg 108: Transaction description item unknown.
|
||||
|
||||
if (length)
|
||||
if (length) {
|
||||
gds__free(bigger_buffer);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (length)
|
||||
if (length) {
|
||||
gds__free(bigger_buffer);
|
||||
}
|
||||
|
||||
return trans;
|
||||
}
|
||||
@ -409,7 +415,7 @@ static void parse_fullpath(TDR trans)
|
||||
if (*q) {
|
||||
trans->tdr_filename = q + 1;
|
||||
|
||||
trans->tdr_remote_site = FB_NEW_RPT(*tdgbl->ALICE_default_pool, q - p + 1) str;
|
||||
trans->tdr_remote_site = FB_NEW_RPT(*tdgbl->ALICE_default_pool, q - p + 1) alice_str;
|
||||
strncpy((char*) trans->tdr_remote_site->str_data, (char*) p, q - p);
|
||||
trans->tdr_remote_site->str_data[q - p] = '\0';
|
||||
}
|
||||
@ -440,7 +446,7 @@ static void parse_fullpath(TDR trans)
|
||||
++p;
|
||||
|
||||
if (length) {
|
||||
trans->tdr_remote_site = FB_NEW_RPT(*tdgbl->ALICE_default_pool, length + 1) str;
|
||||
trans->tdr_remote_site = FB_NEW_RPT(*tdgbl->ALICE_default_pool, length + 1) alice_str;
|
||||
TEXT* q = (TEXT *) trans->tdr_remote_site->str_data;
|
||||
while (length--)
|
||||
*q++ = *p++;
|
||||
|
@ -24,7 +24,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: tdr.cpp,v 1.31 2003-11-18 07:58:23 robocop Exp $
|
||||
// $Id: tdr.cpp,v 1.32 2004-01-03 10:59:34 robocop Exp $
|
||||
//
|
||||
// 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
|
||||
//
|
||||
@ -838,8 +838,8 @@ static void reattach_database(TDR trans)
|
||||
if (TDR_attach_database(status_vector, trans,
|
||||
reinterpret_cast<char*>(p)))
|
||||
{
|
||||
STR string = FB_NEW_RPT(*tdgbl->ALICE_default_pool,
|
||||
strlen(reinterpret_cast<const char*>(p)) + 1) str;
|
||||
alice_str* string = FB_NEW_RPT(*tdgbl->ALICE_default_pool,
|
||||
strlen(reinterpret_cast<const char*>(p)) + 1) alice_str;
|
||||
strcpy(reinterpret_cast<char*>(string->str_data),
|
||||
reinterpret_cast<const char*>(p));
|
||||
string->str_length = strlen(reinterpret_cast<const char*>(p));
|
||||
|
@ -20,7 +20,7 @@
|
||||
//
|
||||
// All Rights Reserved.
|
||||
// Contributor(s): ______________________________________.
|
||||
// $Id: gpre.cpp,v 1.47 2003-11-28 06:48:12 robocop Exp $
|
||||
// $Id: gpre.cpp,v 1.48 2004-01-03 10:59:38 robocop Exp $
|
||||
// Revision 1.2 2000/11/16 15:54:29 fsg
|
||||
// Added new switch -verbose to gpre that will dump
|
||||
// parsed lines to stderr
|
||||
@ -1948,7 +1948,6 @@ static TOK get_token()
|
||||
SSHORT next;
|
||||
USHORT peek;
|
||||
TEXT *p, *end;
|
||||
UCHAR class_;
|
||||
|
||||
// Save the information from the previous token
|
||||
|
||||
@ -2008,15 +2007,16 @@ static TOK get_token()
|
||||
|
||||
token.tok_position = position;
|
||||
token.tok_white_space = 0;
|
||||
class_ = classes[c];
|
||||
UCHAR char_class = classes[c];
|
||||
|
||||
#ifdef GPRE_ADA
|
||||
if ((sw_language == lang_ada) && (c == '\'')) {
|
||||
SSHORT c1, c2;
|
||||
c1 = nextchar();
|
||||
c2 = nextchar();
|
||||
if (c2 != '\'')
|
||||
class_ = CHR_LETTER;
|
||||
if (c2 != '\'') {
|
||||
char_class = CHR_LETTER;
|
||||
}
|
||||
return_char(c2);
|
||||
return_char(c1);
|
||||
}
|
||||
@ -2024,14 +2024,16 @@ static TOK get_token()
|
||||
|
||||
bool label = false;
|
||||
|
||||
if (sw_sql && (class_ & CHR_INTRODUCER)) {
|
||||
while (classes[c = nextchar()] & CHR_IDENT)
|
||||
if (p < end)
|
||||
if (sw_sql && (char_class & CHR_INTRODUCER)) {
|
||||
while (classes[c = nextchar()] & CHR_IDENT) {
|
||||
if (p < end) {
|
||||
*p++ = (TEXT) c;
|
||||
}
|
||||
}
|
||||
return_char(c);
|
||||
token.tok_type = tok_introducer;
|
||||
}
|
||||
else if (class_ & CHR_LETTER) {
|
||||
else if (char_class & CHR_LETTER) {
|
||||
while (true) {
|
||||
while (classes[c = nextchar()] & CHR_IDENT)
|
||||
*p++ = (TEXT) c;
|
||||
@ -2045,7 +2047,7 @@ static TOK get_token()
|
||||
return_char(c);
|
||||
token.tok_type = tok_ident;
|
||||
}
|
||||
else if (class_ & CHR_DIGIT) {
|
||||
else if (char_class & CHR_DIGIT) {
|
||||
#ifdef GPRE_FORTRAN
|
||||
if (sw_language == lang_fortran && line_position < 7)
|
||||
label = true;
|
||||
@ -2074,8 +2076,8 @@ static TOK get_token()
|
||||
return_char(c);
|
||||
token.tok_type = tok_number;
|
||||
}
|
||||
else if ((class_ & CHR_QUOTE) || (class_ & CHR_DBLQUOTE)) {
|
||||
token.tok_type = (class_ & CHR_QUOTE) ? tok_sglquoted : tok_dblquoted;
|
||||
else if ((char_class & CHR_QUOTE) || (char_class & CHR_DBLQUOTE)) {
|
||||
token.tok_type = (char_class & CHR_QUOTE) ? tok_sglquoted : tok_dblquoted;
|
||||
for (;;) {
|
||||
next = nextchar();
|
||||
if (sw_language == lang_cobol && sw_ansi && next == '\n') {
|
||||
@ -2747,10 +2749,11 @@ static SSHORT skip_white()
|
||||
}
|
||||
#endif
|
||||
|
||||
SSHORT class_ = classes[c];
|
||||
const UCHAR char_class = classes[c];
|
||||
|
||||
if (class_ & CHR_WHITE)
|
||||
if (char_class & CHR_WHITE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip in-line SQL comments
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: int.cpp,v 1.26 2003-11-28 06:48:12 robocop Exp $
|
||||
// $Id: int.cpp,v 1.27 2004-01-03 10:59:38 robocop Exp $
|
||||
//
|
||||
|
||||
#include "firebird.h"
|
||||
@ -479,7 +479,7 @@ static void gen_receive( const gpre_req* request, const por* port)
|
||||
{
|
||||
|
||||
ib_fprintf(out_file,
|
||||
"EXE_receive (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
"EXE_receive (tdbb, (jrd_req*)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
request->req_handle, port->por_msg_number, port->por_length,
|
||||
port->por_ident);
|
||||
}
|
||||
@ -587,11 +587,11 @@ static void gen_send(const gpre_req* request, const por* port, int column,
|
||||
align(column);
|
||||
ib_fprintf(out_file, "if (ignore_perm)");
|
||||
align(column);
|
||||
ib_fprintf(out_file, "\t((JRD_REQ)request)->req_flags |= req_ignore_perm;");
|
||||
ib_fprintf(out_file, "\t((jrd_req*)request)->req_flags |= req_ignore_perm;");
|
||||
}
|
||||
align(column);
|
||||
|
||||
ib_fprintf(out_file, "EXE_send (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
ib_fprintf(out_file, "EXE_send (tdbb, (jrd_req*)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
request->req_handle,
|
||||
port->por_msg_number, port->por_length, port->por_ident);
|
||||
}
|
||||
@ -607,7 +607,7 @@ static void gen_start(const gpre_req* request, const por* port, int column,
|
||||
{
|
||||
align(column);
|
||||
|
||||
ib_fprintf(out_file, "EXE_start (tdbb, (JRD_REQ)%s, %s);",
|
||||
ib_fprintf(out_file, "EXE_start (tdbb, (jrd_req*)%s, %s);",
|
||||
request->req_handle, request->req_trans);
|
||||
|
||||
if (port)
|
||||
|
@ -25,7 +25,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: int_cxx.cpp,v 1.25 2003-11-28 06:48:12 robocop Exp $
|
||||
// $Id: int_cxx.cpp,v 1.26 2004-01-03 10:59:38 robocop Exp $
|
||||
//
|
||||
|
||||
#include "firebird.h"
|
||||
@ -482,7 +482,7 @@ static void gen_receive( const gpre_req* request, const por* port)
|
||||
{
|
||||
|
||||
ib_fprintf(out_file,
|
||||
"EXE_receive (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
"EXE_receive (tdbb, (jrd_req*)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
request->req_handle, port->por_msg_number, port->por_length,
|
||||
port->por_ident);
|
||||
}
|
||||
@ -588,11 +588,11 @@ static void gen_send( const gpre_req* request, const por* port, int column, bool
|
||||
align(column);
|
||||
ib_fprintf(out_file, "if (ignore_perm)");
|
||||
align(column);
|
||||
ib_fprintf(out_file, "\t((JRD_REQ)request)->req_flags |= req_ignore_perm;");
|
||||
ib_fprintf(out_file, "\t((jrd_req*)request)->req_flags |= req_ignore_perm;");
|
||||
}
|
||||
align(column);
|
||||
|
||||
ib_fprintf(out_file, "EXE_send (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
ib_fprintf(out_file, "EXE_send (tdbb, (jrd_req*)%s, %d, %d, (UCHAR*)&jrd_%d);",
|
||||
request->req_handle,
|
||||
port->por_msg_number, port->por_length, port->por_ident);
|
||||
}
|
||||
@ -607,7 +607,7 @@ static void gen_start( const gpre_req* request, const por* port, int column, boo
|
||||
{
|
||||
align(column);
|
||||
|
||||
ib_fprintf(out_file, "EXE_start (tdbb, (JRD_REQ)%s, %s);",
|
||||
ib_fprintf(out_file, "EXE_start (tdbb, (jrd_req*)%s, %s);",
|
||||
request->req_handle, request->req_trans);
|
||||
|
||||
if (port)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "../jrd/llio_proto.h"
|
||||
|
||||
static bool copy_file(SLONG, SLONG, SLONG);
|
||||
static void error_exit(ISC_STATUS *, JRN *, SLONG, SLONG, SLONG);
|
||||
static void error_exit(ISC_STATUS*, jrn**, SLONG, SLONG, SLONG);
|
||||
static bool open_file(const TEXT*, SLONG, USHORT, SLONG*);
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ static bool copy_file(SLONG s_fd,
|
||||
|
||||
|
||||
static void error_exit(ISC_STATUS* status_vector,
|
||||
JRN* ret_journal,
|
||||
jrn** ret_journal,
|
||||
SLONG db_id,
|
||||
SLONG file_id,
|
||||
SLONG error_code)
|
||||
|
@ -702,12 +702,12 @@ static void put_command(SLONG channel,
|
||||
**************************************/
|
||||
TEXT *p, buffer[MAXPATHLEN];
|
||||
USHORT l;
|
||||
JRNH *header_ptr;
|
||||
jrnh* header_ptr;
|
||||
|
||||
p = buffer;
|
||||
l = header_length + data_length;
|
||||
|
||||
header_ptr = (JRNH *) header;
|
||||
header_ptr = (jrnh*) header;
|
||||
header_ptr->jrnh_length = l;
|
||||
|
||||
if (header_length)
|
||||
@ -745,12 +745,12 @@ static void put_command(SLONG channel,
|
||||
**************************************/
|
||||
TEXT *p, buffer[MAXPATHLEN];
|
||||
ULONG l, len;
|
||||
JRNH *header_ptr;
|
||||
jrnh* header_ptr;
|
||||
|
||||
p = buffer;
|
||||
l = header_length + data_length;
|
||||
|
||||
header_ptr = (JRNH *) header;
|
||||
header_ptr = (jrnh*) header;
|
||||
header_ptr->jrnh_length = l;
|
||||
|
||||
if (header_length)
|
||||
|
@ -186,7 +186,7 @@ static SLONG process_new_file(DRB, jrnf*);
|
||||
static bool process_old_record(jrnd*, USHORT);
|
||||
static void process_page(DRB, jrnd*, ULONG, ULONG, bool);
|
||||
static bool process_partial(SLONG, SCHAR *);
|
||||
static bool process_record(JRNH *, USHORT, ULONG, ULONG, bool);
|
||||
static bool process_record(jrnh*, USHORT, ULONG, ULONG, bool);
|
||||
static void quad_move(register UCHAR *, register UCHAR *);
|
||||
static void read_page(DRB, CACHE);
|
||||
static void rebuild_abort(SLONG);
|
||||
@ -2271,7 +2271,7 @@ static int process_journal(const SCHAR* dbname,
|
||||
#endif
|
||||
// Will return FALSE when JRN_DISABLE is encountered
|
||||
|
||||
if (!process_record((JRNH*) wal_buff, len, seqno, offset, true)){
|
||||
if (!process_record((jrnh*) wal_buff, len, seqno, offset, true)){
|
||||
ret_val = 0;
|
||||
break;
|
||||
}
|
||||
@ -2439,12 +2439,12 @@ static bool process_old_record(jrnd* record,
|
||||
page = (PAG) record->jrnd_data;
|
||||
offset = page->pag_offset;
|
||||
seqno = page->pag_seqno;
|
||||
return process_record((JRNH*) record, length, seqno, offset, false);
|
||||
return process_record((jrnh*) record, length, seqno, offset, false);
|
||||
}
|
||||
offset = (ULONG) -1;
|
||||
seqno = (ULONG) -1;
|
||||
|
||||
return process_record((JRNH*) record, length, seqno, offset, false);
|
||||
return process_record((jrnh*) record, length, seqno, offset, false);
|
||||
}
|
||||
|
||||
|
||||
@ -2754,7 +2754,7 @@ static bool process_partial(SLONG db_id,
|
||||
}
|
||||
|
||||
|
||||
static bool process_record(JRNH * record,
|
||||
static bool process_record(jrnh* record,
|
||||
USHORT length,
|
||||
ULONG seqno,
|
||||
ULONG offset,
|
||||
|
@ -225,7 +225,7 @@ static void enable(CNCT, const ltjc*);
|
||||
static void error(ISC_STATUS, const TEXT*);
|
||||
static void error_exit(ISC_STATUS, const TEXT*);
|
||||
static void free_database_entry(djb*);
|
||||
static void get_message(JRNH *, int);
|
||||
static void get_message(jrnh*, int);
|
||||
|
||||
#ifdef BSD_SOCKETS
|
||||
static void init_handles(fd_set *);
|
||||
@ -249,7 +249,7 @@ static void process_drop_database(CNCT, const SCHAR*);
|
||||
static void process_dump_file(CNCT, ltjw *);
|
||||
static void process_end_dump(CNCT, ltjw *);
|
||||
static void process_erase_database(CNCT, USHORT);
|
||||
static void process_message(CNCT, JRNH *, USHORT);
|
||||
static void process_message(CNCT, jrnh*, USHORT);
|
||||
static void process_reset_database(CNCT, const SCHAR*);
|
||||
static void process_restart_archive(CNCT, const SCHAR*);
|
||||
static void process_set_database(CNCT, const SCHAR*);
|
||||
@ -263,7 +263,7 @@ static void read_asynchronous(CNCT);
|
||||
static void report_status(CNCT);
|
||||
static void restart_all_backups(int);
|
||||
static void restart_backup(djb*, int);
|
||||
static void send_reply(CNCT, JRNH *, USHORT);
|
||||
static void send_reply(CNCT, jrnh*, USHORT);
|
||||
static void set_use_count(djb*);
|
||||
static void sign_off(CNCT, ltjc *);
|
||||
static void sign_on(CNCT, const ltjc*);
|
||||
@ -1107,7 +1107,7 @@ static void enable(CNCT connection,
|
||||
build_indexed_name(arch_name, dir_name, msg->ltjc_seqno);
|
||||
if (LLIO_open(NULL, arch_name, LLIO_OPEN_NEW_RW, false, &fd)) {
|
||||
reply.jrnr_response = jrnr_archive_error;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
delete_connection(connection);
|
||||
return;
|
||||
}
|
||||
@ -1131,7 +1131,7 @@ static void enable(CNCT connection,
|
||||
start_database(connection, db_name, dir_name,
|
||||
msg->ltjc_page_size, msg->ltjc_seqno, msg->ltjc_offset);
|
||||
reply.jrnr_response = jrnr_enabled;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -1233,7 +1233,7 @@ static void free_database_entry(djb* database)
|
||||
|
||||
|
||||
#ifdef BSD_SOCKETS
|
||||
static void get_message(JRNH * buffer,
|
||||
static void get_message(jrnh* buffer,
|
||||
int length)
|
||||
{
|
||||
/**************************************
|
||||
@ -1305,7 +1305,7 @@ static void get_message(JRNH * buffer,
|
||||
}
|
||||
}
|
||||
|
||||
len = recv(nfd, (SCHAR *) buffer, sizeof(JRNH), 0);
|
||||
len = recv(nfd, (SCHAR *) buffer, sizeof(struct jrnh), 0);
|
||||
p = (UCHAR *) buffer + len;
|
||||
length = buffer->jrnh_length - len;
|
||||
while (len > 0 && length) {
|
||||
@ -1329,7 +1329,7 @@ static void get_message(JRNH * buffer,
|
||||
|
||||
|
||||
#ifdef WIN_NT
|
||||
static void get_message(JRNH * buffer,
|
||||
static void get_message(jrnh* buffer,
|
||||
int length)
|
||||
{
|
||||
/**************************************
|
||||
@ -1654,7 +1654,7 @@ static void open_mailbox(SCHAR * filename,
|
||||
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
|
||||
PIPE_WAIT | PIPE_TYPE_BYTE | PIPE_READMODE_BYTE,
|
||||
PIPE_UNLIMITED_INSTANCES,
|
||||
sizeof(JRNH) + MSG_LENGTH,
|
||||
sizeof(struct jrnh) + MSG_LENGTH,
|
||||
MAX_RECORD + 6, 0, ISC_get_security_desc());
|
||||
if (phandle == INVALID_HANDLE_VALUE)
|
||||
error_exit(GetLastError(), "CreateNamedPipe");
|
||||
@ -1763,7 +1763,7 @@ static void process_command(CNCT connection,
|
||||
put_message(98, NULL);
|
||||
global_state |= state_shut_pending;
|
||||
response.jrnr_response = jrnr_shutdown;
|
||||
send_reply(connection, (JRNH *) & response, sizeof(response));
|
||||
send_reply(connection, (jrnh*) & response, sizeof(response));
|
||||
#ifdef WIN_NT
|
||||
Sleep(5000);
|
||||
#endif
|
||||
@ -1772,7 +1772,7 @@ static void process_command(CNCT connection,
|
||||
|
||||
case cmd_exit:
|
||||
response.jrnr_response = jrnr_exit;
|
||||
send_reply(connection, (JRNH *) & response, sizeof(response));
|
||||
send_reply(connection, (jrnh*) & response, sizeof(response));
|
||||
return;
|
||||
|
||||
case cmd_status:
|
||||
@ -1828,7 +1828,7 @@ static void process_command(CNCT connection,
|
||||
}
|
||||
|
||||
response.jrnr_response = jrnr_end_msg;
|
||||
send_reply(connection, (JRNH *) & response, sizeof(response));
|
||||
send_reply(connection, (jrnh*) & response, sizeof(response));
|
||||
}
|
||||
|
||||
|
||||
@ -1860,7 +1860,7 @@ static void process_archive_begin(CNCT connection,
|
||||
if (!database->djb_use_count++)
|
||||
set_use_count(database);
|
||||
reply.jrnr_response = jrnr_accepted;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1869,7 +1869,7 @@ static void process_archive_begin(CNCT connection,
|
||||
|
||||
FOR D IN DATABASES WITH D.DB_ID EQ db_id AND D.STATUS EQ DB_DISABLED
|
||||
reply.jrnr_response = jrnr_accepted;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
connection->cnct_database = NULL;
|
||||
return;
|
||||
END_FOR;
|
||||
@ -1877,7 +1877,7 @@ static void process_archive_begin(CNCT connection,
|
||||
// Error situation
|
||||
|
||||
reply.jrnr_response = jrnr_rejected;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -2041,7 +2041,7 @@ static void process_control_point(CNCT connection,
|
||||
|
||||
jrnr reply;
|
||||
reply.jrnr_response = jrnr_ack;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
|
||||
//
|
||||
// Restart backup.
|
||||
@ -2185,7 +2185,7 @@ static void process_dump_file(CNCT connection,
|
||||
|
||||
jrnr reply;
|
||||
reply.jrnr_response = jrnr_ack;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -2227,7 +2227,7 @@ static void process_end_dump(CNCT connection,
|
||||
|
||||
jrnr reply;
|
||||
reply.jrnr_response = jrnr_end_dump;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -2344,7 +2344,7 @@ static void process_erase_database(CNCT connection,
|
||||
|
||||
|
||||
static void process_message(CNCT connection,
|
||||
JRNH * msg,
|
||||
jrnh* msg,
|
||||
USHORT length)
|
||||
{
|
||||
/**************************************
|
||||
@ -2382,7 +2382,7 @@ static void process_message(CNCT connection,
|
||||
{
|
||||
TEXT* p = (TEXT*) msg;
|
||||
p[length] = 0;
|
||||
process_command(connection, p + sizeof(JRNH));
|
||||
process_command(connection, p + sizeof(struct jrnh));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2603,7 +2603,7 @@ static void process_start_dump(CNCT connection,
|
||||
|
||||
reply.jrnr_response = jrnr_start_dump;
|
||||
reply.jrnr_page = (SLONG) dump_id;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -2692,7 +2692,7 @@ static void process_wal_file(CNCT connection,
|
||||
commit();
|
||||
|
||||
reply.jrnr_response = jrnr_ack;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
|
||||
// restart failed backups
|
||||
|
||||
@ -2776,7 +2776,7 @@ static void put_line(CNCT connection,
|
||||
TEXT* p = buffer + sizeof(jrnr);
|
||||
sprintf(p, line, arg1, arg2, arg3);
|
||||
response->jrnr_page = strlen(p);
|
||||
send_reply(connection, (JRNH *) buffer,
|
||||
send_reply(connection, (jrnh*) buffer,
|
||||
(USHORT) (sizeof(jrnr) + response->jrnr_page));
|
||||
}
|
||||
|
||||
@ -2985,7 +2985,7 @@ static void restart_backup(djb* database,
|
||||
|
||||
#ifdef BSD_SOCKETS
|
||||
static void send_reply(CNCT connection,
|
||||
JRNH * msg,
|
||||
jrnh* msg,
|
||||
USHORT length)
|
||||
{
|
||||
/**************************************
|
||||
@ -3015,7 +3015,7 @@ static void send_reply(CNCT connection,
|
||||
|
||||
#ifdef WIN_NT
|
||||
static void send_reply(CNCT connection,
|
||||
JRNH * msg,
|
||||
jrnh* msg,
|
||||
USHORT length)
|
||||
{
|
||||
/**************************************
|
||||
@ -3123,7 +3123,7 @@ static void sign_on(CNCT connection,
|
||||
if (!database->djb_use_count++)
|
||||
set_use_count(database);
|
||||
reply.jrnr_response = jrnr_accepted;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3132,7 +3132,7 @@ static void sign_on(CNCT connection,
|
||||
start_database(connection, db_name, dir_name,
|
||||
msg->ltjc_page_size, msg->ltjc_seqno, msg->ltjc_offset);
|
||||
reply.jrnr_response = jrnr_enabled;
|
||||
send_reply(connection, (JRNH *) & reply, sizeof(reply));
|
||||
send_reply(connection, (jrnh*) & reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
@ -3439,7 +3439,7 @@ static bool start_server(UCHAR * journal_dir,
|
||||
report_status(NULL);
|
||||
}
|
||||
commit();
|
||||
get_message((JRNH *) message_buffer, sizeof(message_buffer));
|
||||
get_message((jrnh*) message_buffer, sizeof(message_buffer));
|
||||
|
||||
// restart archives every max_retry messages
|
||||
|
||||
@ -3494,7 +3494,7 @@ static bool start_server(UCHAR * journal_dir,
|
||||
report_status(NULL);
|
||||
}
|
||||
commit();
|
||||
get_message((JRNH *) message_buffer, sizeof(message_buffer));
|
||||
get_message((jrnh*) message_buffer, sizeof(message_buffer));
|
||||
commit();
|
||||
}
|
||||
|
||||
|
@ -877,7 +877,7 @@ void AIL_process_jrn_error(SLONG ret_val)
|
||||
void AIL_put(
|
||||
DBB dbb,
|
||||
ISC_STATUS * status,
|
||||
JRNH* header,
|
||||
jrnh* header,
|
||||
USHORT h_length,
|
||||
const UCHAR* data,
|
||||
USHORT d_length,
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: blb.cpp,v 1.45 2003-12-22 10:00:45 robocop Exp $
|
||||
$Id: blb.cpp,v 1.46 2004-01-03 10:59:40 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -72,17 +72,19 @@ $Id: blb.cpp,v 1.45 2003-12-22 10:00:45 robocop Exp $
|
||||
#include "../jrd/dsc_proto.h"
|
||||
|
||||
|
||||
#define STREAM (blob->blb_flags & BLB_stream)
|
||||
#define SEGMENTED !STREAM
|
||||
inline bool SEGMENTED(const blb* blob)
|
||||
{
|
||||
return !(blob->blb_flags & BLB_stream);
|
||||
}
|
||||
|
||||
static ARR alloc_array(JRD_TRA, ADS);
|
||||
static BLB allocate_blob(TDBB, JRD_TRA);
|
||||
static ARR alloc_array(jrd_tra*, ADS);
|
||||
static BLB allocate_blob(TDBB, jrd_tra*);
|
||||
static ISC_STATUS blob_filter(USHORT, CTL, SSHORT, SLONG);
|
||||
static void check_BID_validity(const blb*, TDBB);
|
||||
static BLB copy_blob(TDBB, const bid*, bid*);
|
||||
static void delete_blob(TDBB, BLB, ULONG);
|
||||
static void delete_blob_id(TDBB, const bid*, ULONG, JRD_REL);
|
||||
static ARR find_array(JRD_TRA, const bid*);
|
||||
static void delete_blob_id(TDBB, const bid*, ULONG, jrd_rel*);
|
||||
static ARR find_array(jrd_tra*, const bid*);
|
||||
static BLF find_filter(TDBB, SSHORT, SSHORT);
|
||||
static BLP get_next_page(TDBB, BLB, WIN *);
|
||||
#ifdef REPLAY_OSRI_API_CALLS_SUBSYSTEM
|
||||
@ -91,7 +93,7 @@ static void get_replay_blob(TDBB, const bid*);
|
||||
static void insert_page(TDBB, BLB);
|
||||
static void release_blob(BLB, const bool);
|
||||
static void slice_callback(SLICE, ULONG, DSC *);
|
||||
static BLB store_array(TDBB, JRD_TRA, bid*);
|
||||
static BLB store_array(TDBB, jrd_tra*, bid*);
|
||||
|
||||
|
||||
void BLB_cancel(TDBB tdbb, BLB blob)
|
||||
@ -157,7 +159,7 @@ void BLB_close(TDBB tdbb, class blb* blob)
|
||||
}
|
||||
|
||||
|
||||
BLB BLB_create(TDBB tdbb, JRD_TRA transaction, bid* blob_id)
|
||||
BLB BLB_create(TDBB tdbb, jrd_tra* transaction, bid* blob_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -176,7 +178,7 @@ BLB BLB_create(TDBB tdbb, JRD_TRA transaction, bid* blob_id)
|
||||
|
||||
|
||||
BLB BLB_create2(TDBB tdbb,
|
||||
JRD_TRA transaction, bid* blob_id,
|
||||
jrd_tra* transaction, bid* blob_id,
|
||||
USHORT bpb_length, const UCHAR* bpb)
|
||||
{
|
||||
/**************************************
|
||||
@ -274,7 +276,7 @@ BLB BLB_create2(TDBB tdbb,
|
||||
void BLB_garbage_collect(
|
||||
TDBB tdbb,
|
||||
LLS going,
|
||||
LLS staying, SLONG prior_page, JRD_REL relation)
|
||||
LLS staying, SLONG prior_page, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -356,7 +358,7 @@ void BLB_garbage_collect(
|
||||
}
|
||||
|
||||
|
||||
BLB BLB_get_array(TDBB tdbb, JRD_TRA transaction, const bid* blob_id, ADS desc)
|
||||
BLB BLB_get_array(TDBB tdbb, jrd_tra* transaction, const bid* blob_id, ADS desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -523,7 +525,7 @@ USHORT BLB_get_segment(TDBB tdbb,
|
||||
/* If the blob is segmented, and this isn't a fragment, pick up
|
||||
the length of the next segment. */
|
||||
|
||||
if (SEGMENTED && !blob->blb_fragment_size) {
|
||||
if (SEGMENTED(blob) && !blob->blb_fragment_size) {
|
||||
while (length < 2) {
|
||||
if (active_page) {
|
||||
if (window.win_flags & WIN_large_scan)
|
||||
@ -552,7 +554,7 @@ USHORT BLB_get_segment(TDBB tdbb,
|
||||
|
||||
l = MIN(buffer_length, length);
|
||||
|
||||
if (SEGMENTED) {
|
||||
if (SEGMENTED(blob)) {
|
||||
l = MIN(l, blob->blb_fragment_size);
|
||||
blob->blb_fragment_size -= l;
|
||||
}
|
||||
@ -593,7 +595,7 @@ USHORT BLB_get_segment(TDBB tdbb,
|
||||
/* If either the buffer or the fragment is exhausted, we're
|
||||
done. */
|
||||
|
||||
if (!buffer_length || (SEGMENTED && !blob->blb_fragment_size))
|
||||
if (!buffer_length || (SEGMENTED(blob) && !blob->blb_fragment_size))
|
||||
break;
|
||||
}
|
||||
|
||||
@ -619,16 +621,17 @@ USHORT BLB_get_segment(TDBB tdbb,
|
||||
|
||||
/* If this is a stream blob, fake fragment unless we're at the end */
|
||||
|
||||
if (STREAM)
|
||||
if (!SEGMENTED(blob)) { // stream blob
|
||||
blob->blb_fragment_size =
|
||||
(blob->blb_seek == blob->blb_length) ? 0 : 1;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
SLONG BLB_get_slice(TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
const bid* blob_id,
|
||||
const UCHAR* sdl,
|
||||
USHORT param_length,
|
||||
@ -872,7 +875,7 @@ void BLB_move(TDBB tdbb, dsc* from_desc, dsc* to_desc, JRD_NOD field)
|
||||
}
|
||||
|
||||
CLEAR_NULL(record, id);
|
||||
JRD_TRA transaction = request->req_transaction;
|
||||
jrd_tra* transaction = request->req_transaction;
|
||||
|
||||
/* If the target is a view, this must be from a view update trigger.
|
||||
Just pass the blob id thru */
|
||||
@ -997,7 +1000,7 @@ void BLB_move_from_string(TDBB tdbb, const dsc* from_desc, dsc* to_desc, JRD_NOD
|
||||
}
|
||||
|
||||
|
||||
BLB BLB_open(TDBB tdbb, JRD_TRA transaction, const bid* blob_id)
|
||||
BLB BLB_open(TDBB tdbb, jrd_tra* transaction, const bid* blob_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1016,7 +1019,7 @@ BLB BLB_open(TDBB tdbb, JRD_TRA transaction, const bid* blob_id)
|
||||
|
||||
|
||||
BLB BLB_open2(TDBB tdbb,
|
||||
JRD_TRA transaction, const bid* blob_id,
|
||||
jrd_tra* transaction, const bid* blob_id,
|
||||
USHORT bpb_length, const UCHAR* bpb)
|
||||
{
|
||||
/**************************************
|
||||
@ -1217,7 +1220,7 @@ void BLB_put_segment(TDBB tdbb, BLB blob, const UCHAR* seg, USHORT segment_lengt
|
||||
|
||||
ULONG length; // length of segment + overhead
|
||||
bool length_flag;
|
||||
if (SEGMENTED) {
|
||||
if (SEGMENTED(blob)) {
|
||||
length = segment_length + 2;
|
||||
length_flag = true;
|
||||
}
|
||||
@ -1230,9 +1233,7 @@ void BLB_put_segment(TDBB tdbb, BLB blob, const UCHAR* seg, USHORT segment_lengt
|
||||
just does a form transformation and drops into the next case. */
|
||||
|
||||
if (blob->blb_level == 0 && length > (ULONG) blob->blb_space_remaining) {
|
||||
JRD_TRA transaction;
|
||||
|
||||
transaction = blob->blb_transaction;
|
||||
jrd_tra* transaction = blob->blb_transaction;
|
||||
blob->blb_pages = vcl::newVector(*transaction->tra_pool, 0);
|
||||
const USHORT l = dbb->dbb_page_size - BLP_SIZE;
|
||||
blob->blb_space_remaining += l - blob->blb_clump_size;
|
||||
@ -1323,7 +1324,7 @@ void BLB_put_segment(TDBB tdbb, BLB blob, const UCHAR* seg, USHORT segment_lengt
|
||||
|
||||
|
||||
void BLB_put_slice( TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
bid* blob_id,
|
||||
const UCHAR* sdl,
|
||||
USHORT param_length,
|
||||
@ -1511,7 +1512,7 @@ void BLB_release_array(ARR array)
|
||||
|
||||
|
||||
void BLB_scalar(TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
const bid* blob_id,
|
||||
USHORT count,
|
||||
SLONG* subscripts,
|
||||
@ -1580,7 +1581,7 @@ void BLB_scalar(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static ARR alloc_array(JRD_TRA transaction, ADS proto_desc)
|
||||
static ARR alloc_array(jrd_tra* transaction, ADS proto_desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1623,7 +1624,7 @@ static ARR alloc_array(JRD_TRA transaction, ADS proto_desc)
|
||||
}
|
||||
|
||||
|
||||
static BLB allocate_blob(TDBB tdbb, JRD_TRA transaction)
|
||||
static BLB allocate_blob(TDBB tdbb, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1682,7 +1683,7 @@ static ISC_STATUS blob_filter( USHORT action,
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
|
||||
JRD_TRA transaction = (JRD_TRA) control->ctl_internal[1];
|
||||
jrd_tra* transaction = (jrd_tra*) control->ctl_internal[1];
|
||||
bid* blob_id = reinterpret_cast<bid*>(control->ctl_internal[2]);
|
||||
|
||||
#ifdef DEV_BUILD
|
||||
@ -1916,7 +1917,7 @@ static void delete_blob(TDBB tdbb, BLB blob, ULONG prior_page)
|
||||
|
||||
static void delete_blob_id(
|
||||
TDBB tdbb,
|
||||
const bid* blob_id, ULONG prior_page, JRD_REL relation)
|
||||
const bid* blob_id, ULONG prior_page, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1955,7 +1956,7 @@ static void delete_blob_id(
|
||||
}
|
||||
|
||||
|
||||
static ARR find_array(JRD_TRA transaction, const bid* blob_id)
|
||||
static ARR find_array(jrd_tra* transaction, const bid* blob_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2394,7 +2395,7 @@ static void slice_callback(SLICE arg, ULONG count, DSC * descriptors)
|
||||
}
|
||||
|
||||
|
||||
static BLB store_array(TDBB tdbb, JRD_TRA transaction, bid* blob_id)
|
||||
static BLB store_array(TDBB tdbb, jrd_tra* transaction, bid* blob_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -28,12 +28,12 @@
|
||||
extern "C" {
|
||||
|
||||
ISC_STATUS BLF_close_blob(TDBB, ctl**);
|
||||
ISC_STATUS BLF_create_blob(TDBB, JRD_TRA, ctl**, SLONG*,
|
||||
ISC_STATUS BLF_create_blob(TDBB, jrd_tra*, ctl**, SLONG*,
|
||||
USHORT, const UCHAR*,
|
||||
FPTR_BFILTER_CALLBACK, BLF);
|
||||
ISC_STATUS BLF_get_segment(TDBB, ctl**, USHORT*, USHORT, UCHAR*);
|
||||
BLF BLF_lookup_internal_filter(TDBB, SSHORT, SSHORT);
|
||||
ISC_STATUS BLF_open_blob(TDBB, JRD_TRA, ctl**, const SLONG*,
|
||||
ISC_STATUS BLF_open_blob(TDBB, jrd_tra*, ctl**, const SLONG*,
|
||||
USHORT, const UCHAR*,
|
||||
FPTR_BFILTER_CALLBACK, BLF);
|
||||
ISC_STATUS BLF_put_segment(TDBB, ctl**, USHORT, const UCHAR*);
|
||||
|
@ -40,7 +40,7 @@ BLKDEF(type_pgc, pgc, 0)
|
||||
BLKDEF(type_rel, jrd_rel, 0)
|
||||
BLKDEF(type_fmt, fmt, sizeof(((FMT) NULL)->fmt_desc[0])) /* Done */
|
||||
BLKDEF(type_vcl, vcl, sizeof(((VCL) NULL)->vcl_long[0])) /* Done */
|
||||
BLKDEF(type_req, jrd_req, sizeof(((JRD_REQ) NULL)->req_rpb[0])) /* Done */
|
||||
BLKDEF(type_req, jrd_req, sizeof(((jrd_req*) NULL)->req_rpb[0])) /* Done */
|
||||
BLKDEF(type_tra, jrd_tra, 1)
|
||||
BLKDEF(type_nod, jrd_nod, sizeof(((JRD_NOD) NULL)->nod_arg[0])) /* Done */
|
||||
BLKDEF(type_csb, Csb, sizeof(((CSB) NULL)->csb_rpt[0])) /* Done */
|
||||
|
@ -72,7 +72,7 @@ static const FPTR_BFILTER_CALLBACK filters[] = {
|
||||
};
|
||||
|
||||
|
||||
static ISC_STATUS open_blob(TDBB, JRD_TRA, CTL*, SLONG*, USHORT, const UCHAR*,
|
||||
static ISC_STATUS open_blob(TDBB, jrd_tra*, CTL*, SLONG*, USHORT, const UCHAR*,
|
||||
FPTR_BFILTER_CALLBACK,
|
||||
USHORT, BLF);
|
||||
|
||||
@ -128,7 +128,7 @@ ISC_STATUS BLF_close_blob(TDBB tdbb, CTL * filter_handle)
|
||||
|
||||
|
||||
ISC_STATUS BLF_create_blob(TDBB tdbb,
|
||||
JRD_TRA tra_handle,
|
||||
jrd_tra* tra_handle,
|
||||
CTL* filter_handle,
|
||||
SLONG* blob_id,
|
||||
USHORT bpb_length,
|
||||
@ -239,7 +239,7 @@ BLF BLF_lookup_internal_filter(TDBB tdbb, SSHORT from, SSHORT to)
|
||||
|
||||
|
||||
ISC_STATUS BLF_open_blob(TDBB tdbb,
|
||||
JRD_TRA tra_handle,
|
||||
jrd_tra* tra_handle,
|
||||
CTL* filter_handle,
|
||||
const SLONG* blob_id,
|
||||
USHORT bpb_length,
|
||||
@ -316,7 +316,7 @@ ISC_STATUS BLF_put_segment(TDBB tdbb,
|
||||
|
||||
static ISC_STATUS open_blob(
|
||||
TDBB tdbb,
|
||||
JRD_TRA tra_handle,
|
||||
jrd_tra* tra_handle,
|
||||
CTL* filter_handle,
|
||||
SLONG* blob_id,
|
||||
USHORT bpb_length,
|
||||
|
@ -168,8 +168,8 @@ static void copy_key(const KEY*, KEY*);
|
||||
static CONTENTS delete_node(TDBB, WIN *, UCHAR *);
|
||||
static void delete_tree(TDBB, USHORT, USHORT, SLONG, SLONG);
|
||||
static DSC *eval(TDBB, JRD_NOD, DSC *, bool *);
|
||||
static SLONG fast_load(TDBB, JRD_REL, IDX *, USHORT, SCB, SelectivityList&);
|
||||
static IRT fetch_root(TDBB, WIN *, JRD_REL);
|
||||
static SLONG fast_load(TDBB, jrd_rel*, IDX *, USHORT, SCB, SelectivityList&);
|
||||
static IRT fetch_root(TDBB, WIN *, jrd_rel*);
|
||||
static UCHAR *find_node_start_point(BTR, KEY *, UCHAR *, USHORT *, bool, bool, bool = false, SLONG = NO_VALUE);
|
||||
static UCHAR* find_area_start_point(BTR, const KEY*, UCHAR *, USHORT *, bool, bool, SLONG = NO_VALUE);
|
||||
static SLONG find_page(BTR, const KEY*, UCHAR, SLONG = NO_VALUE, bool = false);
|
||||
@ -187,7 +187,7 @@ static bool scan(TDBB, UCHAR *, SBM *, USHORT, USHORT, KEY *, USHORT, SCHAR);
|
||||
static void update_selectivity(IRT, USHORT, const SelectivityList&);
|
||||
|
||||
USHORT BTR_all(TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
IDX** start_buffer,
|
||||
IDX** csb_idx,
|
||||
STR* csb_idx_allocation,
|
||||
@ -246,7 +246,7 @@ USHORT BTR_all(TDBB tdbb,
|
||||
|
||||
|
||||
void BTR_create(TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
IDX * idx,
|
||||
USHORT key_length,
|
||||
SCB sort_handle,
|
||||
@ -336,7 +336,7 @@ void BTR_delete_index(TDBB tdbb, WIN * window, USHORT id)
|
||||
}
|
||||
|
||||
|
||||
bool BTR_description(JRD_REL relation, IRT root, IDX * idx, SSHORT id)
|
||||
bool BTR_description(jrd_rel* relation, IRT root, IDX * idx, SSHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -763,7 +763,7 @@ void BTR_insert(TDBB tdbb, WIN * root_window, IIB * insertion)
|
||||
}
|
||||
|
||||
|
||||
IDX_E BTR_key(TDBB tdbb, JRD_REL relation, REC record, IDX * idx, KEY * key, idx_null_state * null_state)
|
||||
IDX_E BTR_key(TDBB tdbb, jrd_rel* relation, REC record, IDX * idx, KEY * key, idx_null_state * null_state)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -802,8 +802,7 @@ IDX_E BTR_key(TDBB tdbb, JRD_REL relation, REC record, IDX * idx, KEY * key, idx
|
||||
#ifdef EXPRESSION_INDICES
|
||||
// for expression indices, compute the value of the expression
|
||||
if (idx->idx_expression) {
|
||||
JRD_REQ current_request;
|
||||
current_request = tdbb->tdbb_request;
|
||||
jrd_req* current_request = tdbb->tdbb_request;
|
||||
tdbb->tdbb_request = idx->idx_expression_request;
|
||||
tdbb->tdbb_request->req_rpb[0].rpb_record = record;
|
||||
|
||||
@ -889,7 +888,7 @@ IDX_E BTR_key(TDBB tdbb, JRD_REL relation, REC record, IDX * idx, KEY * key, idx
|
||||
}
|
||||
|
||||
|
||||
USHORT BTR_key_length(JRD_REL relation, IDX * idx)
|
||||
USHORT BTR_key_length(jrd_rel* relation, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1103,7 +1102,7 @@ BTR BTR_left_handoff(TDBB tdbb, WIN * window, BTR page, SSHORT lock_level)
|
||||
#endif
|
||||
|
||||
|
||||
USHORT BTR_lookup(TDBB tdbb, JRD_REL relation, USHORT id, IDX * buffer)
|
||||
USHORT BTR_lookup(TDBB tdbb, jrd_rel* relation, USHORT id, IDX * buffer)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1208,7 +1207,7 @@ void BTR_make_key(TDBB tdbb,
|
||||
|
||||
|
||||
bool BTR_next_index(TDBB tdbb,
|
||||
JRD_REL relation, JRD_TRA transaction, IDX * idx, WIN * window)
|
||||
jrd_rel* relation, jrd_tra* transaction, IDX * idx, WIN * window)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1427,7 +1426,7 @@ void BTR_remove(TDBB tdbb, WIN * root_window, IIB * insertion)
|
||||
}
|
||||
|
||||
|
||||
void BTR_reserve_slot(TDBB tdbb, JRD_REL relation, JRD_TRA transaction, IDX * idx)
|
||||
void BTR_reserve_slot(TDBB tdbb, jrd_rel* relation, jrd_tra* transaction, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1530,9 +1529,11 @@ retry:
|
||||
memcpy(desc, &temp, sizeof(temp));
|
||||
desc += sizeof(temp);
|
||||
}
|
||||
} else
|
||||
}
|
||||
else {
|
||||
// Exploit the fact idx_repeat structure matches ODS IRTD one
|
||||
memcpy(desc, idx->idx_rpt, l);
|
||||
}
|
||||
|
||||
if (dbb->dbb_wal) {
|
||||
CCH_journal_page(tdbb, &window);
|
||||
@ -1542,7 +1543,7 @@ retry:
|
||||
}
|
||||
|
||||
|
||||
void BTR_selectivity(TDBB tdbb, JRD_REL relation, USHORT id, SelectivityList& selectivity)
|
||||
void BTR_selectivity(TDBB tdbb, jrd_rel* relation, USHORT id, SelectivityList& selectivity)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2582,7 +2583,7 @@ static DSC *eval(TDBB tdbb, JRD_NOD node, DSC * temp, bool *isNull)
|
||||
|
||||
|
||||
static SLONG fast_load(TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
IDX * idx,
|
||||
USHORT key_length,
|
||||
SCB sort_handle,
|
||||
@ -3320,7 +3321,7 @@ static SLONG fast_load(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static IRT fetch_root(TDBB tdbb, WIN * window, JRD_REL relation)
|
||||
static IRT fetch_root(TDBB tdbb, WIN * window, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -32,7 +32,7 @@ USHORT BTR_all(TDBB, jrd_rel*, idx**, idx**, str**, SLONG*);
|
||||
void BTR_create(TDBB, jrd_rel*, idx*, USHORT, scb*, SelectivityList&);
|
||||
void BTR_delete_index(TDBB, win*, USHORT);
|
||||
//USHORT BTR_delete_node(TDBB, btr*, USHORT);
|
||||
bool BTR_description(JRD_REL, irt*, idx*, SSHORT);
|
||||
bool BTR_description(jrd_rel*, irt*, idx*, SSHORT);
|
||||
void BTR_evaluate(tdbb*, irb*, sbm**);
|
||||
UCHAR* BTR_find_leaf(btr*, key*, UCHAR*, USHORT*, int, bool);
|
||||
btr* BTR_find_page(tdbb*, irb*, win*, idx*, key*, key*, bool);
|
||||
|
1664
src/jrd/cch.cpp
1664
src/jrd/cch.cpp
File diff suppressed because it is too large
Load Diff
@ -196,7 +196,7 @@ class lwt : public pool_alloc<type_lwt>
|
||||
struct tdbb* lwt_tdbb;
|
||||
LATCH lwt_latch; /* latch type requested */
|
||||
struct que lwt_waiters; /* latch queue */
|
||||
struct event lwt_event; /* grant event to wait on */
|
||||
struct event_t lwt_event; /* grant event to wait on */
|
||||
USHORT lwt_flags;
|
||||
};
|
||||
typedef lwt *LWT;
|
||||
|
1449
src/jrd/cmp.cpp
1449
src/jrd/cmp.cpp
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@ jrd_req* CMP_compile(USHORT, const UCHAR*, USHORT);
|
||||
jrd_req* CMP_compile2(TDBB, const UCHAR*, USHORT);
|
||||
csb_repeat* CMP_csb_element(Csb*, USHORT);
|
||||
void CMP_expunge_transaction(jrd_tra*);
|
||||
void CMP_decrement_prc_use_count(TDBB, JRD_PRC);
|
||||
void CMP_decrement_prc_use_count(TDBB, jrd_prc*);
|
||||
jrd_req* CMP_find_request(TDBB, USHORT, USHORT);
|
||||
void CMP_fini(TDBB);
|
||||
fmt* CMP_format(TDBB, Csb*, USHORT);
|
||||
@ -41,7 +41,7 @@ void CMP_get_desc(TDBB, Csb*, jrd_nod*, dsc*);
|
||||
idl* CMP_get_index_lock(TDBB, jrd_rel*, USHORT);
|
||||
SLONG CMP_impure(Csb*, USHORT);
|
||||
jrd_req* CMP_make_request(TDBB, Csb*);
|
||||
void CMP_post_access(TDBB, Csb*, /* INOUT */ TEXT*, SLONG,
|
||||
void CMP_post_access(TDBB, Csb*, const TEXT*, SLONG,
|
||||
const TEXT*, const TEXT*, USHORT, const TEXT*,
|
||||
const TEXT*);
|
||||
void CMP_post_resource(TDBB, Rsc**, blk*, enum rsc_s, USHORT);
|
||||
@ -50,3 +50,4 @@ void CMP_release(TDBB, jrd_req*);
|
||||
void CMP_shutdown_database(TDBB);
|
||||
|
||||
#endif // JRD_CMP_PROTO_H
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: common.h,v 1.94 2003-12-31 05:35:52 robocop Exp $
|
||||
$Id: common.h,v 1.95 2004-01-03 10:59:40 robocop Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_COMMON_H
|
||||
@ -1057,9 +1057,9 @@ static const TEXT* FB_LONG_MONTHS_UPPER[] =
|
||||
inline int fb_stricmp(const char* a, const char* b)
|
||||
{
|
||||
#if defined(HAVE_STRCASECMP)
|
||||
return strcasecmp(a, b);
|
||||
return strcasecmp(a, b);
|
||||
#elif defined(HAVE_STRICMP)
|
||||
return stricmp(a, b);
|
||||
return stricmp(a, b);
|
||||
#else
|
||||
#error dont know how to compare strings case insensitive on this system
|
||||
#endif
|
||||
|
@ -716,8 +716,8 @@ int DBG_pretty(JRD_NOD node, int column)
|
||||
*
|
||||
**************************************/
|
||||
RSE rse;
|
||||
JRD_REL relation;
|
||||
JRD_PRC procedure;
|
||||
jrd_rel* relation;
|
||||
jrd_prc* procedure;
|
||||
JRD_NOD *ptr, *end;
|
||||
IRB retrieval;
|
||||
int i;
|
||||
@ -796,7 +796,7 @@ int DBG_pretty(JRD_NOD node, int column)
|
||||
return TRUE;
|
||||
|
||||
case nod_relation:
|
||||
relation = (JRD_REL) node->nod_arg[e_rel_relation];
|
||||
relation = (jrd_rel*) node->nod_arg[e_rel_relation];
|
||||
ib_fprintf(dbg_file, ", stream: %d, %s (%X)\n",
|
||||
node->nod_arg[e_rel_stream], relation->rel_name, relation);
|
||||
return TRUE;
|
||||
@ -810,7 +810,7 @@ int DBG_pretty(JRD_NOD node, int column)
|
||||
return TRUE;
|
||||
|
||||
case nod_exec_proc:
|
||||
procedure = (JRD_PRC) node->nod_arg[e_esp_procedure];
|
||||
procedure = (jrd_prc*) node->nod_arg[e_esp_procedure];
|
||||
ib_fprintf(dbg_file, ", name: %s (%X)\n",
|
||||
procedure->prc_name->str_data, procedure);
|
||||
for (ptr = node->nod_arg, end = ptr + node->nod_count; ptr < end;
|
||||
@ -1199,7 +1199,7 @@ static int rsb_pretty(RSB rsb, int column)
|
||||
* Pretty print an rsb tree.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
RSB *ptr, *end;
|
||||
USHORT i;
|
||||
|
||||
|
@ -194,12 +194,12 @@ pgc[] = {
|
||||
|
||||
jrd_rel[] = {
|
||||
"RELATION",
|
||||
FLD(JRD_REL, "%s", rel_name),
|
||||
FLD(JRD_REL, "Id: %d", rel_id),
|
||||
FLD(JRD_REL, "Current format: %x", rel_current_format),
|
||||
FLD(JRD_REL, "Formats: %x", rel_formats),
|
||||
FLD(JRD_REL, "Pages: %x", rel_pages),
|
||||
FLD(JRD_REL, "Root: %ld", rel_index_root),
|
||||
FLD(jrd_rel*, "%s", rel_name),
|
||||
FLD(jrd_rel*, "Id: %d", rel_id),
|
||||
FLD(jrd_rel*, "Current format: %x", rel_current_format),
|
||||
FLD(jrd_rel*, "Formats: %x", rel_formats),
|
||||
FLD(jrd_rel*, "Pages: %x", rel_pages),
|
||||
FLD(jrd_rel*, "Root: %ld", rel_index_root),
|
||||
0
|
||||
},
|
||||
fmt[] = {
|
||||
@ -211,34 +211,34 @@ fmt[] = {
|
||||
},
|
||||
jrd_req[] = {
|
||||
"REQUEST",
|
||||
FLD(JRD_REQ, "COUNT: %x", req_count),
|
||||
FLD(JRD_REQ, "Impure: %x", req_impure_size),
|
||||
FLD(JRD_REQ, "Incarn: %x", req_incarnation),
|
||||
FLD(JRD_REQ, "Pool: %x", req_pool),
|
||||
FLD(JRD_REQ, "Sub req: %x", req_sub_requests),
|
||||
FLD(JRD_REQ, "Trans: %x", req_transaction),
|
||||
FLD(JRD_REQ, "Next req: %x", req_request),
|
||||
FLD(JRD_REQ, "Msg: %x", req_message),
|
||||
FLD(JRD_REQ, "Length: %x", req_length),
|
||||
FLD(JRD_REQ, "#msgs: %x", req_nmsgs),
|
||||
FLD(JRD_REQ, "Max send: %x", req_msend),
|
||||
FLD(JRD_REQ, "Max receive: %x", req_mreceive),
|
||||
FLD(JRD_REQ, "Top: %x", req_top_node),
|
||||
FLD(JRD_REQ, "Next: %x", req_next),
|
||||
FLD(JRD_REQ, "Label: %x", req_label),
|
||||
FLD(JRD_REQ, "Op: %x", req_operation),
|
||||
FLD(JRD_REQ, "Flags: %x", req_flags),
|
||||
FLD(jrd_req*, "COUNT: %x", req_count),
|
||||
FLD(jrd_req*, "Impure: %x", req_impure_size),
|
||||
FLD(jrd_req*, "Incarn: %x", req_incarnation),
|
||||
FLD(jrd_req*, "Pool: %x", req_pool),
|
||||
FLD(jrd_req*, "Sub req: %x", req_sub_requests),
|
||||
FLD(jrd_req*, "Trans: %x", req_transaction),
|
||||
FLD(jrd_req*, "Next req: %x", req_request),
|
||||
FLD(jrd_req*, "Msg: %x", req_message),
|
||||
FLD(jrd_req*, "Length: %x", req_length),
|
||||
FLD(jrd_req*, "#msgs: %x", req_nmsgs),
|
||||
FLD(jrd_req*, "Max send: %x", req_msend),
|
||||
FLD(jrd_req*, "Max receive: %x", req_mreceive),
|
||||
FLD(jrd_req*, "Top: %x", req_top_node),
|
||||
FLD(jrd_req*, "Next: %x", req_next),
|
||||
FLD(jrd_req*, "Label: %x", req_label),
|
||||
FLD(jrd_req*, "Op: %x", req_operation),
|
||||
FLD(jrd_req*, "Flags: %x", req_flags),
|
||||
0
|
||||
},
|
||||
jrd_tra[] = {
|
||||
"TRANSACTION",
|
||||
FLD(JRD_TRA, "Number: %ld", tra_number),
|
||||
FLD(JRD_TRA, "Oldest: %ld", tra_oldest),
|
||||
FLD(JRD_TRA, "Next: %x", tra_next),
|
||||
FLD(JRD_TRA, "Pool: %x", tra_pool),
|
||||
FLD(JRD_TRA, "Lock: %x", tra_lock),
|
||||
FLD(JRD_TRA, "Locks: %x", tra_relation_locks),
|
||||
FLD(JRD_TRA, "Flags: %x", tra_flags),
|
||||
FLD(jrd_tra*, "Number: %ld", tra_number),
|
||||
FLD(jrd_tra*, "Oldest: %ld", tra_oldest),
|
||||
FLD(jrd_tra*, "Next: %x", tra_next),
|
||||
FLD(jrd_tra*, "Pool: %x", tra_pool),
|
||||
FLD(jrd_tra*, "Lock: %x", tra_lock),
|
||||
FLD(jrd_tra*, "Locks: %x", tra_relation_locks),
|
||||
FLD(jrd_tra*, "Flags: %x", tra_flags),
|
||||
0
|
||||
},
|
||||
jrd_nod[] = {
|
||||
@ -372,8 +372,8 @@ static TEXT_PTR log[] = { "LOG BLOCK", 0};
|
||||
static TEXT_PTR dls[] = { "DIR LIST BLOCK", 0};
|
||||
static TEXT_PTR jrd_prc[] = {
|
||||
"PROCEDURE",
|
||||
FLD(JRD_PRC, "%s", prc_name),
|
||||
FLD(JRD_PRC, "Id: %d", prc_id), 0};
|
||||
FLD(jrd_prc*, "%s", prc_name),
|
||||
FLD(jrd_prc*, "Id: %d", prc_id), 0};
|
||||
static TEXT_PTR prm[] = { "PARAMETER", FLD(PRM, "%s", prm_name), 0};
|
||||
static TEXT_PTR idb[] = { "INDEX BLOCK", 0};
|
||||
static TEXT_PTR bkm[] = { "BOOKMARK BLOCK", 0};
|
||||
@ -479,8 +479,8 @@ struct symb dbt_symbols[] = {
|
||||
SYM (DBB, dbb_requests)
|
||||
SYM (REL, rel_formats)
|
||||
SYM (REL, rel_pages)
|
||||
SYM (JRD_REQ, req_top_node)
|
||||
SYM (JRD_REQ, req_next)
|
||||
SYM (jrd_req*, req_top_node)
|
||||
SYM (jrd_req*, req_next)
|
||||
*/
|
||||
{NULL, 0, symb_routine, 0}
|
||||
};
|
||||
|
240
src/jrd/dfw.epp
240
src/jrd/dfw.epp
@ -155,56 +155,56 @@ DATABASE DB = FILENAME "ODS.RDB";
|
||||
**
|
||||
**==================================================================
|
||||
*/
|
||||
static bool add_file(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool add_shadow(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_shadow(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool compute_security(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool create_index(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_index(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool create_log(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_log(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool create_procedure(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_procedure(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool modify_procedure(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool create_relation(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_relation(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool scan_relation(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool create_trigger(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_trigger(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool modify_trigger(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_exception(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_generator(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_udf(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_field(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_global(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_parameter(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_rfr(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool make_version(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool add_difference(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool delete_difference(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool begin_backup(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool end_backup(TDBB, SSHORT, DFW, JRD_TRA);
|
||||
static bool add_file(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool add_shadow(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_shadow(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool compute_security(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool create_index(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_index(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool create_log(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_log(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool create_procedure(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_procedure(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool modify_procedure(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool create_relation(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_relation(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool scan_relation(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool create_trigger(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_trigger(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool modify_trigger(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_exception(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_generator(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_udf(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_field(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_global(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_parameter(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_rfr(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool make_version(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool add_difference(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool delete_difference(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool begin_backup(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
static bool end_backup(TDBB, SSHORT, DFW, jrd_tra*);
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
static void check_dependencies(TDBB, const TEXT*, const TEXT*, USHORT, JRD_TRA);
|
||||
static void check_dependencies(TDBB, const TEXT*, const TEXT*, USHORT, jrd_tra*);
|
||||
static void check_filename(const TEXT*, USHORT);
|
||||
static bool formatsAreEqual(FMT, FMT);
|
||||
static bool find_depend_in_dfw(TDBB, TEXT*, USHORT, USHORT, JRD_TRA);
|
||||
static bool find_depend_in_dfw(TDBB, TEXT*, USHORT, USHORT, jrd_tra*);
|
||||
static void get_array_desc(TDBB, const TEXT*, ads*);
|
||||
static void get_procedure_dependencies(DFW);
|
||||
static void get_trigger_dependencies(DFW);
|
||||
static void load_trigs(TDBB, JRD_REL, TRIG_VEC *);
|
||||
static FMT make_format(TDBB, JRD_REL, USHORT *, TFB);
|
||||
static void load_trigs(TDBB, jrd_rel*, TRIG_VEC *);
|
||||
static FMT make_format(TDBB, jrd_rel*, USHORT *, TFB);
|
||||
static USHORT name_length(const TEXT*);
|
||||
static DFW post_work(JRD_TRA, SLONG, DFW *, enum dfw_t, DSC *, USHORT);
|
||||
static DFW post_work(jrd_tra*, SLONG, DFW *, enum dfw_t, DSC *, USHORT);
|
||||
static void put_summary_blob(BLB, enum rsr_t, SLONG[2]);
|
||||
static void put_summary_record(BLB, enum rsr_t, const UCHAR*, USHORT);
|
||||
static void setup_array(TDBB, blb*, const TEXT*, USHORT, TFB);
|
||||
static blb* setup_triggers(TDBB, JRD_REL, bool, TRIG_VEC*, blb*);
|
||||
static void setup_trigger_details(TDBB, JRD_REL, BLB, TRIG_VEC*, const TEXT*,
|
||||
static blb* setup_triggers(TDBB, jrd_rel*, bool, TRIG_VEC*, blb*);
|
||||
static void setup_trigger_details(TDBB, jrd_rel*, BLB, TRIG_VEC*, const TEXT*,
|
||||
const TEXT*, bool);
|
||||
//static void setup_trigger_details(TDBB, JRD_REL, BLB, VEC *, UCHAR *, UCHAR *, BOOLEAN);
|
||||
//static void setup_trigger_details(TDBB, jrd_rel*, BLB, VEC *, UCHAR *, UCHAR *, BOOLEAN);
|
||||
static bool shadow_defined(TDBB);
|
||||
static bool validate_text_type (TDBB, ISC_STATUS *, TFB);
|
||||
static bool wal_defined(TDBB);
|
||||
@ -325,7 +325,7 @@ USHORT DFW_assign_index_type(DFW work, SSHORT field_type, SSHORT ttype)
|
||||
}
|
||||
|
||||
|
||||
void DFW_delete_deferred( JRD_TRA transaction, SLONG sav_number)
|
||||
void DFW_delete_deferred( jrd_tra* transaction, SLONG sav_number)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -371,7 +371,7 @@ void DFW_delete_deferred( JRD_TRA transaction, SLONG sav_number)
|
||||
}
|
||||
|
||||
|
||||
void DFW_merge_work(JRD_TRA transaction,
|
||||
void DFW_merge_work(jrd_tra* transaction,
|
||||
SLONG old_sav_number,
|
||||
SLONG new_sav_number)
|
||||
{
|
||||
@ -467,7 +467,7 @@ void DFW_perform_system_work(void)
|
||||
}
|
||||
|
||||
|
||||
void DFW_perform_work(JRD_TRA transaction)
|
||||
void DFW_perform_work(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -570,7 +570,7 @@ void DFW_perform_work(JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void DFW_perform_post_commit_work(JRD_TRA transaction)
|
||||
void DFW_perform_post_commit_work(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -627,7 +627,7 @@ void DFW_perform_post_commit_work(JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
dfw* DFW_post_work(JRD_TRA transaction, enum dfw_t type, DSC* desc, USHORT id)
|
||||
dfw* DFW_post_work(jrd_tra* transaction, enum dfw_t type, DSC* desc, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -656,7 +656,7 @@ dfw* DFW_post_work(JRD_TRA transaction, enum dfw_t type, DSC* desc, USHORT id)
|
||||
}
|
||||
|
||||
|
||||
void DFW_post_work_arg( JRD_TRA transaction, DFW work, DSC* desc, USHORT id)
|
||||
void DFW_post_work_arg( jrd_tra* transaction, DFW work, DSC* desc, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -729,7 +729,7 @@ void DFW_update_index(const TEXT* name, USHORT id, const SelectivityList& select
|
||||
}
|
||||
|
||||
|
||||
static bool add_file(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool add_file(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -832,10 +832,10 @@ static bool add_file(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
}
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
if (handle2)
|
||||
{
|
||||
CMP_release(tdbb, (JRD_REQ)handle2);
|
||||
CMP_release(tdbb, (jrd_req*)handle2);
|
||||
}
|
||||
|
||||
if (section)
|
||||
@ -849,7 +849,7 @@ static bool add_file(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
X.RDB$FILE_LENGTH = start - X.RDB$FILE_START;
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
}
|
||||
|
||||
CCH_release_exclusive(tdbb);
|
||||
@ -861,7 +861,7 @@ static bool add_file(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
|
||||
|
||||
|
||||
static bool add_shadow( TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool add_shadow( TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -969,7 +969,7 @@ static bool add_shadow( TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
if (finished) {
|
||||
return false;
|
||||
@ -1038,14 +1038,14 @@ static bool add_shadow( TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool add_difference( TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool add_difference( TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1096,7 +1096,7 @@ static bool add_difference( TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transacti
|
||||
static bool delete_difference( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1142,7 +1142,7 @@ static bool delete_difference( TDBB tdbb,
|
||||
static bool begin_backup( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1182,7 +1182,7 @@ static bool begin_backup( TDBB tdbb,
|
||||
static bool end_backup( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1217,7 +1217,7 @@ static void check_dependencies(TDBB tdbb,
|
||||
const TEXT* dpdo_name,
|
||||
const TEXT* field_name,
|
||||
USHORT dpdo_type,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1425,7 +1425,7 @@ static bool formatsAreEqual(fmt* old_format, fmt* new_format)
|
||||
static bool compute_security( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1460,7 +1460,7 @@ static bool compute_security( TDBB tdbb,
|
||||
tdbb->tdbb_attachment->att_security_class = s_class;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ CMP_release (tdbb, handle);
|
||||
static bool create_index( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1510,9 +1510,9 @@ static bool create_index( TDBB tdbb,
|
||||
* Create a new index or change the state of an index between active/inactive.
|
||||
*
|
||||
**************************************/
|
||||
|
||||
BLK request;
|
||||
JRD_REL relation, partner_relation;
|
||||
jrd_rel* relation;
|
||||
jrd_rel* partner_relation;
|
||||
IDX idx;
|
||||
int key_count;
|
||||
SSHORT text_type;
|
||||
@ -1560,7 +1560,7 @@ static bool create_index( TDBB tdbb,
|
||||
}
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CCH_release_exclusive(tdbb);
|
||||
return false;
|
||||
|
||||
@ -1598,7 +1598,7 @@ static bool create_index( TDBB tdbb,
|
||||
MET_lookup_relation_id(tdbb, REL.RDB$RELATION_ID, FALSE);
|
||||
if (!relation)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_idx_create_err,
|
||||
isc_arg_string, ERR_cstring(work->dfw_name),
|
||||
@ -1612,7 +1612,7 @@ static bool create_index( TDBB tdbb,
|
||||
IDX_statistics(tdbb, relation, id, selectivity);
|
||||
DFW_update_index(work->dfw_name, id, selectivity);
|
||||
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
return false;
|
||||
}
|
||||
if (IDX.RDB$INDEX_ID)
|
||||
@ -1626,13 +1626,13 @@ static bool create_index( TDBB tdbb,
|
||||
}
|
||||
if (IDX.RDB$INDEX_INACTIVE)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
return false;
|
||||
}
|
||||
idx.idx_count = IDX.RDB$SEGMENT_COUNT;
|
||||
if (!idx.idx_count || idx.idx_count > MAX_INDEX_SEGMENTS)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
if (!idx.idx_count)
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_idx_seg_err,
|
||||
@ -1664,7 +1664,7 @@ static bool create_index( TDBB tdbb,
|
||||
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)rc_request);
|
||||
CMP_release(tdbb, (jrd_req*)rc_request);
|
||||
}
|
||||
|
||||
if (++key_count > idx.idx_count ||
|
||||
@ -1672,7 +1672,7 @@ static bool create_index( TDBB tdbb,
|
||||
FLD.RDB$FIELD_TYPE == blr_blob ||
|
||||
!FLD.RDB$DIMENSIONS.NULL)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
if (key_count > idx.idx_count)
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_idx_key_err,
|
||||
@ -1811,7 +1811,7 @@ static bool create_index( TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool create_log(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool create_log(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1872,7 +1872,7 @@ static bool create_log(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
transaction->tra_flags |= TRA_add_log;
|
||||
PAG_modify_log(transaction->tra_number, TRA_add_log);
|
||||
@ -1890,7 +1890,7 @@ static bool create_log(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool create_procedure( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1930,7 +1930,7 @@ static bool create_procedure( TDBB tdbb,
|
||||
static bool create_relation(TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1943,7 +1943,7 @@ static bool create_relation(TDBB tdbb,
|
||||
*
|
||||
**************************************/
|
||||
BLK request;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
USHORT rel_id, external_flag;
|
||||
ISC_QUAD blob_id;
|
||||
BLK handle;
|
||||
@ -2029,7 +2029,7 @@ static bool create_relation(TDBB tdbb,
|
||||
}
|
||||
if (rel_id == X.RDB$RELATION_ID)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_table_name,
|
||||
isc_arg_string, ERR_cstring(work->dfw_name),
|
||||
@ -2058,7 +2058,7 @@ static bool create_relation(TDBB tdbb,
|
||||
Y.RDB$DBKEY_LENGTH += R.RDB$DBKEY_LENGTH;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
}
|
||||
END_MODIFY
|
||||
END_MODIFY
|
||||
@ -2097,7 +2097,7 @@ static bool create_relation(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool create_trigger(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool create_trigger(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2130,7 +2130,7 @@ static bool create_trigger(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transactio
|
||||
static bool delete_exception( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2170,7 +2170,7 @@ static bool delete_exception( TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool delete_generator(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_generator(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2207,7 +2207,7 @@ static bool delete_generator(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transact
|
||||
}
|
||||
|
||||
|
||||
static bool delete_udf(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_udf(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2247,7 +2247,7 @@ static bool delete_udf(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_field( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2292,7 +2292,7 @@ static bool delete_field( TDBB tdbb,
|
||||
field_count++;
|
||||
}
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
if (field_count)
|
||||
ERR_post(isc_no_meta_update,
|
||||
@ -2315,7 +2315,7 @@ static bool delete_field( TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool delete_global(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_global(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2352,7 +2352,7 @@ static bool delete_global(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction
|
||||
MET_delete_dependencies(tdbb, work->dfw_name, obj_computed);
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2361,7 +2361,7 @@ static bool delete_global(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction
|
||||
}
|
||||
|
||||
|
||||
static bool delete_index(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_index(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2374,7 +2374,7 @@ static bool delete_index(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
**************************************/
|
||||
IDL index, *ptr;
|
||||
IDB index_block, *iptr;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
USHORT id, wait;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -2505,7 +2505,7 @@ static bool delete_index(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
static bool delete_log(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_log(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2553,7 +2553,7 @@ static bool delete_log(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_parameter( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2593,7 +2593,7 @@ static bool delete_parameter( TDBB tdbb,
|
||||
static bool delete_procedure( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2606,7 +2606,7 @@ static bool delete_procedure( TDBB tdbb,
|
||||
* a procedure , and if so, clean up after it.
|
||||
*
|
||||
**************************************/
|
||||
JRD_PRC procedure;
|
||||
jrd_prc* procedure;
|
||||
USHORT wait;
|
||||
USHORT old_flags;
|
||||
|
||||
@ -2715,7 +2715,7 @@ static bool delete_procedure( TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2729,7 +2729,7 @@ static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transacti
|
||||
*
|
||||
**************************************/
|
||||
BLK request;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
RSC rsc;
|
||||
USHORT wait, view_count, adjusted;
|
||||
|
||||
@ -2770,7 +2770,7 @@ static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transacti
|
||||
}
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
|
||||
if (view_count)
|
||||
{
|
||||
@ -2919,7 +2919,7 @@ static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transacti
|
||||
MET_release_triggers(tdbb, &relation->rel_pre_modify);
|
||||
MET_release_triggers(tdbb, &relation->rel_post_modify);
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2927,7 +2927,7 @@ static bool delete_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transacti
|
||||
}
|
||||
|
||||
|
||||
static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2947,7 +2947,7 @@ static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
int rel_exists, field_count, id;
|
||||
BLK handle;
|
||||
TEXT f[32];
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
VEC vector;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -2982,7 +2982,7 @@ static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
field_count++;
|
||||
}
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
if (field_count)
|
||||
ERR_post(isc_no_meta_update,
|
||||
@ -3009,7 +3009,7 @@ static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
rel_exists++;
|
||||
END_FOR;
|
||||
if (handle)
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
/* if table exists, check if this is the last column in the table */
|
||||
|
||||
@ -3026,7 +3026,7 @@ static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
END_FOR;
|
||||
if (handle)
|
||||
{
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
}
|
||||
|
||||
if (!field_count)
|
||||
@ -3070,7 +3070,7 @@ static bool delete_rfr(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool delete_shadow( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3104,7 +3104,7 @@ static bool delete_shadow( TDBB tdbb,
|
||||
static bool delete_trigger( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3140,7 +3140,7 @@ static bool find_depend_in_dfw( TDBB tdbb,
|
||||
TEXT* object_name,
|
||||
USHORT dep_type,
|
||||
USHORT rel_id,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3212,7 +3212,7 @@ static bool find_depend_in_dfw( TDBB tdbb,
|
||||
if (!find_depend_in_dfw(tdbb, RFR.RDB$FIELD_NAME, obj_computed,
|
||||
REL.RDB$RELATION_ID, transaction))
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
return false;
|
||||
}
|
||||
END_FOR;
|
||||
@ -3399,7 +3399,7 @@ static void get_trigger_dependencies( DFW work)
|
||||
}
|
||||
|
||||
|
||||
static void load_trigs(TDBB tdbb, JRD_REL relation, TRIG_VEC * triggers)
|
||||
static void load_trigs(TDBB tdbb, jrd_rel* relation, TRIG_VEC * triggers)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3441,7 +3441,7 @@ static void load_trigs(TDBB tdbb, JRD_REL relation, TRIG_VEC * triggers)
|
||||
}
|
||||
|
||||
|
||||
static FMT make_format(TDBB tdbb, JRD_REL relation, USHORT * version, TFB stack)
|
||||
static FMT make_format(TDBB tdbb, jrd_rel* relation, USHORT * version, TFB stack)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3587,7 +3587,7 @@ static FMT make_format(TDBB tdbb, JRD_REL relation, USHORT * version, TFB stack)
|
||||
}
|
||||
|
||||
|
||||
static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool make_version(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3606,7 +3606,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
DBB dbb;
|
||||
BLK request_fmt1, request_fmtx;
|
||||
TFB stack, external, tfb_;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
BLB blob;
|
||||
ISC_QUAD blob_id;
|
||||
BLK temp;
|
||||
@ -3647,7 +3647,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
MET_lookup_relation_id(tdbb, REL.RDB$RELATION_ID, FALSE);
|
||||
if (!relation)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request_fmt1);
|
||||
EXE_unwind(tdbb, (jrd_req*)request_fmt1);
|
||||
return false;
|
||||
}
|
||||
blob_id = REL.RDB$VIEW_BLR;
|
||||
@ -3655,7 +3655,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
external_flag = REL.RDB$EXTERNAL_FILE[0];
|
||||
if (REL.RDB$FORMAT == 255)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request_fmt1);
|
||||
EXE_unwind(tdbb, (jrd_req*)request_fmt1);
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_table_name,
|
||||
isc_arg_string, ERR_cstring(work->dfw_name),
|
||||
@ -3721,7 +3721,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
X.RDB$TRIGGER_TYPE EQ 1
|
||||
RFR.RDB$UPDATE_FLAG = 1;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)temp);
|
||||
CMP_release(tdbb, (jrd_req*)temp);
|
||||
}
|
||||
}
|
||||
END_MODIFY;
|
||||
@ -3799,8 +3799,8 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
/* Make sure the text type specified is implemented */
|
||||
if (!(validate_text_type(tdbb, status, tfb_)))
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request_fmt1);
|
||||
EXE_unwind(tdbb, (JRD_REQ)request_fmtx);
|
||||
EXE_unwind(tdbb, (jrd_req*)request_fmt1);
|
||||
EXE_unwind(tdbb, (jrd_req*)request_fmtx);
|
||||
ERR_post(isc_no_meta_update,
|
||||
isc_arg_gds, isc_random,
|
||||
isc_arg_string, ERR_cstring(work->dfw_name),
|
||||
@ -3876,7 +3876,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
FMT.RDB$FORMAT EQ 0
|
||||
ERASE FMT;
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)temp);
|
||||
CMP_release(tdbb, (jrd_req*)temp);
|
||||
make_format(tdbb, relation, 0, external);
|
||||
}
|
||||
|
||||
@ -3892,7 +3892,7 @@ static bool make_version(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool modify_procedure( TDBB tdbb,
|
||||
SSHORT phase,
|
||||
DFW work,
|
||||
JRD_TRA transaction)
|
||||
jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3904,7 +3904,7 @@ static bool modify_procedure( TDBB tdbb,
|
||||
* Perform required actions when modifying procedure.
|
||||
*
|
||||
**************************************/
|
||||
JRD_PRC procedure;
|
||||
jrd_prc* procedure;
|
||||
USHORT wait;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -4086,7 +4086,7 @@ static bool modify_procedure( TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static bool modify_trigger(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool modify_trigger(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4143,7 +4143,7 @@ static USHORT name_length(const TEXT* name)
|
||||
}
|
||||
|
||||
|
||||
static DFW post_work(JRD_TRA transaction,
|
||||
static DFW post_work(jrd_tra* transaction,
|
||||
SLONG sav_number,
|
||||
DFW *list,
|
||||
enum dfw_t type,
|
||||
@ -4333,7 +4333,7 @@ static void put_summary_record(BLB blob,
|
||||
}
|
||||
|
||||
|
||||
static bool scan_relation(TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
static bool scan_relation(TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4389,7 +4389,7 @@ static bool shadow_defined(TDBB tdbb)
|
||||
result = true;
|
||||
END_FOR
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -4423,7 +4423,7 @@ static void setup_array(TDBB tdbb, blb* blob, const TEXT* field_name, USHORT n,
|
||||
}
|
||||
|
||||
|
||||
static blb* setup_triggers(TDBB tdbb, JRD_REL relation, bool null_view,
|
||||
static blb* setup_triggers(TDBB tdbb, jrd_rel* relation, bool null_view,
|
||||
TRIG_VEC* triggers, blb* blob)
|
||||
{
|
||||
/**************************************
|
||||
@ -4536,7 +4536,7 @@ static blb* setup_triggers(TDBB tdbb, JRD_REL relation, bool null_view,
|
||||
|
||||
|
||||
static void setup_trigger_details(TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
BLB blob,
|
||||
TRIG_VEC* triggers,
|
||||
const TEXT* trigger_name,
|
||||
@ -4622,7 +4622,7 @@ static bool wal_defined(TDBB tdbb)
|
||||
result = true;
|
||||
END_FOR
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -81,11 +81,11 @@ DATABASE DB = FILENAME "ODS.RDB";
|
||||
#define SPACE_FUDGE RHDF_SIZE
|
||||
|
||||
static void delete_tail(TDBB, RHDF, USHORT);
|
||||
static void fragment(TDBB, RPB *, SSHORT, Dcc*, SSHORT, JRD_TRA);
|
||||
static void extend_relation(TDBB, JRD_REL, WIN *);
|
||||
static void fragment(TDBB, RPB *, SSHORT, Dcc*, SSHORT, jrd_tra*);
|
||||
static void extend_relation(TDBB, jrd_rel*, WIN *);
|
||||
static UCHAR *find_space(TDBB, RPB *, SSHORT, LLS *, REC, USHORT);
|
||||
static BOOLEAN get_header(WIN *, SSHORT, RPB *);
|
||||
static PPG get_pointer_page(TDBB, JRD_REL, WIN *, USHORT, USHORT);
|
||||
static PPG get_pointer_page(TDBB, jrd_rel*, WIN *, USHORT, USHORT);
|
||||
static void journal_segment(TDBB, WIN *, USHORT);
|
||||
static RHD locate_space(TDBB, RPB *, SSHORT, LLS *, REC, USHORT);
|
||||
static void mark_full(TDBB, RPB *);
|
||||
@ -458,7 +458,7 @@ int DPM_compress( TDBB tdbb, DPG page)
|
||||
}
|
||||
|
||||
|
||||
void DPM_create_relation( TDBB tdbb, JRD_REL relation)
|
||||
void DPM_create_relation( TDBB tdbb, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -531,7 +531,7 @@ void DPM_create_relation( TDBB tdbb, JRD_REL relation)
|
||||
}
|
||||
|
||||
|
||||
SLONG DPM_data_pages(TDBB tdbb, JRD_REL relation)
|
||||
SLONG DPM_data_pages(TDBB tdbb, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -607,7 +607,7 @@ void DPM_delete( TDBB tdbb, RPB * rpb, SLONG prior_page)
|
||||
USHORT pp_sequence;
|
||||
SLONG *ptr;
|
||||
JRNP journal;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
@ -788,7 +788,7 @@ void DPM_delete( TDBB tdbb, RPB * rpb, SLONG prior_page)
|
||||
}
|
||||
|
||||
|
||||
void DPM_delete_relation( TDBB tdbb, JRD_REL relation)
|
||||
void DPM_delete_relation( TDBB tdbb, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -876,7 +876,7 @@ void DPM_delete_relation( TDBB tdbb, JRD_REL relation)
|
||||
X.RDB$RELATION_ID EQ relation->rel_id ERASE X;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
CCH_flush(tdbb, (USHORT) FLUSH_ALL, 0);
|
||||
}
|
||||
|
||||
@ -1654,7 +1654,7 @@ void DPM_pages(
|
||||
|
||||
|
||||
#ifdef SUPERSERVER_V2
|
||||
SLONG DPM_prefetch_bitmap(TDBB tdbb, JRD_REL relation, SBM bitmap, SLONG number)
|
||||
SLONG DPM_prefetch_bitmap(TDBB tdbb, jrd_rel* relation, SBM bitmap, SLONG number)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2028,7 +2028,7 @@ void DPM_rewrite_header( TDBB tdbb, RPB * rpb)
|
||||
}
|
||||
|
||||
|
||||
void DPM_update( TDBB tdbb, RPB * rpb, LLS * stack, JRD_TRA transaction)
|
||||
void DPM_update( TDBB tdbb, RPB * rpb, LLS * stack, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2225,7 +2225,7 @@ static void fragment(
|
||||
TDBB tdbb,
|
||||
RPB * rpb,
|
||||
SSHORT available_space,
|
||||
Dcc* dcc, SSHORT length, JRD_TRA transaction)
|
||||
Dcc* dcc, SSHORT length, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2439,7 +2439,7 @@ static void fragment(
|
||||
}
|
||||
|
||||
|
||||
static void extend_relation( TDBB tdbb, JRD_REL relation, WIN * window)
|
||||
static void extend_relation( TDBB tdbb, jrd_rel* relation, WIN * window)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2755,7 +2755,7 @@ static BOOLEAN get_header( WIN * window, SSHORT line, RPB * rpb)
|
||||
|
||||
static PPG get_pointer_page(
|
||||
TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
WIN * window, USHORT sequence, USHORT lock)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -772,7 +772,7 @@ void DYN_rundown_request(BLK handle, SSHORT id)
|
||||
return;
|
||||
}
|
||||
|
||||
EXE_unwind(tdbb, (JRD_REQ)handle);
|
||||
EXE_unwind(tdbb, (jrd_req*)handle);
|
||||
if (id >= 0 && !DYN_REQUEST(id)) {
|
||||
DYN_REQUEST(id) = handle;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ const char* const NOT_NULL_CNSTRT = "NOT NULL";
|
||||
|
||||
typedef struct gbl
|
||||
{
|
||||
JRD_TRA gbl_transaction;
|
||||
jrd_tra* gbl_transaction;
|
||||
} *GBL;
|
||||
|
||||
typedef struct dyn_fld {
|
||||
|
@ -407,7 +407,7 @@ void DYN_define_constraint(GBL gbl,
|
||||
not_null = FALSE;
|
||||
fb_utils::fb_exact_name_limit(RFR.RDB$FIELD_NAME, sizeof(RFR.RDB$FIELD_NAME));
|
||||
strcpy(null_field_name, RFR.RDB$FIELD_NAME);
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ void DYN_define_constraint(GBL gbl,
|
||||
found = false;
|
||||
}
|
||||
if (found) {
|
||||
EXE_unwind(tdbb,(JRD_REQ)request);
|
||||
EXE_unwind(tdbb,(jrd_req*)request);
|
||||
break;
|
||||
}
|
||||
list_ptr = field_list;
|
||||
@ -1846,6 +1846,7 @@ void DYN_define_index(GBL gbl,
|
||||
str_ = FB_NEW_RPT(*tdbb->tdbb_default, MAX_SQL_IDENTIFIER_LEN) str();
|
||||
DYN_get_string(reinterpret_cast<const TEXT**>(ptr),
|
||||
(TEXT*)str_->str_data, MAX_SQL_IDENTIFIER_SIZE, true);
|
||||
fb_utils::fb_exact_name_limit((TEXT*)str_->str_data, MAX_SQL_IDENTIFIER_SIZE);
|
||||
LLS_PUSH(str_, &field_list);
|
||||
referred_cols++;
|
||||
break;
|
||||
@ -2039,7 +2040,7 @@ void DYN_define_index(GBL gbl,
|
||||
if (list_ptr)
|
||||
found = false;
|
||||
if (found) {
|
||||
EXE_unwind(tdbb,(JRD_REQ)request);
|
||||
EXE_unwind(tdbb,(jrd_req*)request);
|
||||
break;
|
||||
}
|
||||
list_ptr = field_list;
|
||||
@ -3915,7 +3916,7 @@ void DYN_define_trigger(GBL gbl,
|
||||
|
||||
/* the END_STORE_SPECIAL adds the foll. lines of code to the END_STORE
|
||||
if (ignore_perm)
|
||||
((JRD_REQ)request)->req_flags |= req_ignore_perm;
|
||||
((jrd_req*)request)->req_flags |= req_ignore_perm;
|
||||
after the request is compiled and before the request is sent.
|
||||
It makes the current request (to define the trigger) go through
|
||||
without checking any permissions lower in the engine */
|
||||
@ -3923,7 +3924,7 @@ void DYN_define_trigger(GBL gbl,
|
||||
END_STORE_SPECIAL;
|
||||
|
||||
if (ignore_perm)
|
||||
((JRD_REQ) request)->req_flags &= ~req_ignore_perm;
|
||||
((jrd_req*) request)->req_flags &= ~req_ignore_perm;
|
||||
|
||||
if (!DYN_REQUEST(drq_s_triggers)) {
|
||||
DYN_REQUEST(drq_s_triggers) = request;
|
||||
@ -4293,8 +4294,8 @@ static bool get_who( TDBB tdbb, GBL gbl, SCHAR* output_name)
|
||||
{
|
||||
request = (BLK) CMP_compile2(tdbb, who_blr, TRUE);
|
||||
}
|
||||
EXE_start(tdbb, (JRD_REQ) request, gbl->gbl_transaction);
|
||||
EXE_receive(tdbb, (JRD_REQ) request, 0, MAX_SQL_IDENTIFIER_SIZE,
|
||||
EXE_start(tdbb, (jrd_req*) request, gbl->gbl_transaction);
|
||||
EXE_receive(tdbb, (jrd_req*) request, 0, MAX_SQL_IDENTIFIER_SIZE,
|
||||
(UCHAR*) output_name);
|
||||
|
||||
DYN_rundown_request(request, drq_l_user_name);
|
||||
|
@ -461,7 +461,7 @@ void DYN_modify_global_field(
|
||||
DIM_DOM.RDB$FIELD_NAME.NULL = FALSE;
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
CMP_release (tdbb, (JRD_REQ) request);
|
||||
CMP_release (tdbb, (jrd_req*) request);
|
||||
request = NULL;
|
||||
}
|
||||
/* CVC: End modification. */
|
||||
@ -477,7 +477,7 @@ void DYN_modify_global_field(
|
||||
DOM.RDB$FIELD_NAME,
|
||||
DOM.RDB$FIELD_NAME);
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = old_request;
|
||||
END_MODIFY;
|
||||
}
|
||||
@ -509,7 +509,7 @@ void DYN_modify_global_field(
|
||||
new_dom->dyn_dsc.dsc_length = DYN_get_number(ptr);
|
||||
if (++field_adjusted_count > 2)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
DYN_error_punt(false, 5, err_one_type_change_only, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
switch (new_dom->dyn_dtype) {
|
||||
@ -533,7 +533,7 @@ void DYN_modify_global_field(
|
||||
new_dom->dyn_dtype = DYN_get_number(ptr);
|
||||
if (++field_adjusted_count > 2)
|
||||
{
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
DYN_error_punt(false, 5, err_one_type_change_only, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ void DYN_modify_global_field(
|
||||
|
||||
case isc_dyn_single_validation:
|
||||
if (single_validate) {
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
DYN_error_punt(false, 160, NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 160: "Only one constraint allowed for a domain" */
|
||||
break;
|
||||
@ -644,7 +644,7 @@ void DYN_modify_global_field(
|
||||
|
||||
case isc_dyn_fld_validation_blr:
|
||||
if (single_validate && (!FLD.RDB$VALIDATION_BLR.NULL)) {
|
||||
EXE_unwind(tdbb, (JRD_REQ)request);
|
||||
EXE_unwind(tdbb, (jrd_req*)request);
|
||||
DYN_error_punt(false, 160, NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 160: "Only one constraint allowed for a domain" */
|
||||
break;
|
||||
@ -744,7 +744,7 @@ void DYN_modify_global_field(
|
||||
DOM.RDB$FIELD_NAME);
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = old_request;
|
||||
}
|
||||
|
||||
@ -1955,7 +1955,7 @@ static void modify_lfield_position(TDBB tdbb,
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
|
||||
/* Once the field position has been changed, make sure that there are no
|
||||
@ -1975,7 +1975,7 @@ static void modify_lfield_position(TDBB tdbb,
|
||||
new_pos += 1;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
}
|
||||
catch (const std::exception&) {
|
||||
DYN_error_punt(true, 95, NULL, NULL, NULL, NULL, NULL);
|
||||
@ -2019,7 +2019,7 @@ static bool check_view_dependency(TDBB tdbb,
|
||||
view_name = Z.RDB$VIEW_NAME;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
|
||||
if (retval)
|
||||
DYN_error_punt(false, 206, field_name, relation_name, view_name, NULL,
|
||||
@ -2059,7 +2059,7 @@ static bool check_sptrig_dependency(TDBB tdbb,
|
||||
dep_name = DEP.RDB$DEPENDENT_NAME;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
|
||||
if (retval)
|
||||
DYN_error_punt(false, 206, field_name, relation_name, dep_name, NULL,
|
||||
@ -2106,7 +2106,7 @@ static void modify_lfield_index(TDBB tdbb,
|
||||
END_MODIFY;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
}
|
||||
|
||||
static bool field_exists(TDBB tdbb,
|
||||
@ -2133,7 +2133,7 @@ static bool field_exists(TDBB tdbb,
|
||||
retval = true;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -2155,7 +2155,7 @@ static bool domain_exists(TDBB tdbb, DBB dbb, GBL gbl, const TEXT* field_name)
|
||||
retval = true;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -2422,7 +2422,7 @@ void DYN_modify_sql_field(GBL gbl,
|
||||
}
|
||||
}
|
||||
END_FOR; /* FLD in RDB$FIELDS */
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
|
||||
/* Now that we have all of the information needed, let's check to see if the field type can be modifed */
|
||||
@ -2454,7 +2454,7 @@ void DYN_modify_sql_field(GBL gbl,
|
||||
ERASE FLD;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
}
|
||||
request = first_request;
|
||||
@ -2551,7 +2551,7 @@ void DYN_modify_sql_field(GBL gbl,
|
||||
strcpy(FLD.RDB$FIELD_NAME, new_fld->dyn_fld_name);
|
||||
END_STORE;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
}
|
||||
else { /* the original and new definitions are both base types */
|
||||
@ -2597,13 +2597,13 @@ void DYN_modify_sql_field(GBL gbl,
|
||||
|
||||
END_MODIFY;
|
||||
END_FOR; /* FLD in RDB$FIELDS */
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
}
|
||||
} /* else not a domain */
|
||||
request = first_request;
|
||||
END_FOR; /* RFR IN RDB$RELATION_FIELDS */
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
request = NULL;
|
||||
|
||||
if (!found)
|
||||
@ -2677,7 +2677,7 @@ void get_domain_type(TDBB tdbb, DBB dbb, GBL gbl, DYN_FLD dom_fld)
|
||||
dom_fld->dyn_null_flag = FLD.RDB$NULL_FLAG;
|
||||
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ)request);
|
||||
CMP_release(tdbb, (jrd_req*)request);
|
||||
}
|
||||
|
||||
static ULONG check_update_fld_type(const dyn_fld* orig_fld,
|
||||
|
@ -130,7 +130,7 @@ SINT64 DYN_UTIL_gen_unique_id(TDBB tdbb,
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
|
||||
JRD_REQ req_handle = CMP_find_request(tdbb, id, DYN_REQUESTS);
|
||||
jrd_req* req_handle = CMP_find_request(tdbb, id, DYN_REQUESTS);
|
||||
|
||||
if (!req_handle)
|
||||
{
|
||||
@ -482,7 +482,8 @@ bool DYN_UTIL_get_prot(TDBB tdbb,
|
||||
* Get protection mask for relation or relation_field
|
||||
*
|
||||
**************************************/
|
||||
volatile JRD_REQ request;
|
||||
// It was volatile JRD_REQ request; This maps to:
|
||||
jrd_req* volatile request;
|
||||
struct
|
||||
{
|
||||
SqlIdentifier relation_name;
|
||||
|
@ -158,7 +158,7 @@ const TEXT* ERR_cstring(const TEXT* in_string)
|
||||
|
||||
#if ( !defined( REQUESTER) && !defined( SUPERCLIENT))
|
||||
void ERR_duplicate_error(IDX_E code,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
USHORT index_number)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -109,7 +109,7 @@ typedef struct prb
|
||||
SRQ prb_sessions; /* Sessions within process */
|
||||
SLONG prb_process_id; /* Process id */
|
||||
SLONG prb_process_uid[2]; /* Process UID (apollo) */
|
||||
EVENT_T prb_event[1]; /* Event on which to wait */
|
||||
event_t prb_event[1]; /* Event on which to wait */
|
||||
USHORT prb_flags;
|
||||
} *PRB;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
* $Id: evl.cpp,v 1.57 2003-12-31 16:09:07 skidder Exp $
|
||||
* $Id: evl.cpp,v 1.58 2004-01-03 10:59:40 robocop Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1214,7 +1214,7 @@ dsc* EVL_expr(TDBB tdbb, JRD_NOD node)
|
||||
}
|
||||
|
||||
|
||||
bool EVL_field(JRD_REL relation, REC record, USHORT id, dsc* desc)
|
||||
bool EVL_field(jrd_rel* relation, REC record, USHORT id, dsc* desc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3568,7 +3568,7 @@ static dsc* lock_record(TDBB tdbb, JRD_NOD node, VLU impure)
|
||||
* pointing to the lock handle.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
dsc* desc;
|
||||
USHORT lock_level;
|
||||
RSB rsb;
|
||||
@ -3649,7 +3649,7 @@ static dsc* lock_relation(TDBB tdbb, JRD_NOD node, VLU impure)
|
||||
dsc* desc;
|
||||
USHORT lock_level;
|
||||
JRD_NOD relation_node;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
LCK lock = NULL;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -3672,7 +3672,7 @@ static dsc* lock_relation(TDBB tdbb, JRD_NOD node, VLU impure)
|
||||
/* perform the actual lock (or unlock) */
|
||||
|
||||
relation_node = node->nod_arg[e_lockrel_relation];
|
||||
relation = (JRD_REL) relation_node->nod_arg[e_rel_relation];
|
||||
relation = (jrd_rel*) relation_node->nod_arg[e_rel_relation];
|
||||
if (!lock_level)
|
||||
RLCK_unlock_relation(0, relation);
|
||||
else
|
||||
|
103
src/jrd/exe.cpp
103
src/jrd/exe.cpp
@ -145,33 +145,33 @@ SLONG status_xcp::as_sqlcode() const
|
||||
static void assign_xcp_message(TDBB, STR*, const TEXT*);
|
||||
static void cleanup_rpb(TDBB, RPB *);
|
||||
static JRD_NOD erase(TDBB, JRD_NOD, SSHORT);
|
||||
static void execute_looper(TDBB, JRD_REQ, JRD_TRA, enum jrd_req::req_s);
|
||||
static void exec_sql(TDBB, JRD_REQ, DSC *);
|
||||
static void execute_looper(TDBB, jrd_req*, jrd_tra*, enum jrd_req::req_s);
|
||||
static void exec_sql(TDBB, jrd_req*, DSC *);
|
||||
static void execute_procedure(TDBB, JRD_NOD);
|
||||
static JRD_REQ execute_triggers(TDBB, TRIG_VEC *, REC, REC, enum jrd_req::req_ta);
|
||||
static JRD_NOD looper(TDBB, JRD_REQ, JRD_NOD);
|
||||
static jrd_req* execute_triggers(TDBB, TRIG_VEC *, REC, REC, enum jrd_req::req_ta);
|
||||
static JRD_NOD looper(TDBB, jrd_req*, JRD_NOD);
|
||||
static JRD_NOD modify(TDBB, JRD_NOD, SSHORT);
|
||||
static JRD_NOD receive_msg(TDBB, JRD_NOD);
|
||||
static void release_blobs(TDBB, JRD_REQ);
|
||||
static void release_proc_save_points(JRD_REQ);
|
||||
static void release_blobs(TDBB, jrd_req*);
|
||||
static void release_proc_save_points(jrd_req*);
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
static JRD_NOD seek_rse(TDBB, JRD_REQ, JRD_NOD);
|
||||
static void seek_rsb(TDBB, JRD_REQ, RSB, USHORT, SLONG);
|
||||
static JRD_NOD seek_rse(TDBB, jrd_req*, JRD_NOD);
|
||||
static void seek_rsb(TDBB, jrd_req*, RSB, USHORT, SLONG);
|
||||
#endif
|
||||
static JRD_NOD selct(TDBB, JRD_NOD);
|
||||
static JRD_NOD send_msg(TDBB, JRD_NOD);
|
||||
static void set_error(TDBB, const xcp_repeat*, JRD_NOD);
|
||||
static JRD_NOD stall(TDBB, JRD_NOD);
|
||||
static JRD_NOD store(TDBB, JRD_NOD, SSHORT);
|
||||
static bool test_and_fixup_error(TDBB, const XCP, JRD_REQ);
|
||||
static void trigger_failure(TDBB, JRD_REQ);
|
||||
static bool test_and_fixup_error(TDBB, const XCP, jrd_req*);
|
||||
static void trigger_failure(TDBB, jrd_req*);
|
||||
static void validate(TDBB, JRD_NOD);
|
||||
inline void PreModifyEraseTriggers(TDBB, trig_vec**, SSHORT, RPB*, REC, jrd_req::req_ta);
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static JRD_NOD find(TDBB, JRD_NOD);
|
||||
static JRD_NOD find_dbkey(TDBB, JRD_NOD);
|
||||
static LCK implicit_record_lock(JRD_TRA, RPB *);
|
||||
static LCK implicit_record_lock(jrd_tra*, RPB *);
|
||||
static JRD_NOD release_bookmark(TDBB, JRD_NOD);
|
||||
static JRD_NOD set_bookmark(TDBB, JRD_NOD);
|
||||
static JRD_NOD set_index(TDBB, JRD_NOD);
|
||||
@ -253,7 +253,7 @@ void EXE_assignment(TDBB tdbb, JRD_NOD node)
|
||||
DEV_BLKCHK(node, type_nod);
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
/* Get descriptors of receiving and sending fields/parameters, variables, etc. */
|
||||
@ -473,7 +473,7 @@ bool EXE_crack(TDBB tdbb, RSB rsb, USHORT flags)
|
||||
#endif
|
||||
|
||||
|
||||
JRD_REQ EXE_find_request(TDBB tdbb, JRD_REQ request, bool validate)
|
||||
jrd_req* EXE_find_request(TDBB tdbb, jrd_req* request, bool validate)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -581,7 +581,7 @@ void EXE_mark_crack(TDBB tdbb, RSB rsb, USHORT flag)
|
||||
|
||||
|
||||
void EXE_receive(TDBB tdbb,
|
||||
JRD_REQ request,
|
||||
jrd_req* request,
|
||||
USHORT msg,
|
||||
USHORT length,
|
||||
UCHAR* buffer)
|
||||
@ -687,7 +687,7 @@ void EXE_receive(TDBB tdbb,
|
||||
|
||||
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
void EXE_seek(TDBB tdbb, JRD_REQ request, USHORT direction, ULONG offset)
|
||||
void EXE_seek(TDBB tdbb, jrd_req* request, USHORT direction, ULONG offset)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -726,7 +726,7 @@ void EXE_seek(TDBB tdbb, JRD_REQ request, USHORT direction, ULONG offset)
|
||||
|
||||
|
||||
void EXE_send(TDBB tdbb,
|
||||
JRD_REQ request,
|
||||
jrd_req* request,
|
||||
USHORT msg,
|
||||
USHORT length,
|
||||
UCHAR* buffer)
|
||||
@ -835,7 +835,7 @@ void EXE_send(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
void EXE_start(TDBB tdbb, JRD_REQ request, JRD_TRA transaction)
|
||||
void EXE_start(TDBB tdbb, jrd_req* request, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -941,7 +941,7 @@ void EXE_start(TDBB tdbb, JRD_REQ request, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void EXE_unwind(TDBB tdbb, JRD_REQ request)
|
||||
void EXE_unwind(TDBB tdbb, jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -962,9 +962,9 @@ void EXE_unwind(TDBB tdbb, JRD_REQ request)
|
||||
if (request->req_fors) {
|
||||
JrdMemoryPool *old_pool = tdbb->tdbb_default;
|
||||
tdbb->tdbb_default = request->req_pool;
|
||||
JRD_REQ old_request = tdbb->tdbb_request;
|
||||
jrd_req* old_request = tdbb->tdbb_request;
|
||||
tdbb->tdbb_request = request;
|
||||
JRD_TRA old_transaction = tdbb->tdbb_transaction;
|
||||
jrd_tra* old_transaction = tdbb->tdbb_transaction;
|
||||
tdbb->tdbb_transaction = request->req_transaction;
|
||||
|
||||
vec::iterator ptr, end;
|
||||
@ -1101,7 +1101,7 @@ inline void PreModifyEraseTriggers(TDBB tdbb,
|
||||
}
|
||||
int rpblevel = tdbb->tdbb_transaction->
|
||||
tra_rpblist->PushRpb(rpb);
|
||||
JRD_REQ trigger = execute_triggers(tdbb, trigs,
|
||||
jrd_req* trigger = execute_triggers(tdbb, trigs,
|
||||
rpb->rpb_record, rec, op);
|
||||
tdbb->tdbb_transaction->tra_rpblist->PopRpb(rpb, rpblevel);
|
||||
if (trigger) {
|
||||
@ -1265,7 +1265,7 @@ static JRD_NOD erase(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
|
||||
if (!relation->rel_file & !relation->rel_view_rse)
|
||||
{
|
||||
JRD_REL bad_relation;
|
||||
jrd_rel* bad_relation = 0;
|
||||
USHORT bad_index;
|
||||
|
||||
IDX_E error_code =
|
||||
@ -1320,8 +1320,8 @@ static JRD_NOD erase(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
|
||||
static void execute_looper(
|
||||
TDBB tdbb,
|
||||
JRD_REQ request,
|
||||
JRD_TRA transaction, enum jrd_req::req_s next_state)
|
||||
jrd_req* request,
|
||||
jrd_tra* transaction, enum jrd_req::req_s next_state)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1365,7 +1365,7 @@ static void execute_looper(
|
||||
}
|
||||
|
||||
|
||||
static void exec_sql(TDBB tdbb, JRD_REQ request, DSC* dsc)
|
||||
static void exec_sql(TDBB tdbb, jrd_req* request, DSC* dsc)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1467,7 +1467,7 @@ static void execute_procedure(TDBB tdbb, JRD_NOD node)
|
||||
out_msg = (SCHAR *) request + out_message->nod_impure;
|
||||
}
|
||||
|
||||
jrd_prc* procedure = (JRD_PRC) node->nod_arg[e_esp_procedure];
|
||||
jrd_prc* procedure = (jrd_prc*) node->nod_arg[e_esp_procedure];
|
||||
jrd_req* proc_request = EXE_find_request(tdbb, procedure->prc_request, false);
|
||||
|
||||
str* temp_buffer = NULL;
|
||||
@ -1549,7 +1549,7 @@ static void execute_procedure(TDBB tdbb, JRD_NOD node)
|
||||
}
|
||||
|
||||
|
||||
static JRD_REQ execute_triggers(TDBB tdbb,
|
||||
static jrd_req* execute_triggers(TDBB tdbb,
|
||||
TRIG_VEC* triggers,
|
||||
REC old_rec,
|
||||
REC new_rec,
|
||||
@ -1566,7 +1566,8 @@ static JRD_REQ execute_triggers(TDBB tdbb,
|
||||
* if any blow up.
|
||||
*
|
||||
**************************************/
|
||||
volatile JRD_REQ trigger = NULL;
|
||||
// It was volatile JRD_REQ trigger = NULL;
|
||||
jrd_req* volatile trigger = NULL;
|
||||
|
||||
//DEV_BLKCHK(*triggers, type_vec);
|
||||
DEV_BLKCHK(old_rec, type_rec);
|
||||
@ -1578,9 +1579,9 @@ static JRD_REQ execute_triggers(TDBB tdbb,
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_TRA transaction = tdbb->tdbb_request->req_transaction;
|
||||
jrd_tra* transaction = tdbb->tdbb_request->req_transaction;
|
||||
TRIG_VEC vector = *triggers;
|
||||
JRD_REQ result = NULL;
|
||||
jrd_req* result = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
@ -1639,7 +1640,7 @@ static JRD_NOD find(TDBB tdbb, JRD_NOD node)
|
||||
*
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
if (request->req_operation == jrd_req::req_evaluate)
|
||||
@ -1719,7 +1720,7 @@ static JRD_NOD find_dbkey(TDBB tdbb, JRD_NOD node)
|
||||
**************************************/
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
if (request->req_operation == jrd_req::req_evaluate)
|
||||
@ -1744,7 +1745,7 @@ static JRD_NOD find_dbkey(TDBB tdbb, JRD_NOD node)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static LCK implicit_record_lock(JRD_TRA transaction, RPB * rpb)
|
||||
static LCK implicit_record_lock(jrd_tra* transaction, RPB * rpb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1764,7 +1765,7 @@ static LCK implicit_record_lock(JRD_TRA transaction, RPB * rpb)
|
||||
|
||||
DEV_BLKCHK(transaction, type_tra);
|
||||
|
||||
JRD_REL relation = rpb->rpb_relation;
|
||||
jrd_rel* relation = rpb->rpb_relation;
|
||||
LCK record_locking = relation->rel_record_locking;
|
||||
|
||||
/* occasionally we should check whether we really still need to
|
||||
@ -1789,7 +1790,7 @@ static LCK implicit_record_lock(JRD_TRA transaction, RPB * rpb)
|
||||
#endif
|
||||
|
||||
|
||||
static JRD_NOD looper(TDBB tdbb, JRD_REQ request, JRD_NOD in_node)
|
||||
static JRD_NOD looper(TDBB tdbb, jrd_req* request, JRD_NOD in_node)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1839,7 +1840,7 @@ static JRD_NOD looper(TDBB tdbb, JRD_REQ request, JRD_NOD in_node)
|
||||
JrdMemoryPool* old_pool = tdbb->tdbb_default;
|
||||
tdbb->tdbb_default = request->req_pool;
|
||||
|
||||
JRD_REQ old_request = tdbb->tdbb_request;
|
||||
jrd_req* old_request = tdbb->tdbb_request;
|
||||
tdbb->tdbb_request = request;
|
||||
tdbb->tdbb_transaction = transaction;
|
||||
|
||||
@ -2993,7 +2994,7 @@ static JRD_NOD modify(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
else if (!relation->rel_view_rse)
|
||||
{
|
||||
USHORT bad_index;
|
||||
JRD_REL bad_relation;
|
||||
jrd_rel* bad_relation = 0;
|
||||
|
||||
VIO_modify(tdbb, org_rpb, new_rpb, transaction);
|
||||
|
||||
@ -3028,7 +3029,7 @@ static JRD_NOD modify(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
if (!relation->rel_file && !relation->rel_view_rse)
|
||||
{
|
||||
USHORT bad_index;
|
||||
JRD_REL bad_relation;
|
||||
jrd_rel* bad_relation = 0;
|
||||
|
||||
const IDX_E error_code = IDX_modify_check_constraints(tdbb,
|
||||
org_rpb,
|
||||
@ -3200,7 +3201,7 @@ static JRD_NOD receive_msg(TDBB tdbb, JRD_NOD node)
|
||||
}
|
||||
|
||||
|
||||
static void release_blobs(TDBB tdbb, JRD_REQ request)
|
||||
static void release_blobs(TDBB tdbb, jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3256,7 +3257,7 @@ static JRD_NOD release_bookmark(TDBB tdbb, JRD_NOD node)
|
||||
*
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
if (request->req_operation == jrd_req::req_evaluate) {
|
||||
@ -3269,7 +3270,7 @@ static JRD_NOD release_bookmark(TDBB tdbb, JRD_NOD node)
|
||||
#endif
|
||||
|
||||
|
||||
static void release_proc_save_points(JRD_REQ request)
|
||||
static void release_proc_save_points(jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3295,7 +3296,7 @@ static void release_proc_save_points(JRD_REQ request)
|
||||
|
||||
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
static JRD_NOD seek_rse(TDBB tdbb, JRD_REQ request, JRD_NOD node)
|
||||
static JRD_NOD seek_rse(TDBB tdbb, jrd_req* request, JRD_NOD node)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3336,7 +3337,7 @@ static JRD_NOD seek_rse(TDBB tdbb, JRD_REQ request, JRD_NOD node)
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
static void seek_rsb(
|
||||
TDBB tdbb,
|
||||
JRD_REQ request, RSB rsb, USHORT direction, SLONG offset)
|
||||
jrd_req* request, RSB rsb, USHORT direction, SLONG offset)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3652,7 +3653,7 @@ static void set_error(TDBB tdbb, const xcp_repeat* exception, JRD_NOD msg_node)
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
if (!exception) {
|
||||
// retrieve the status vector and punt
|
||||
@ -3829,19 +3830,19 @@ static JRD_NOD store(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
* Execute a STORE statement.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ trigger;
|
||||
jrd_req* trigger;
|
||||
REC record;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
BLKCHK(node, type_nod);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
JRD_TRA transaction = request->req_transaction;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
jrd_tra* transaction = request->req_transaction;
|
||||
STA impure = (STA) ((SCHAR *) request + node->nod_impure);
|
||||
SSHORT stream = (USHORT)(ULONG) node->nod_arg[e_sto_relation]->nod_arg[e_rel_stream];
|
||||
RPB* rpb = &request->req_rpb[stream];
|
||||
JRD_REL relation = rpb->rpb_relation;
|
||||
jrd_rel* relation = rpb->rpb_relation;
|
||||
|
||||
switch (request->req_operation) {
|
||||
case jrd_req::req_evaluate:
|
||||
@ -3885,7 +3886,7 @@ static JRD_NOD store(TDBB tdbb, JRD_NOD node, SSHORT which_trig)
|
||||
else if (!relation->rel_view_rse)
|
||||
{
|
||||
USHORT bad_index;
|
||||
JRD_REL bad_relation;
|
||||
jrd_rel* bad_relation = 0;
|
||||
|
||||
VIO_store(tdbb, rpb, transaction);
|
||||
IDX_E error_code = IDX_store(tdbb,
|
||||
@ -4018,7 +4019,7 @@ static JRD_NOD stream(TDBB tdbb, JRD_NOD node)
|
||||
#endif
|
||||
|
||||
|
||||
static bool test_and_fixup_error(TDBB tdbb, XCP conditions, JRD_REQ request)
|
||||
static bool test_and_fixup_error(TDBB tdbb, XCP conditions, jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4082,7 +4083,7 @@ static bool test_and_fixup_error(TDBB tdbb, XCP conditions, JRD_REQ request)
|
||||
}
|
||||
|
||||
|
||||
static void trigger_failure(TDBB tdbb, JRD_REQ trigger)
|
||||
static void trigger_failure(TDBB tdbb, jrd_req* trigger)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -128,7 +128,7 @@ void EXT_erase(RPB * rpb, int *transaction)
|
||||
}
|
||||
|
||||
|
||||
EXT EXT_file(JRD_REL relation, const TEXT * file_name, SLONG * description)
|
||||
EXT EXT_file(jrd_rel* relation, const TEXT * file_name, SLONG * description)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -196,7 +196,7 @@ EXT EXT_file(JRD_REL relation, const TEXT * file_name, SLONG * description)
|
||||
}
|
||||
|
||||
|
||||
void EXT_fini(JRD_REL relation)
|
||||
void EXT_fini(jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -276,7 +276,7 @@ int EXT_get(RSB rsb)
|
||||
for (vec::iterator itr = relation->rel_fields->begin();
|
||||
i < format->fmt_count; ++i, ++itr, ++desc_ptr)
|
||||
{
|
||||
const jrd_fld* field = (JRD_FLD) (*itr);
|
||||
const jrd_fld* field = (jrd_fld*) (*itr);
|
||||
SET_NULL(record, i);
|
||||
if (!desc_ptr->dsc_length || !field)
|
||||
continue;
|
||||
@ -411,7 +411,7 @@ if (opt->opt_count)
|
||||
}
|
||||
|
||||
|
||||
void EXT_ready(JRD_REL relation)
|
||||
void EXT_ready(jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -469,7 +469,7 @@ void EXT_store(RPB * rpb, int *transaction)
|
||||
|
||||
for (USHORT i = 0; i < format->fmt_count; i++, field_ptr++, desc_ptr++)
|
||||
{
|
||||
const jrd_fld* field = (JRD_FLD)*field_ptr;
|
||||
const jrd_fld* field = (jrd_fld*) *field_ptr;
|
||||
if (field &&
|
||||
!field->fld_computation &&
|
||||
desc_ptr->dsc_length &&
|
||||
@ -509,7 +509,7 @@ void EXT_store(RPB * rpb, int *transaction)
|
||||
}
|
||||
|
||||
|
||||
void EXT_trans_commit(JRD_TRA transaction)
|
||||
void EXT_trans_commit(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -524,7 +524,7 @@ void EXT_trans_commit(JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void EXT_trans_prepare(JRD_TRA transaction)
|
||||
void EXT_trans_prepare(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -539,7 +539,7 @@ void EXT_trans_prepare(JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void EXT_trans_rollback(JRD_TRA transaction)
|
||||
void EXT_trans_rollback(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -554,7 +554,7 @@ void EXT_trans_rollback(JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void EXT_trans_start(JRD_TRA transaction)
|
||||
void EXT_trans_start(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -30,7 +30,7 @@
|
||||
* 2003.08.10 Claudio Valderrama: Fix SF Bugs #544132 and #728839.
|
||||
*/
|
||||
/*
|
||||
$Id: fun.epp,v 1.30 2003-12-31 05:35:52 robocop Exp $
|
||||
$Id: fun.epp,v 1.31 2004-01-03 10:59:40 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -151,7 +151,7 @@ void FUN_evaluate(FUN function, JRD_NOD node, VLU value)
|
||||
LLS blob_stack = 0;
|
||||
LLS array_stack = 0;
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
// CVC: restoring the null flag seems like a Borland hack to try to
|
||||
// patch a bug with null handling. There's no evident reason to restore it
|
||||
// because EVL_expr() resets it every time it's called. Kept it for now.
|
||||
|
@ -441,7 +441,8 @@ void gds__ulstr(char* buffer, ULONG value, const int minlen, const char filler)
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__decode(ISC_STATUS code, USHORT* fac, USHORT* class_)
|
||||
ISC_STATUS API_ROUTINE gds__decode(ISC_STATUS code, USHORT* fac, USHORT*
|
||||
code_class)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -466,7 +467,7 @@ ISC_STATUS API_ROUTINE gds__decode(ISC_STATUS code, USHORT* fac, USHORT* class_)
|
||||
}
|
||||
|
||||
*fac = GET_FACILITY(code);
|
||||
*class_ = GET_CLASS(code);
|
||||
*code_class = GET_CLASS(code);
|
||||
return GET_CODE(code);
|
||||
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ static void delete_security_class( TDBB tdbb, TEXT * s_class)
|
||||
ERASE CLS;
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
}
|
||||
#endif // NOT_USED_OR_REPLACED
|
||||
|
||||
@ -969,7 +969,7 @@ TEXT * relation_name, TEXT * owner, USHORT public_priv, ULONG * length_ptr)
|
||||
REQUEST(irq_grant6) = request;
|
||||
|
||||
if (request2)
|
||||
CMP_release(tdbb, (JRD_REQ)request2);
|
||||
CMP_release(tdbb, (jrd_req*)request2);
|
||||
|
||||
/* flush out the last user's info */
|
||||
|
||||
|
@ -77,18 +77,19 @@ typedef struct ifl {
|
||||
USHORT ifl_key_length;
|
||||
} *IFL;
|
||||
|
||||
static IDX_E check_duplicates(TDBB, REC, IDX *, IIB *, JRD_REL);
|
||||
static IDX_E check_foreign_key(TDBB, REC, JRD_REL, JRD_TRA, IDX *, JRD_REL *, USHORT *);
|
||||
static IDX_E check_partner_index(TDBB, JRD_REL, REC, JRD_TRA, IDX *, JRD_REL, SSHORT);
|
||||
static IDX_E check_duplicates(TDBB, REC, IDX *, IIB *, jrd_rel*);
|
||||
static IDX_E check_foreign_key(TDBB, REC, jrd_rel*, jrd_tra*, IDX *, jrd_rel**, USHORT *);
|
||||
static IDX_E check_partner_index(TDBB, jrd_rel*, REC, jrd_tra*, IDX *, jrd_rel*, SSHORT);
|
||||
static bool duplicate_key(const UCHAR*, const UCHAR*, void*);
|
||||
static SLONG get_root_page(TDBB, JRD_REL);
|
||||
static SLONG get_root_page(TDBB, jrd_rel*);
|
||||
static int index_block_flush(void *ast_object);
|
||||
static IDX_E insert_key(TDBB, JRD_REL, REC, JRD_TRA, WIN *, IIB *, JRD_REL *, USHORT *);
|
||||
static IDX_E insert_key(TDBB, jrd_rel*, REC, jrd_tra*, WIN *, IIB *, jrd_rel**, USHORT *);
|
||||
static bool key_equal(const KEY*, const KEY*);
|
||||
static void signal_index_deletion(TDBB, JRD_REL, USHORT);
|
||||
static void signal_index_deletion(TDBB, jrd_rel*, USHORT);
|
||||
|
||||
|
||||
void IDX_check_access(TDBB tdbb, CSB csb, JRD_REL view, JRD_REL relation, JRD_FLD field)
|
||||
void IDX_check_access(TDBB tdbb, CSB csb, jrd_rel* view, jrd_rel* relation,
|
||||
jrd_fld* field)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -162,11 +163,11 @@ void IDX_check_access(TDBB tdbb, CSB csb, JRD_REL view, JRD_REL relation, JRD_FL
|
||||
|
||||
void IDX_create_index(
|
||||
TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
IDX* idx,
|
||||
const TEXT* index_name,
|
||||
USHORT* index_id,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
SelectivityList& selectivity)
|
||||
{
|
||||
/**************************************
|
||||
@ -436,7 +437,7 @@ void IDX_create_index(
|
||||
}
|
||||
|
||||
|
||||
IDB IDX_create_index_block(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
IDB IDX_create_index_block(TDBB tdbb, jrd_rel* relation, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -481,7 +482,7 @@ IDB IDX_create_index_block(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
}
|
||||
|
||||
|
||||
void IDX_delete_index(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
void IDX_delete_index(TDBB tdbb, jrd_rel* relation, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -504,7 +505,7 @@ void IDX_delete_index(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
}
|
||||
|
||||
|
||||
void IDX_delete_indices(TDBB tdbb, JRD_REL relation)
|
||||
void IDX_delete_indices(TDBB tdbb, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -535,7 +536,7 @@ void IDX_delete_indices(TDBB tdbb, JRD_REL relation)
|
||||
|
||||
IDX_E IDX_erase(TDBB tdbb,
|
||||
RPB * rpb,
|
||||
JRD_TRA transaction, JRD_REL * bad_relation, USHORT * bad_index)
|
||||
jrd_tra* transaction, jrd_rel** bad_relation, USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -648,7 +649,7 @@ void IDX_garbage_collect(TDBB tdbb, RPB * rpb, LLS going, LLS staying)
|
||||
IDX_E IDX_modify(TDBB tdbb,
|
||||
RPB * org_rpb,
|
||||
RPB * new_rpb,
|
||||
JRD_TRA transaction, JRD_REL * bad_relation, USHORT * bad_index)
|
||||
jrd_tra* transaction, jrd_rel** bad_relation, USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -704,8 +705,8 @@ IDX_E IDX_modify(TDBB tdbb,
|
||||
IDX_E IDX_modify_check_constraints(TDBB tdbb,
|
||||
RPB * org_rpb,
|
||||
RPB * new_rpb,
|
||||
JRD_TRA transaction,
|
||||
JRD_REL * bad_relation, USHORT * bad_index)
|
||||
jrd_tra* transaction,
|
||||
jrd_rel** bad_relation, USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -777,7 +778,7 @@ IDX_E IDX_modify_check_constraints(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
void IDX_statistics(TDBB tdbb, JRD_REL relation, USHORT id, SelectivityList& selectivity)
|
||||
void IDX_statistics(TDBB tdbb, jrd_rel* relation, USHORT id, SelectivityList& selectivity)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -799,7 +800,7 @@ void IDX_statistics(TDBB tdbb, JRD_REL relation, USHORT id, SelectivityList& sel
|
||||
|
||||
IDX_E IDX_store(TDBB tdbb,
|
||||
RPB * rpb,
|
||||
JRD_TRA transaction, JRD_REL * bad_relation, USHORT * bad_index)
|
||||
jrd_tra* transaction, jrd_rel** bad_relation, USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -856,7 +857,7 @@ static IDX_E check_duplicates(
|
||||
TDBB tdbb,
|
||||
REC record,
|
||||
IDX * record_idx,
|
||||
IIB * insertion, JRD_REL relation_2)
|
||||
IIB * insertion, jrd_rel* relation_2)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -881,7 +882,7 @@ static IDX_E check_duplicates(
|
||||
rpb.rpb_relation = insertion->iib_relation;
|
||||
rpb.rpb_record = NULL;
|
||||
rpb.rpb_window.win_flags = 0;
|
||||
JRD_REL relation_1 = insertion->iib_relation;
|
||||
jrd_rel* relation_1 = insertion->iib_relation;
|
||||
|
||||
while (SBM_next
|
||||
(insertion->iib_duplicates, &rpb.rpb_number, RSE_get_forward))
|
||||
@ -935,8 +936,9 @@ static IDX_E check_duplicates(
|
||||
field_id = record_idx->idx_rpt[i].idx_field;
|
||||
const bool flag_2 = EVL_field(relation_2, record, field_id, &desc2);
|
||||
|
||||
if (flag != flag_2 || MOV_compare(&desc1, &desc2) != 0)
|
||||
if (flag != flag_2 || MOV_compare(&desc1, &desc2) != 0) {
|
||||
break;
|
||||
}
|
||||
all_nulls = all_nulls && !flag && !flag_2;
|
||||
}
|
||||
|
||||
@ -957,10 +959,10 @@ static IDX_E check_duplicates(
|
||||
static IDX_E check_foreign_key(
|
||||
TDBB tdbb,
|
||||
REC record,
|
||||
JRD_REL relation,
|
||||
JRD_TRA transaction,
|
||||
jrd_rel* relation,
|
||||
jrd_tra* transaction,
|
||||
IDX * idx,
|
||||
JRD_REL * bad_relation, USHORT * bad_index)
|
||||
jrd_rel** bad_relation, USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -975,7 +977,7 @@ JRD_REL * bad_relation, USHORT * bad_index)
|
||||
*
|
||||
**************************************/
|
||||
int index_number;
|
||||
JRD_REL partner_relation;
|
||||
jrd_rel* partner_relation;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
@ -1011,7 +1013,9 @@ JRD_REL * bad_relation, USHORT * bad_index)
|
||||
if ( (result =
|
||||
check_partner_index(tdbb, relation, record, transaction, idx,
|
||||
partner_relation, index_id)) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1032,11 +1036,11 @@ JRD_REL * bad_relation, USHORT * bad_index)
|
||||
|
||||
static IDX_E check_partner_index(
|
||||
TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
REC record,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
IDX * idx,
|
||||
JRD_REL partner_relation, SSHORT index_id)
|
||||
jrd_rel* partner_relation, SSHORT index_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1115,8 +1119,9 @@ static IDX_E check_partner_index(
|
||||
result = result ? idx_e_ok : idx_e_foreign;
|
||||
SBM_release(bitmap);
|
||||
}
|
||||
else if (idx->idx_flags & idx_foreign)
|
||||
else if (idx->idx_flags & idx_foreign) {
|
||||
result = idx_e_foreign;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -1151,7 +1156,7 @@ static bool duplicate_key(const UCHAR* record1, const UCHAR* record2, void* ifl_
|
||||
}
|
||||
|
||||
|
||||
static SLONG get_root_page(TDBB tdbb, JRD_REL relation)
|
||||
static SLONG get_root_page(TDBB tdbb, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1200,8 +1205,9 @@ static int index_block_flush(void *ast_object)
|
||||
|
||||
LCK lock = index_block->idb_lock;
|
||||
|
||||
if (lock->lck_attachment)
|
||||
if (lock->lck_attachment) {
|
||||
tdbb->tdbb_database = lock->lck_attachment->att_database;
|
||||
}
|
||||
tdbb->tdbb_attachment = lock->lck_attachment;
|
||||
tdbb->tdbb_quantum = QUANTUM;
|
||||
tdbb->tdbb_request = NULL;
|
||||
@ -1210,8 +1216,9 @@ static int index_block_flush(void *ast_object)
|
||||
/* release the index expression request, which also has
|
||||
the effect of releasing the expression tree */
|
||||
|
||||
if (index_block->idb_expression_request)
|
||||
if (index_block->idb_expression_request) {
|
||||
CMP_release(tdbb, index_block->idb_expression_request);
|
||||
}
|
||||
|
||||
index_block->idb_expression_request = NULL;
|
||||
index_block->idb_expression = NULL;
|
||||
@ -1229,12 +1236,12 @@ static int index_block_flush(void *ast_object)
|
||||
|
||||
static IDX_E insert_key(
|
||||
TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
REC record,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
WIN * window_ptr,
|
||||
IIB * insertion,
|
||||
JRD_REL * bad_relation,
|
||||
jrd_rel** bad_relation,
|
||||
USHORT * bad_index)
|
||||
{
|
||||
/**************************************
|
||||
@ -1266,8 +1273,9 @@ static IDX_E insert_key(
|
||||
SBM_release(insertion->iib_duplicates);
|
||||
}
|
||||
|
||||
if (result != idx_e_ok)
|
||||
if (result != idx_e_ok) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* if we are dealing with a foreign key index,
|
||||
check for an insert into the corresponding
|
||||
@ -1323,7 +1331,7 @@ static bool key_equal(const KEY* key1, const KEY* key2)
|
||||
}
|
||||
|
||||
|
||||
static void signal_index_deletion(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
static void signal_index_deletion(TDBB tdbb, jrd_rel* relation, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1364,10 +1372,12 @@ static void signal_index_deletion(TDBB tdbb, JRD_REL relation, USHORT id)
|
||||
|
||||
/* signal other processes to clear out the index block */
|
||||
|
||||
if (lock->lck_physical == LCK_SR)
|
||||
if (lock->lck_physical == LCK_SR) {
|
||||
LCK_convert_non_blocking(tdbb, lock, LCK_EX, TRUE);
|
||||
else
|
||||
}
|
||||
else {
|
||||
LCK_lock_non_blocking(tdbb, lock, LCK_EX, TRUE);
|
||||
}
|
||||
|
||||
/* and clear out our index block as well */
|
||||
|
||||
|
@ -220,7 +220,7 @@ int INF_database_info(const SCHAR* items,
|
||||
WAL_segment = dbb->dbb_wal->wal_segment;
|
||||
else
|
||||
WAL_segment = NULL;
|
||||
JRD_TRA transaction = NULL;
|
||||
jrd_tra* transaction = NULL;
|
||||
const SCHAR* const end_items = items + item_length;
|
||||
const SCHAR* const end = info + output_length;
|
||||
|
||||
|
@ -337,8 +337,8 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
END_STORE;
|
||||
}
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (JRD_REQ)handle2);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle2);
|
||||
handle1 = handle2 = NULL;
|
||||
|
||||
/* Store global FIELDS */
|
||||
@ -348,7 +348,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
store_global_field(tdbb, gfield, &handle1);
|
||||
}
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
handle1 = NULL;
|
||||
|
||||
STORE(REQUEST_HANDLE handle1) X IN RDB$DATABASE
|
||||
@ -364,7 +364,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
}
|
||||
END_STORE
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
handle1 = NULL;
|
||||
|
||||
/* Create indices for system relations */
|
||||
@ -384,7 +384,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
END_STORE;
|
||||
}
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
/* Store symbols for international character sets & collations */
|
||||
|
||||
@ -397,7 +397,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
{
|
||||
store_generator(tdbb, generator, &handle1);
|
||||
}
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
/* store system-defined triggers */
|
||||
|
||||
@ -406,7 +406,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
{
|
||||
store_trigger(tdbb, trigger, &handle1);
|
||||
}
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
/* store trigger messages to go with triggers */
|
||||
|
||||
@ -415,7 +415,7 @@ void INI_format(const TEXT* owner, const TEXT* charset)
|
||||
{
|
||||
store_message(tdbb, message, &handle1);
|
||||
}
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
DFW_perform_system_work();
|
||||
|
||||
@ -505,9 +505,8 @@ void INI_init(void)
|
||||
*
|
||||
**************************************/
|
||||
DBB dbb;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
FMT format;
|
||||
JRD_FLD field;
|
||||
VEC formats;
|
||||
VEC fields;
|
||||
int n;
|
||||
@ -548,7 +547,6 @@ void INI_init(void)
|
||||
}
|
||||
|
||||
relation->rel_fields = fields = vec::newVector(*dbb->dbb_permanent, n);
|
||||
//field = (JRD_FLD *) fields->vec_object;
|
||||
itr = fields->begin();
|
||||
relation->rel_current_format = format = fmt::newFmt(*dbb->dbb_permanent, n);
|
||||
relation->rel_formats = formats = vec::newVector(*dbb->dbb_permanent, 1);
|
||||
@ -562,7 +560,8 @@ void INI_init(void)
|
||||
gfield = &gfields[fld_[RFLD_F_ID]];
|
||||
desc->dsc_length = gfield->gfld_length;
|
||||
desc->dsc_dtype = gfield->gfld_dtype;
|
||||
*itr = field = FB_NEW_RPT(*dbb->dbb_permanent,0) jrd_fld();
|
||||
jrd_fld* field = FB_NEW_RPT(*dbb->dbb_permanent,0) jrd_fld();
|
||||
*itr = field;
|
||||
field->fld_name = names[fld_[RFLD_F_NAME]];
|
||||
field->fld_length = strlen(field->fld_name);
|
||||
}
|
||||
@ -584,7 +583,7 @@ void INI_init2(void)
|
||||
* the database when it was created.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
FMT format;
|
||||
int n;
|
||||
const UCHAR* relfld;
|
||||
@ -610,7 +609,7 @@ void INI_init2(void)
|
||||
**
|
||||
******************************************************/
|
||||
id = relfld[RFLD_R_ID];
|
||||
relation = (JRD_REL)(*vector)[id];
|
||||
relation = (jrd_rel*)(*vector)[id];
|
||||
delete relation->rel_current_format;
|
||||
delete relation->rel_formats;
|
||||
delete relation->rel_fields;
|
||||
@ -703,7 +702,7 @@ void INI_init2(void)
|
||||
}
|
||||
|
||||
|
||||
const jrd_trg* INI_lookup_sys_trigger(JRD_REL relation,
|
||||
const jrd_trg* INI_lookup_sys_trigger(jrd_rel* relation,
|
||||
const jrd_trg* trigger,
|
||||
const UCHAR** blr,
|
||||
UCHAR* trigger_type,
|
||||
@ -904,7 +903,7 @@ static void add_global_fields( USHORT minor_version)
|
||||
}
|
||||
|
||||
if (handle) {
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
}
|
||||
|
||||
DFW_perform_system_work();
|
||||
@ -928,13 +927,13 @@ static void add_index_set(DBB dbb,
|
||||
* ODS (major_version,minor_version).
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
TEXT string[32];
|
||||
const ini_idx_t::ini_idx_segment_t* segment;
|
||||
IDX idx;
|
||||
idx::idx_repeat* tail;
|
||||
USHORT position;
|
||||
JRD_FLD field;
|
||||
jrd_fld* field;
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
BLK handle1 = NULL;
|
||||
@ -980,7 +979,7 @@ static void add_index_set(DBB dbb,
|
||||
segment = &index->ini_idx_segment[position];
|
||||
STORE(REQUEST_HANDLE handle2) Y IN RDB$INDEX_SEGMENTS
|
||||
field =
|
||||
(JRD_FLD) (*relation->rel_fields)[segment->ini_idx_rfld_id];
|
||||
(jrd_fld*) (*relation->rel_fields)[segment->ini_idx_rfld_id];
|
||||
|
||||
Y.RDB$FIELD_POSITION = position;
|
||||
PAD(X.RDB$INDEX_NAME, Y.RDB$INDEX_NAME);
|
||||
@ -999,10 +998,10 @@ static void add_index_set(DBB dbb,
|
||||
|
||||
}
|
||||
if (handle1) {
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
}
|
||||
if (handle2) {
|
||||
CMP_release(tdbb, (JRD_REQ)handle2);
|
||||
CMP_release(tdbb, (jrd_req*)handle2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1048,10 +1047,10 @@ static void add_new_triggers(USHORT major_version, USHORT minor_version)
|
||||
}
|
||||
|
||||
if (handle1) {
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
}
|
||||
if (handle2) {
|
||||
CMP_release(tdbb, (JRD_REQ)handle2);
|
||||
CMP_release(tdbb, (jrd_req*)handle2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1108,10 +1107,10 @@ static void add_relation_fields( USHORT minor_version)
|
||||
}
|
||||
|
||||
if (s_handle) {
|
||||
CMP_release(tdbb, (JRD_REQ)s_handle);
|
||||
CMP_release(tdbb, (jrd_req*)s_handle);
|
||||
}
|
||||
if (m_handle) {
|
||||
CMP_release(tdbb, (JRD_REQ)m_handle);
|
||||
CMP_release(tdbb, (jrd_req*)m_handle);
|
||||
}
|
||||
|
||||
DFW_perform_system_work();
|
||||
@ -1211,7 +1210,7 @@ static void add_security_to_sys_rel(TDBB tdbb,
|
||||
PRIV.RDB$OBJECT_TYPE = obj_relation;
|
||||
END_STORE;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
}
|
||||
|
||||
handle1 = NULL;
|
||||
@ -1223,7 +1222,7 @@ static void add_security_to_sys_rel(TDBB tdbb,
|
||||
CLS.RDB$ACL = blob_id_1;
|
||||
END_STORE;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
handle1 = NULL;
|
||||
|
||||
@ -1234,7 +1233,7 @@ static void add_security_to_sys_rel(TDBB tdbb,
|
||||
CLS.RDB$ACL = blob_id_2;
|
||||
END_STORE;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
handle1 = NULL;
|
||||
|
||||
@ -1248,7 +1247,7 @@ static void add_security_to_sys_rel(TDBB tdbb,
|
||||
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle1);
|
||||
CMP_release(tdbb, (jrd_req*)handle1);
|
||||
|
||||
}
|
||||
|
||||
@ -1511,7 +1510,7 @@ static void store_intlnames(TDBB tdbb, DBB dbb)
|
||||
END_STORE;
|
||||
}
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
handle = NULL;
|
||||
|
||||
for (const COLL_TYPE* collptr = coll_types; collptr->init_collation_name; collptr++)
|
||||
@ -1524,7 +1523,7 @@ static void store_intlnames(TDBB tdbb, DBB dbb)
|
||||
END_STORE;
|
||||
}
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ)handle);
|
||||
CMP_release(tdbb, (jrd_req*)handle);
|
||||
handle = NULL;
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ typedef struct itm {
|
||||
SSHORT *itm_return_length;
|
||||
} ITM;
|
||||
|
||||
typedef struct event {
|
||||
typedef struct event_t {
|
||||
SLONG event_pid;
|
||||
SLONG event_count;
|
||||
} EVENT_T, *EVENT;
|
||||
} *EVENT;
|
||||
|
||||
typedef struct wait {
|
||||
USHORT wait_count;
|
||||
@ -113,20 +113,20 @@ typedef struct mtx {
|
||||
|
||||
|
||||
#ifdef ANY_THREADING
|
||||
typedef struct event
|
||||
typedef struct event_t
|
||||
{
|
||||
SLONG event_semid;
|
||||
SLONG event_count;
|
||||
THD_MUTEX_STRUCT event_mutex[1];
|
||||
THD_COND_STRUCT event_semnum[1];
|
||||
} EVENT_T, *EVENT;
|
||||
} *EVENT;
|
||||
#else
|
||||
typedef struct event
|
||||
typedef struct event_t
|
||||
{
|
||||
SLONG event_semid;
|
||||
SLONG event_count;
|
||||
SSHORT event_semnum;
|
||||
} EVENT_T, *EVENT;
|
||||
} *EVENT;
|
||||
#endif /* ANY_THREADING */
|
||||
|
||||
|
||||
@ -149,14 +149,14 @@ typedef struct mtx
|
||||
void* mtx_handle;
|
||||
} MTX_T, *MTX;
|
||||
|
||||
typedef struct event
|
||||
typedef struct event_t
|
||||
{
|
||||
SLONG event_pid;
|
||||
SLONG event_count;
|
||||
SLONG event_type;
|
||||
void* event_handle;
|
||||
struct event* event_shared;
|
||||
} EVENT_T, *EVENT;
|
||||
struct event_t* event_shared;
|
||||
} *EVENT;
|
||||
|
||||
#define SH_MEM_STRUCTURE_DEFINED
|
||||
typedef struct sh_mem
|
||||
|
@ -32,16 +32,16 @@
|
||||
#include "../jrd/isc.h"
|
||||
|
||||
BOOLEAN ISC_check_restart(void);
|
||||
int ISC_event_blocked(USHORT, struct event **, SLONG *);
|
||||
SLONG ISC_event_clear(struct event *);
|
||||
void ISC_event_fini(struct event *);
|
||||
int ISC_event_init(struct event *, int, int);
|
||||
int ISC_event_blocked(USHORT, struct event_t **, SLONG *);
|
||||
SLONG ISC_event_clear(struct event_t *);
|
||||
void ISC_event_fini(struct event_t *);
|
||||
int ISC_event_init(struct event_t *, int, int);
|
||||
|
||||
#if defined(WIN_NT)
|
||||
int ISC_event_init_shared(struct event*, int, const TEXT*, struct event*, bool);
|
||||
int ISC_event_init_shared(struct event_t*, int, const TEXT*, struct event_t*, bool);
|
||||
#endif
|
||||
int ISC_event_post(struct event *);
|
||||
int ISC_event_wait(SSHORT, struct event **, SLONG *, SLONG, FPTR_VOID_PTR, void *);
|
||||
int ISC_event_post(struct event_t *);
|
||||
int ISC_event_wait(SSHORT, struct event_t **, SLONG *, SLONG, FPTR_VOID_PTR, void *);
|
||||
|
||||
#ifdef WIN_NT
|
||||
void* ISC_make_signal(BOOLEAN, BOOLEAN, int, int);
|
||||
|
@ -1286,9 +1286,7 @@ int ISC_event_wait(SSHORT count,
|
||||
* Wait on an event.
|
||||
*
|
||||
**************************************/
|
||||
|
||||
EVENT *ptr, *end;
|
||||
HANDLE handles[16], *handle_ptr;
|
||||
HANDLE handles[16];
|
||||
|
||||
/* If we're not blocked, the rest is a gross waste of time */
|
||||
|
||||
@ -1296,7 +1294,9 @@ int ISC_event_wait(SSHORT count,
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (ptr = events, end = events + count, handle_ptr = handles; ptr < end;) {
|
||||
HANDLE* handle_ptr = handles;
|
||||
event_t** ptr = events;
|
||||
for (const event_t* const* const end = events + count; ptr < end;) {
|
||||
*handle_ptr++ = (*ptr++)->event_handle;
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ void trig::compile(tdbb* _tdbb)
|
||||
{
|
||||
SET_TDBB(_tdbb);
|
||||
|
||||
compile_in_progress = TRUE;
|
||||
compile_in_progress = true;
|
||||
JrdMemoryPool* old_pool = _tdbb->tdbb_default,
|
||||
*new_pool = JrdMemoryPool::createPool();
|
||||
/* Allocate statement memory pool */
|
||||
@ -241,7 +241,7 @@ void trig::compile(tdbb* _tdbb)
|
||||
}
|
||||
catch (const std::exception&) {
|
||||
_tdbb->tdbb_default = old_pool;
|
||||
compile_in_progress = FALSE;
|
||||
compile_in_progress = false;
|
||||
if (request) {
|
||||
CMP_release(_tdbb,request);
|
||||
request = NULL;
|
||||
@ -253,13 +253,13 @@ void trig::compile(tdbb* _tdbb)
|
||||
_tdbb->tdbb_default = old_pool;
|
||||
|
||||
if (name)
|
||||
request->req_trg_name = (TEXT *)name->str_data;
|
||||
request->req_trg_name = (const TEXT*)name->str_data;
|
||||
if (sys_trigger)
|
||||
request->req_flags |= req_sys_trigger;
|
||||
if (flags & TRG_ignore_perm)
|
||||
request->req_flags |= req_ignore_perm;
|
||||
|
||||
compile_in_progress = FALSE;
|
||||
compile_in_progress = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,12 +355,12 @@ typedef struct dpb
|
||||
static BLB check_blob(TDBB, ISC_STATUS*, BLB*);
|
||||
static ISC_STATUS check_database(TDBB, ATT, ISC_STATUS*);
|
||||
static void cleanup(void*);
|
||||
static ISC_STATUS commit(ISC_STATUS*, JRD_TRA*, const bool);
|
||||
static ISC_STATUS commit(ISC_STATUS*, jrd_tra**, const bool);
|
||||
static STR copy_string(const TEXT*, const USHORT);
|
||||
static bool drop_files(const fil*);
|
||||
static ISC_STATUS error(ISC_STATUS*);
|
||||
static void find_intl_charset(TDBB, ATT, const DPB*);
|
||||
static JRD_TRA find_transaction(TDBB, JRD_TRA, ISC_STATUS);
|
||||
static jrd_tra* find_transaction(TDBB, jrd_tra*, ISC_STATUS);
|
||||
static void get_options(const UCHAR*, USHORT, TEXT**, ULONG, DPB*);
|
||||
static SLONG get_parameter(const UCHAR**);
|
||||
static TEXT* get_string_parameter(const UCHAR**, TEXT**, ULONG*);
|
||||
@ -380,10 +380,10 @@ static BOOLEAN handler_NT(SSHORT);
|
||||
static DBB init(TDBB, ISC_STATUS*, const TEXT*, bool);
|
||||
static void make_jrn_data(UCHAR*, USHORT*, const TEXT*, USHORT,
|
||||
const TEXT*, USHORT);
|
||||
static ISC_STATUS prepare(TDBB, JRD_TRA, ISC_STATUS*, USHORT, const UCHAR*);
|
||||
static ISC_STATUS prepare(TDBB, jrd_tra*, ISC_STATUS*, USHORT, const UCHAR*);
|
||||
static void release_attachment(ATT);
|
||||
static ISC_STATUS return_success(TDBB);
|
||||
static BOOLEAN rollback(TDBB, JRD_TRA, ISC_STATUS*, const bool);
|
||||
static BOOLEAN rollback(TDBB, jrd_tra*, ISC_STATUS*, const bool);
|
||||
|
||||
static void shutdown_database(DBB, const bool);
|
||||
static void strip_quotes(const TEXT*, TEXT*);
|
||||
@ -417,7 +417,7 @@ IHNDL internal_db_handles = 0;
|
||||
// do it here to prevent committing every record update
|
||||
// in a statement
|
||||
//
|
||||
static void check_autocommit(JRD_REQ request, struct tdbb* tdbb)
|
||||
static void check_autocommit(jrd_req* request, struct tdbb* tdbb)
|
||||
{
|
||||
/* dimitr: we should ignore autocommit for requests
|
||||
created by EXECUTE STATEMENT */
|
||||
@ -1607,7 +1607,7 @@ ISC_STATUS GDS_CLOSE_BLOB(ISC_STATUS * user_status, BLB * blob_handle)
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS GDS_COMMIT(ISC_STATUS * user_status, JRD_TRA * tra_handle)
|
||||
ISC_STATUS GDS_COMMIT(ISC_STATUS * user_status, jrd_tra** tra_handle)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1631,7 +1631,7 @@ ISC_STATUS GDS_COMMIT(ISC_STATUS * user_status, JRD_TRA * tra_handle)
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS GDS_COMMIT_RETAINING(ISC_STATUS * user_status, JRD_TRA * tra_handle)
|
||||
ISC_STATUS GDS_COMMIT_RETAINING(ISC_STATUS * user_status, jrd_tra** tra_handle)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1652,7 +1652,7 @@ ISC_STATUS GDS_COMMIT_RETAINING(ISC_STATUS * user_status, JRD_TRA * tra_handle)
|
||||
|
||||
ISC_STATUS GDS_COMPILE(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_REQ* req_handle,
|
||||
jrd_req** req_handle,
|
||||
SSHORT blr_length,
|
||||
const SCHAR* blr)
|
||||
{
|
||||
@ -1708,7 +1708,7 @@ ISC_STATUS GDS_COMPILE(ISC_STATUS* user_status,
|
||||
|
||||
ISC_STATUS GDS_CREATE_BLOB2(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
BLB* blob_handle,
|
||||
BID blob_id,
|
||||
USHORT bpb_length,
|
||||
@ -1724,7 +1724,7 @@ ISC_STATUS GDS_CREATE_BLOB2(ISC_STATUS* user_status,
|
||||
* Open an existing blob.
|
||||
*
|
||||
**************************************/
|
||||
JRD_TRA transaction;
|
||||
jrd_tra* transaction;
|
||||
BLB blob;
|
||||
struct tdbb thd_context;
|
||||
|
||||
@ -2191,7 +2191,7 @@ ISC_STATUS GDS_DATABASE_INFO(ISC_STATUS* user_status,
|
||||
|
||||
ISC_STATUS GDS_DDL(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
USHORT ddl_length,
|
||||
const SCHAR* ddl)
|
||||
{
|
||||
@ -2656,7 +2656,7 @@ ISC_STATUS GDS_GET_SEGMENT(ISC_STATUS * user_status,
|
||||
|
||||
ISC_STATUS GDS_GET_SLICE(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SLONG* array_id,
|
||||
USHORT sdl_length,
|
||||
const UCHAR* sdl,
|
||||
@ -2721,7 +2721,7 @@ ISC_STATUS GDS_GET_SLICE(ISC_STATUS* user_status,
|
||||
|
||||
ISC_STATUS GDS_OPEN_BLOB2(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
BLB* blob_handle,
|
||||
BID blob_id,
|
||||
USHORT bpb_length,
|
||||
@ -2776,7 +2776,7 @@ ISC_STATUS GDS_OPEN_BLOB2(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_PREPARE(ISC_STATUS * user_status,
|
||||
JRD_TRA * tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
USHORT length,
|
||||
UCHAR * msg)
|
||||
{
|
||||
@ -2859,7 +2859,7 @@ ISC_STATUS GDS_PUT_SEGMENT(ISC_STATUS* user_status,
|
||||
|
||||
ISC_STATUS GDS_PUT_SLICE(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SLONG* array_id,
|
||||
USHORT sdl_length,
|
||||
const UCHAR* sdl,
|
||||
@ -2976,7 +2976,7 @@ ISC_STATUS GDS_QUE_EVENTS(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_RECEIVE(ISC_STATUS * user_status,
|
||||
JRD_REQ * req_handle,
|
||||
jrd_req** req_handle,
|
||||
USHORT msg_type,
|
||||
USHORT msg_length,
|
||||
SCHAR * msg,
|
||||
@ -3044,7 +3044,7 @@ ISC_STATUS GDS_RECEIVE(ISC_STATUS * user_status,
|
||||
|
||||
ISC_STATUS GDS_RECONNECT(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SSHORT length,
|
||||
const UCHAR* id)
|
||||
{
|
||||
@ -3093,7 +3093,7 @@ ISC_STATUS GDS_RECONNECT(ISC_STATUS* user_status,
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS GDS_RELEASE_REQUEST(ISC_STATUS * user_status, JRD_REQ * req_handle)
|
||||
ISC_STATUS GDS_RELEASE_REQUEST(ISC_STATUS * user_status, jrd_req** req_handle)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3138,7 +3138,7 @@ ISC_STATUS GDS_RELEASE_REQUEST(ISC_STATUS * user_status, JRD_REQ * req_handle)
|
||||
|
||||
|
||||
ISC_STATUS GDS_REQUEST_INFO(ISC_STATUS* user_status,
|
||||
JRD_REQ* req_handle,
|
||||
jrd_req** req_handle,
|
||||
SSHORT level,
|
||||
SSHORT item_length,
|
||||
const SCHAR* items,
|
||||
@ -3189,7 +3189,7 @@ ISC_STATUS GDS_REQUEST_INFO(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_ROLLBACK_RETAINING(ISC_STATUS * user_status,
|
||||
JRD_TRA * tra_handle)
|
||||
jrd_tra** tra_handle)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3224,7 +3224,7 @@ ISC_STATUS GDS_ROLLBACK_RETAINING(ISC_STATUS * user_status,
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS GDS_ROLLBACK(ISC_STATUS * user_status, JRD_TRA * tra_handle)
|
||||
ISC_STATUS GDS_ROLLBACK(ISC_STATUS * user_status, jrd_tra** tra_handle)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3305,7 +3305,7 @@ ISC_STATUS GDS_SEEK_BLOB(ISC_STATUS * user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_SEND(ISC_STATUS * user_status,
|
||||
JRD_REQ * req_handle,
|
||||
jrd_req** req_handle,
|
||||
USHORT msg_type,
|
||||
USHORT msg_length,
|
||||
SCHAR * msg,
|
||||
@ -3579,8 +3579,8 @@ ISC_STATUS GDS_SERVICE_START(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_START_AND_SEND(ISC_STATUS* user_status,
|
||||
JRD_REQ* req_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_req** req_handle,
|
||||
jrd_tra** tra_handle,
|
||||
USHORT msg_type,
|
||||
USHORT msg_length,
|
||||
SCHAR* msg,
|
||||
@ -3616,7 +3616,7 @@ ISC_STATUS GDS_START_AND_SEND(ISC_STATUS* user_status,
|
||||
tdbb->tdbb_status_vector = user_status;
|
||||
try
|
||||
{
|
||||
JRD_TRA transaction = find_transaction(tdbb, *tra_handle, isc_req_wrong_db);
|
||||
jrd_tra* transaction = find_transaction(tdbb, *tra_handle, isc_req_wrong_db);
|
||||
|
||||
if (level)
|
||||
request = CMP_clone_request(tdbb, request, level, false);
|
||||
@ -3643,8 +3643,8 @@ ISC_STATUS GDS_START_AND_SEND(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_START(ISC_STATUS * user_status,
|
||||
JRD_REQ * req_handle,
|
||||
JRD_TRA * tra_handle,
|
||||
jrd_req** req_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SSHORT level)
|
||||
{
|
||||
/**************************************
|
||||
@ -3702,7 +3702,7 @@ ISC_STATUS GDS_START(ISC_STATUS * user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_START_MULTIPLE(ISC_STATUS * user_status,
|
||||
JRD_TRA * tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
USHORT count,
|
||||
TEB * vector)
|
||||
{
|
||||
@ -3782,7 +3782,7 @@ ISC_STATUS GDS_START_MULTIPLE(ISC_STATUS * user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_START_TRANSACTION(ISC_STATUS * user_status,
|
||||
JRD_TRA * tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SSHORT count,
|
||||
...)
|
||||
{
|
||||
@ -3815,7 +3815,7 @@ ISC_STATUS GDS_START_TRANSACTION(ISC_STATUS * user_status,
|
||||
|
||||
ISC_STATUS GDS_TRANSACT_REQUEST(ISC_STATUS* user_status,
|
||||
ATT* db_handle,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
USHORT blr_length,
|
||||
const SCHAR* blr,
|
||||
USHORT in_msg_length,
|
||||
@ -3975,7 +3975,7 @@ ISC_STATUS GDS_TRANSACT_REQUEST(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_TRANSACTION_INFO(ISC_STATUS* user_status,
|
||||
JRD_TRA* tra_handle,
|
||||
jrd_tra** tra_handle,
|
||||
SSHORT item_length,
|
||||
const SCHAR* items,
|
||||
SSHORT buffer_length,
|
||||
@ -4024,7 +4024,7 @@ ISC_STATUS GDS_TRANSACTION_INFO(ISC_STATUS* user_status,
|
||||
|
||||
|
||||
ISC_STATUS GDS_UNWIND(ISC_STATUS * user_status,
|
||||
JRD_REQ * req_handle,
|
||||
jrd_req** req_handle,
|
||||
SSHORT level)
|
||||
{
|
||||
/**************************************
|
||||
@ -4594,7 +4594,7 @@ static BLB check_blob(TDBB tdbb, ISC_STATUS* user_status, BLB* blob_handle)
|
||||
* the address of the blob if ok, NULL otherwise.
|
||||
*
|
||||
**************************************/
|
||||
JRD_TRA transaction = 0;
|
||||
jrd_tra* transaction = 0;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
// this const made to check no accidental changes happen
|
||||
@ -4735,7 +4735,7 @@ static void cleanup(void* arg)
|
||||
|
||||
static ISC_STATUS commit(
|
||||
ISC_STATUS* user_status,
|
||||
JRD_TRA* tra_handle, const bool retaining_flag)
|
||||
jrd_tra** tra_handle, const bool retaining_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4854,7 +4854,7 @@ static bool drop_files(const fil* file)
|
||||
}
|
||||
|
||||
|
||||
static JRD_TRA find_transaction(TDBB tdbb, JRD_TRA transaction, ISC_STATUS error_code)
|
||||
static jrd_tra* find_transaction(TDBB tdbb, jrd_tra* transaction, ISC_STATUS error_code)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -5697,7 +5697,7 @@ static void make_jrn_data(UCHAR* data,
|
||||
|
||||
|
||||
static ISC_STATUS prepare(TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
ISC_STATUS* status_vector,
|
||||
USHORT length,
|
||||
const UCHAR* msg)
|
||||
@ -5914,7 +5914,7 @@ static ISC_STATUS return_success(TDBB tdbb)
|
||||
|
||||
|
||||
static BOOLEAN rollback(TDBB tdbb,
|
||||
JRD_TRA next,
|
||||
jrd_tra* next,
|
||||
ISC_STATUS* status_vector,
|
||||
const bool retaining_flag)
|
||||
{
|
||||
@ -5928,7 +5928,7 @@ static BOOLEAN rollback(TDBB tdbb,
|
||||
* Abort a transaction.
|
||||
*
|
||||
**************************************/
|
||||
JRD_TRA transaction;
|
||||
jrd_tra* transaction;
|
||||
ISC_STATUS_ARRAY local_status;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -6038,9 +6038,9 @@ static void shutdown_database(DBB dbb, const bool release_pools)
|
||||
|
||||
for (; ptr < end; ++ptr)
|
||||
{
|
||||
if (*ptr && ((JRD_REL)(*ptr))->rel_file)
|
||||
if (*ptr && ((jrd_rel*)(*ptr))->rel_file)
|
||||
{
|
||||
EXT_fini((JRD_REL)(*ptr));
|
||||
EXT_fini((jrd_rel*)(*ptr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,14 +184,14 @@ public:
|
||||
SLONG dbb_page_incarnation; /* Cache page incarnation counter */
|
||||
ULONG dbb_page_buffers; /* Page buffers from header page */
|
||||
|
||||
EVENT_T dbb_writer_event[1]; /* Event to wake up cache writer */
|
||||
EVENT_T dbb_writer_event_init[1]; /* Event for initialization cache writer */
|
||||
EVENT_T dbb_writer_event_fini[1]; /* Event for finalization cache writer */
|
||||
EVENT_T dbb_reader_event[1]; /* Event to wake up cache reader */
|
||||
event_t dbb_writer_event[1]; /* Event to wake up cache writer */
|
||||
event_t dbb_writer_event_init[1]; /* Event for initialization cache writer */
|
||||
event_t dbb_writer_event_fini[1]; /* Event for finalization cache writer */
|
||||
event_t dbb_reader_event[1]; /* Event to wake up cache reader */
|
||||
#ifdef GARBAGE_THREAD
|
||||
EVENT_T dbb_gc_event[1]; /* Event to wake up garbage collector */
|
||||
EVENT_T dbb_gc_event_init[1]; /* Event for initialization garbage collector */
|
||||
EVENT_T dbb_gc_event_fini[1]; /* Event for finalization garbage collector */
|
||||
event_t dbb_gc_event[1]; /* Event to wake up garbage collector */
|
||||
event_t dbb_gc_event_init[1]; /* Event for initialization garbage collector */
|
||||
event_t dbb_gc_event_fini[1]; /* Event for finalization garbage collector */
|
||||
#endif
|
||||
class att *dbb_update_attachment; /* Attachment with update in process */
|
||||
class btb *dbb_update_que; /* Attachments waiting for update */
|
||||
@ -499,7 +499,6 @@ class jrd_prc : public pool_alloc_rpt<SCHAR, type_prc>
|
||||
class str *prc_name; /* pointer to ascic name */
|
||||
USHORT prc_alter_count; /* No. of times the procedure was altered */
|
||||
};
|
||||
typedef jrd_prc* JRD_PRC;
|
||||
|
||||
#define PRC_scanned 1 /* Field expressions scanned */
|
||||
#define PRC_system 2
|
||||
@ -548,7 +547,7 @@ typedef struct frgn {
|
||||
typedef struct trig {
|
||||
class str* blr; // BLR code
|
||||
jrd_req* request; // Compiled request. Gets filled on first invocation
|
||||
BOOLEAN compile_in_progress;
|
||||
bool compile_in_progress;
|
||||
BOOLEAN sys_trigger;
|
||||
USHORT flags; // Flags as they are in RDB$TRIGGERS table
|
||||
class jrd_rel* relation; // Trigger parent relation
|
||||
@ -618,7 +617,6 @@ public:
|
||||
struct prim rel_primary_dpnds; /* foreign dependencies on this relation's primary key */
|
||||
struct frgn rel_foreign_refs; /* foreign references to other relations' primary keys */
|
||||
};
|
||||
typedef jrd_rel* JRD_REL;
|
||||
|
||||
#define REL_scanned 1 /* Field expressions scanned (or being scanned) */
|
||||
#define REL_system 2
|
||||
@ -652,7 +650,6 @@ class jrd_fld : public pool_alloc_rpt<SCHAR, type_fld>
|
||||
UCHAR fld_length; /* Field name length */
|
||||
UCHAR fld_string[2]; /* one byte for ALLOC and one for the terminating null */
|
||||
};
|
||||
typedef jrd_fld *JRD_FLD;
|
||||
|
||||
|
||||
|
||||
|
@ -82,16 +82,16 @@
|
||||
#include "../jrd/gds_proto.h"
|
||||
#include "../jrd/jrn_proto.h"
|
||||
|
||||
static int do_connect(JRN*, ISC_STATUS*, const TEXT*, USHORT, ltjc*, USHORT,
|
||||
static int do_connect(jrn**, ISC_STATUS*, const TEXT*, USHORT, ltjc*, USHORT,
|
||||
const UCHAR*, USHORT, int);
|
||||
static void error(ISC_STATUS*, JRN, int, const TEXT*);
|
||||
static void error(ISC_STATUS*, jrn*, int, const TEXT*);
|
||||
#ifdef BSD_SOCKETS
|
||||
static int find_address(ISC_STATUS *, JRN, struct sockaddr_in *);
|
||||
static int find_address(ISC_STATUS *, jrn*, struct sockaddr_in *);
|
||||
#endif
|
||||
static int get_reply(ISC_STATUS*, JRN, jrnr*);
|
||||
static int journal_close(ISC_STATUS *, JRN);
|
||||
static int jrn_put(ISC_STATUS*, JRN, jrnh*, USHORT, const UCHAR*, USHORT);
|
||||
static int retry_connect(ISC_STATUS*, JRN*, const TEXT*, USHORT, ltjc*, USHORT,
|
||||
static int get_reply(ISC_STATUS*, jrn*, jrnr*);
|
||||
static int journal_close(ISC_STATUS *, jrn*);
|
||||
static int jrn_put(ISC_STATUS*, jrn*, jrnh*, USHORT, const UCHAR*, USHORT);
|
||||
static int retry_connect(ISC_STATUS*, jrn**, const TEXT*, USHORT, ltjc*, USHORT,
|
||||
const UCHAR*, USHORT);
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ Error Handling:
|
||||
|
||||
int JRN_archive_begin(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN* ret_journal,
|
||||
jrn** ret_journal,
|
||||
SLONG db_id,
|
||||
SLONG file_id, const TEXT* journal_name, USHORT j_length)
|
||||
{
|
||||
@ -149,7 +149,7 @@ int JRN_archive_begin(
|
||||
|
||||
int JRN_archive_end(
|
||||
ISC_STATUS * status_vector,
|
||||
JRN * ret_journal, SLONG db_id, SLONG file_id)
|
||||
jrn** ret_journal, SLONG db_id, SLONG file_id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -259,7 +259,7 @@ int JRN_archive_error(
|
||||
|
||||
int JRN_disable(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal, jrnh* header, const UCHAR* data, USHORT d_len)
|
||||
jrn* journal, jrnh* header, const UCHAR* data, USHORT d_len)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -301,7 +301,7 @@ void JRN_dump_page(void)
|
||||
|
||||
int JRN_enable(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN* ret_journal,
|
||||
jrn** ret_journal,
|
||||
const TEXT* journal_name,
|
||||
USHORT j_length, const UCHAR* data, USHORT d_len, ltjc* control)
|
||||
{
|
||||
@ -324,7 +324,7 @@ int JRN_enable(
|
||||
}
|
||||
|
||||
|
||||
int JRN_fini(ISC_STATUS* status_vector, JRN * jrn)
|
||||
int JRN_fini(ISC_STATUS* status_vector, jrn** jrn_ptr)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -336,8 +336,8 @@ int JRN_fini(ISC_STATUS* status_vector, JRN * jrn)
|
||||
* Check out with journal system.
|
||||
*
|
||||
**************************************/
|
||||
JRN journal = *jrn;
|
||||
*jrn = NULL;
|
||||
jrn* journal = *jrn_ptr;
|
||||
*jrn_ptr = NULL;
|
||||
|
||||
/* If there is either a null journal block or
|
||||
a zero channel, there is no connection to
|
||||
@ -380,7 +380,7 @@ int JRN_fini(ISC_STATUS* status_vector, JRN * jrn)
|
||||
|
||||
int JRN_init(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN* ret_journal,
|
||||
jrn** ret_journal,
|
||||
USHORT page_size,
|
||||
const UCHAR* journal_dir, USHORT jd_len,
|
||||
const UCHAR* data, USHORT d_len)
|
||||
@ -473,7 +473,7 @@ void JRN_make_init_data(
|
||||
|
||||
int JRN_put_wal_name(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
const TEXT* walname,
|
||||
USHORT w_length,
|
||||
SLONG seqno, SLONG offset, SLONG p_offset, USHORT mode)
|
||||
@ -506,7 +506,7 @@ int JRN_put_wal_name(
|
||||
|
||||
int JRN_put_old_start(
|
||||
ISC_STATUS * status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
SLONG seqno,
|
||||
SLONG offset, SLONG p_offset, USHORT * dump_id)
|
||||
{
|
||||
@ -538,7 +538,7 @@ int JRN_put_old_start(
|
||||
|
||||
int JRN_put_old_end(
|
||||
ISC_STATUS * status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
SLONG seqno, SLONG offset, SLONG p_offset, USHORT dump_id)
|
||||
{
|
||||
/**************************************
|
||||
@ -567,7 +567,7 @@ int JRN_put_old_end(
|
||||
|
||||
int JRN_put_old_file(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
const TEXT* old_file_name,
|
||||
USHORT file_length,
|
||||
SLONG file_size, USHORT file_seqno, USHORT dump_id)
|
||||
@ -601,7 +601,7 @@ int JRN_put_old_file(
|
||||
|
||||
int JRN_put_wal_info(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
const TEXT* walname,
|
||||
USHORT w_length,
|
||||
SLONG seqno,
|
||||
@ -698,7 +698,7 @@ void JRN_sync(void)
|
||||
|
||||
|
||||
static int do_connect(
|
||||
JRN* ret_jrn,
|
||||
jrn** ret_jrn,
|
||||
ISC_STATUS* status_vector,
|
||||
const TEXT* journal_name,
|
||||
USHORT j_length,
|
||||
@ -722,7 +722,7 @@ static int do_connect(
|
||||
struct sockaddr_in address;
|
||||
#endif
|
||||
SSHORT l;
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
struct jrnr reply;
|
||||
int ret_val;
|
||||
|
||||
@ -785,7 +785,7 @@ static int do_connect(
|
||||
|
||||
l = strlen(name);
|
||||
|
||||
journal = (JRN) gds__alloc((SLONG) ((sizeof(struct jrn)) + l));
|
||||
journal = (jrn*) gds__alloc((SLONG) ((sizeof(struct jrn)) + l));
|
||||
/* FREE: by error returns from this module, otherwise by JRN_fini & friends */
|
||||
if (!journal) { /* NOMEM: */
|
||||
error(status_vector, NULL, 0, "gds__alloc");
|
||||
@ -926,7 +926,7 @@ static int do_connect(
|
||||
|
||||
static void error(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal, status_t status, const TEXT* string)
|
||||
jrn* journal, status_t status, const TEXT* string)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -956,7 +956,7 @@ static void error(
|
||||
#ifdef BSD_SOCKETS
|
||||
static int find_address(
|
||||
ISC_STATUS * status_vector,
|
||||
JRN journal, struct sockaddr_in *address)
|
||||
jrn* journal, struct sockaddr_in *address)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1000,7 +1000,7 @@ static int find_address(
|
||||
#endif
|
||||
|
||||
|
||||
static int get_reply(ISC_STATUS* status_vector, JRN journal, jrnr* reply)
|
||||
static int get_reply(ISC_STATUS* status_vector, jrn* journal, jrnr* reply)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1043,7 +1043,7 @@ static int get_reply(ISC_STATUS* status_vector, JRN journal, jrnr* reply)
|
||||
}
|
||||
|
||||
|
||||
static int journal_close(ISC_STATUS * status_vector, JRN journal)
|
||||
static int journal_close(ISC_STATUS * status_vector, jrn* journal)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1079,7 +1079,7 @@ static int journal_close(ISC_STATUS * status_vector, JRN journal)
|
||||
|
||||
static int jrn_put(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN journal,
|
||||
jrn* journal,
|
||||
jrnh* header,
|
||||
USHORT h_length, const UCHAR* data, USHORT d_length)
|
||||
{
|
||||
@ -1163,7 +1163,7 @@ static int jrn_put(
|
||||
|
||||
static int retry_connect(
|
||||
ISC_STATUS* status_vector,
|
||||
JRN* journal,
|
||||
jrn** journal,
|
||||
const TEXT* journal_name,
|
||||
USHORT j_length,
|
||||
ltjc* control, USHORT control_length, const UCHAR* data, USHORT d_length)
|
||||
|
@ -57,7 +57,6 @@ class jrn : public pool_alloc_rpt<SCHAR, type_jrn>
|
||||
USHORT jrn_did[3]; /* VMS directory id */
|
||||
TEXT jrn_server[1]; /* Server name */
|
||||
};
|
||||
typedef jrn *JRN;
|
||||
|
||||
/* Journal record types */
|
||||
|
||||
@ -112,7 +111,7 @@ typedef jrn *JRN;
|
||||
|
||||
/* Journal header block */
|
||||
|
||||
typedef struct jrnh {
|
||||
struct jrnh {
|
||||
UCHAR jrnh_type;
|
||||
UCHAR jrnh_version;
|
||||
USHORT jrnh_length; /* Total length of journal record */
|
||||
@ -120,12 +119,12 @@ typedef struct jrnh {
|
||||
SLONG jrnh_series; /* Journal series */
|
||||
SLONG jrnh_prev_seqno; /* previous seqno of record */
|
||||
SLONG jrnh_prev_offset; /* previous offset of record */
|
||||
} JRNH;
|
||||
};
|
||||
|
||||
/* Long Term Journal control message format */
|
||||
|
||||
struct ltjc {
|
||||
JRNH ltjc_header;
|
||||
jrnh ltjc_header;
|
||||
USHORT ltjc_page_size; /* Database page size */
|
||||
SLONG ltjc_seqno; /* Seqno of WAL */
|
||||
ULONG ltjc_offset; /* offset in WAL */
|
||||
@ -138,7 +137,7 @@ struct ltjc {
|
||||
/* Long Term Journal archive message format */
|
||||
|
||||
struct ltja {
|
||||
JRNH ltja_header;
|
||||
jrnh ltja_header;
|
||||
SLONG ltja_db_id; /* Database ID */
|
||||
SLONG ltja_file_id; /* WAL file ID */
|
||||
SLONG ltja_error_code; /* Error number */
|
||||
@ -168,7 +167,7 @@ enum jrnr_t {
|
||||
/* Journal server response message */
|
||||
|
||||
struct jrnr {
|
||||
JRNH jrnr_header;
|
||||
jrnh jrnr_header;
|
||||
enum jrnr_t jrnr_response;
|
||||
SLONG jrnr_page;
|
||||
};
|
||||
@ -176,7 +175,7 @@ struct jrnr {
|
||||
/* Journal data message format */
|
||||
|
||||
struct jrnd {
|
||||
JRNH jrnd_header;
|
||||
jrnh jrnd_header;
|
||||
USHORT jrnd_length; /* Length of data portion */
|
||||
SLONG jrnd_page; /* Page number */
|
||||
UCHAR jrnd_data[1];
|
||||
@ -333,7 +332,7 @@ struct jrnrp {
|
||||
*/
|
||||
|
||||
struct ltjw {
|
||||
JRNH ltjw_header;
|
||||
jrnh ltjw_header;
|
||||
USHORT ltjw_mode; /* any mode of operation */
|
||||
ULONG ltjw_seqno; /* log file seqno */
|
||||
ULONG ltjw_offset; /* offset of record */
|
||||
@ -369,7 +368,7 @@ struct ltjw {
|
||||
/* Secondary file name message */
|
||||
|
||||
struct jrnf {
|
||||
JRNH jrnf_header;
|
||||
jrnh jrnf_header;
|
||||
ULONG jrnf_start; /* start block number */
|
||||
USHORT jrnf_length; /* Length of filename */
|
||||
USHORT jrnf_sequence; /* File sequence # */
|
||||
|
729
src/jrd/met.epp
729
src/jrd/met.epp
File diff suppressed because it is too large
Load Diff
@ -54,7 +54,7 @@ SLONG MET_lookup_generator(TDBB, const TEXT*);
|
||||
void MET_lookup_generator_id(TDBB, SLONG, TEXT *);
|
||||
void MET_lookup_index(TDBB, TEXT*, const TEXT*, USHORT);
|
||||
SLONG MET_lookup_index_name(TDBB, const TEXT*, SLONG*, SSHORT*);
|
||||
int MET_lookup_partner(TDBB, struct jrd_rel*, struct idx*, const TEXT*);
|
||||
bool MET_lookup_partner(TDBB, struct jrd_rel*, struct idx*, const TEXT*);
|
||||
struct jrd_prc* MET_lookup_procedure(TDBB, SCHAR *, BOOLEAN);
|
||||
struct jrd_prc* MET_lookup_procedure_id(TDBB, SSHORT, BOOLEAN, BOOLEAN, USHORT);
|
||||
struct jrd_rel* MET_lookup_relation(TDBB, const char*);
|
||||
@ -73,10 +73,10 @@ void MET_release_triggers(TDBB, TRIG_VEC *);
|
||||
#ifdef DEV_BUILD
|
||||
void MET_verify_cache(TDBB);
|
||||
#endif
|
||||
BOOLEAN MET_clear_cache(TDBB, JRD_PRC);
|
||||
BOOLEAN MET_procedure_in_use(TDBB, JRD_PRC);
|
||||
void MET_remove_procedure(TDBB, int, JRD_PRC);
|
||||
void MET_revoke(TDBB, class jrd_tra *, TEXT *, TEXT *, TEXT *);
|
||||
BOOLEAN MET_clear_cache(TDBB, jrd_prc*);
|
||||
BOOLEAN MET_procedure_in_use(TDBB, jrd_prc*);
|
||||
void MET_remove_procedure(TDBB, int, jrd_prc*);
|
||||
void MET_revoke(TDBB, class jrd_tra*, const TEXT*, const TEXT*, const TEXT*);
|
||||
TEXT* MET_save_name(TDBB, const TEXT*);
|
||||
void MET_scan_relation(TDBB, struct jrd_rel *);
|
||||
const TEXT* MET_trigger_msg(TDBB, const TEXT*, USHORT);
|
||||
|
@ -1052,7 +1052,7 @@ static BOOLEAN find_dbkey(RSB rsb, ULONG record_number)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
IRSB_NAV impure;
|
||||
RPB *rpb;
|
||||
WIN window;
|
||||
@ -1144,7 +1144,7 @@ static BOOLEAN find_record(
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
IRSB_NAV impure;
|
||||
RPB *rpb;
|
||||
JRD_NOD retrieval_node;
|
||||
@ -1569,7 +1569,7 @@ static BOOLEAN get_record(
|
||||
**************************************/
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
IDX *idx = (IDX*) ((SCHAR*) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]);
|
||||
|
||||
KEY value;
|
||||
|
@ -62,7 +62,7 @@ static int old_init(OLD*, const SCHAR*, USHORT, SSHORT, SCHAR**, ULONG, ULONG,
|
||||
SSHORT, SSHORT, ULONG, ULONG, ULONG);
|
||||
static int old_put(OLD, const SCHAR*, USHORT);
|
||||
static void old_put_db_filename(OLD);
|
||||
static int old_put_rec(OLD, JRNH*, USHORT, const UCHAR*, USHORT);
|
||||
static int old_put_rec(OLD, jrnh*, USHORT, const UCHAR*, USHORT);
|
||||
static int open_next_file(OLD);
|
||||
|
||||
|
||||
@ -664,7 +664,7 @@ static void old_put_db_filename(OLD OLD_handle)
|
||||
|
||||
static int old_put_rec(
|
||||
OLD OLD_handle,
|
||||
JRNH * header,
|
||||
jrnh* header,
|
||||
USHORT h_length, const UCHAR* data, USHORT d_length)
|
||||
{
|
||||
/**************************************
|
||||
|
142
src/jrd/opt.cpp
142
src/jrd/opt.cpp
@ -118,18 +118,18 @@ static RSB gen_aggregate(TDBB, OPT, JRD_NOD);
|
||||
static RSB gen_boolean(TDBB, OPT, RSB, JRD_NOD);
|
||||
static RSB gen_first(TDBB, OPT, RSB, JRD_NOD);
|
||||
static void gen_join(TDBB, OPT, UCHAR *, LLS *, JRD_NOD *, JRD_NOD *, JRD_NOD);
|
||||
static RSB gen_navigation(TDBB, OPT, USHORT, JRD_REL, STR, IDX *, JRD_NOD *);
|
||||
static RSB gen_navigation(TDBB, OPT, USHORT, jrd_rel*, STR, IDX *, JRD_NOD *);
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
static RSB gen_nav_rsb(TDBB, OPT, USHORT, JRD_REL, STR, IDX *, RSE_GET_MODE);
|
||||
static RSB gen_nav_rsb(TDBB, OPT, USHORT, jrd_rel*, STR, IDX *, RSE_GET_MODE);
|
||||
#else
|
||||
static RSB gen_nav_rsb(TDBB, OPT, USHORT, JRD_REL, STR, IDX *);
|
||||
static RSB gen_nav_rsb(TDBB, OPT, USHORT, jrd_rel*, STR, IDX *);
|
||||
#endif
|
||||
static RSB gen_outer(TDBB, OPT, RSE, LLS, JRD_NOD *, JRD_NOD *);
|
||||
static RSB gen_procedure(TDBB, OPT, JRD_NOD);
|
||||
static RSB gen_residual_boolean(TDBB, OPT, RSB);
|
||||
static RSB gen_retrieval(TDBB, OPT, SSHORT, JRD_NOD *, JRD_NOD *, bool, bool,
|
||||
JRD_NOD *);
|
||||
static RSB gen_rsb(TDBB, OPT, RSB, JRD_NOD, SSHORT, JRD_REL, STR, JRD_NOD, float);
|
||||
static RSB gen_rsb(TDBB, OPT, RSB, JRD_NOD, SSHORT, jrd_rel*, STR, JRD_NOD, float);
|
||||
static RSB gen_skip (TDBB, OPT, RSB, JRD_NOD);
|
||||
static RSB gen_sort(TDBB, OPT, UCHAR *, UCHAR *, RSB, JRD_NOD, bool);
|
||||
static bool gen_sort_merge(TDBB, OPT, LLS *);
|
||||
@ -139,11 +139,11 @@ static IRL indexed_relationship(TDBB, OPT, USHORT);
|
||||
static STR make_alias(TDBB, CSB, csb_repeat *);
|
||||
static JRD_NOD make_binary_node(NOD_T, JRD_NOD, JRD_NOD, bool);
|
||||
static RSB make_cross(TDBB, OPT, LLS);
|
||||
static JRD_NOD make_index_node(TDBB, JRD_REL, CSB, IDX *);
|
||||
static JRD_NOD make_index_node(TDBB, jrd_rel*, CSB, IDX *);
|
||||
static JRD_NOD make_inference_node(CSB, JRD_NOD, JRD_NOD, JRD_NOD);
|
||||
static JRD_NOD make_inversion(TDBB, OPT, JRD_NOD, USHORT);
|
||||
static JRD_NOD make_missing(TDBB, OPT, JRD_REL, JRD_NOD, USHORT, IDX *);
|
||||
static JRD_NOD make_starts(TDBB, OPT, JRD_REL, JRD_NOD, USHORT, IDX *);
|
||||
static JRD_NOD make_missing(TDBB, OPT, jrd_rel*, JRD_NOD, USHORT, IDX *);
|
||||
static JRD_NOD make_starts(TDBB, OPT, jrd_rel*, JRD_NOD, USHORT, IDX *);
|
||||
static bool map_equal(JRD_NOD, JRD_NOD, JRD_NOD);
|
||||
static void mark_indices(csb_repeat *, SSHORT);
|
||||
static SSHORT match_index(TDBB, OPT, SSHORT, JRD_NOD, IDX *);
|
||||
@ -499,7 +499,7 @@ RSB OPT_compile(TDBB tdbb,
|
||||
csb->csb_rpt[stream].csb_idx_allocation = 0;
|
||||
if (conjunct_count || sort || project || aggregate || parent_stack)
|
||||
{
|
||||
JRD_REL relation = (JRD_REL) node->nod_arg[e_rel_relation];
|
||||
jrd_rel* relation = (jrd_rel*) node->nod_arg[e_rel_relation];
|
||||
if (relation && !relation->rel_file)
|
||||
{
|
||||
csb->csb_rpt[stream].csb_indices =
|
||||
@ -836,7 +836,7 @@ JRD_NOD OPT_make_dbkey(OPT opt_, JRD_NOD boolean, USHORT stream)
|
||||
}
|
||||
|
||||
|
||||
JRD_NOD OPT_make_index(TDBB tdbb, OPT opt_, JRD_REL relation, IDX * idx)
|
||||
JRD_NOD OPT_make_index(TDBB tdbb, OPT opt_, jrd_rel* relation, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -977,7 +977,7 @@ int OPT_match_index(OPT opt, USHORT stream, IDX * idx)
|
||||
|
||||
|
||||
void OPT_set_index(TDBB tdbb,
|
||||
JRD_REQ request, RSB * rsb_ptr, JRD_REL relation, IDX * idx)
|
||||
jrd_req* request, RSB * rsb_ptr, jrd_rel* relation, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1240,7 +1240,7 @@ static void check_indices(csb_repeat * csb_tail)
|
||||
**************************************/
|
||||
TEXT index_name[32];
|
||||
JRD_NOD plan, access_type;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
IDX *idx;
|
||||
USHORT i;
|
||||
TDBB tdbb;
|
||||
@ -1461,7 +1461,7 @@ static void check_sorts(RSE rse)
|
||||
}
|
||||
|
||||
|
||||
static void class_mask(USHORT count, JRD_NOD * class_, ULONG * mask)
|
||||
static void class_mask(USHORT count, JRD_NOD* eq_class, ULONG * mask)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1478,8 +1478,8 @@ static void class_mask(USHORT count, JRD_NOD * class_, ULONG * mask)
|
||||
SLONG i;
|
||||
|
||||
#ifdef DEV_BUILD
|
||||
if (*class_) {
|
||||
DEV_BLKCHK(*class_, type_nod);
|
||||
if (*eq_class) {
|
||||
DEV_BLKCHK(*eq_class, type_nod);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1492,10 +1492,10 @@ static void class_mask(USHORT count, JRD_NOD * class_, ULONG * mask)
|
||||
mask[i] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++, class_++) {
|
||||
if (*class_) {
|
||||
for (i = 0; i < count; i++, eq_class++) {
|
||||
if (*eq_class) {
|
||||
SET_DEP_BIT(mask, i);
|
||||
DEV_BLKCHK(*class_, type_nod);
|
||||
DEV_BLKCHK(*eq_class, type_nod);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2004,7 +2004,7 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb, USHORT base_count)
|
||||
*
|
||||
**************************************/
|
||||
Firebird::HalfStaticArray<LLS, OPT_STATIC_ITEMS> classes(GET_THREAD_DATA->tdbb_default);
|
||||
LLS *class_, *class2, stack, temp;
|
||||
LLS *eq_class, stack, temp;
|
||||
JRD_NOD boolean, node1, node2, new_node, arg1, arg2;
|
||||
USHORT count;
|
||||
USHORT n;
|
||||
@ -2024,19 +2024,19 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb, USHORT base_count)
|
||||
node2 = boolean->nod_arg[1];
|
||||
if (node2->nod_type != nod_field)
|
||||
continue;
|
||||
for (class_ = classes.begin(); class_ < classes.end(); class_++)
|
||||
if (search_stack(node1, *class_)) {
|
||||
augment_stack(node2, class_);
|
||||
for (eq_class = classes.begin(); eq_class < classes.end(); eq_class++)
|
||||
if (search_stack(node1, *eq_class)) {
|
||||
augment_stack(node2, eq_class);
|
||||
break;
|
||||
}
|
||||
else if (search_stack(node2, *class_)) {
|
||||
LLS_PUSH(node1, class_);
|
||||
else if (search_stack(node2, *eq_class)) {
|
||||
LLS_PUSH(node1, eq_class);
|
||||
break;
|
||||
}
|
||||
if (class_ == classes.end()) {
|
||||
if (eq_class == classes.end()) {
|
||||
classes.grow(classes.getCount() + 1);
|
||||
LLS_PUSH(node1, class_);
|
||||
LLS_PUSH(node2, class_);
|
||||
LLS_PUSH(node1, eq_class);
|
||||
LLS_PUSH(node2, eq_class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2047,24 +2047,30 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb, USHORT base_count)
|
||||
have crept in between classes (this could result from the
|
||||
sequence (A = B, C = D, B = C) */
|
||||
|
||||
for (class_ = classes.begin(); class_ < classes.end(); class_++)
|
||||
for (stack = *class_; stack; stack = stack->lls_next)
|
||||
for (class2 = class_ + 1; class2 < classes.end(); class2++)
|
||||
if (search_stack((JRD_NOD) stack->lls_object, *class2)) {
|
||||
for (eq_class = classes.begin(); eq_class < classes.end(); eq_class++) {
|
||||
for (stack = *eq_class; stack; stack = stack->lls_next) {
|
||||
for (lls** eq_class2 = eq_class + 1; eq_class2 < classes.end();
|
||||
eq_class2++)
|
||||
{
|
||||
if (search_stack((JRD_NOD) stack->lls_object, *eq_class2)) {
|
||||
DEBUG;
|
||||
while (*class2)
|
||||
augment_stack((JRD_NOD) LLS_POP(class2), class_);
|
||||
while (*eq_class2) {
|
||||
augment_stack((JRD_NOD) LLS_POP(eq_class2), eq_class);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
count = 0;
|
||||
|
||||
/* Start by making a pass distributing field equalities */
|
||||
|
||||
for (class_ = classes.begin(); class_ < classes.end(); class_++) {
|
||||
for (stack = *class_, n = 0; stack; stack = stack->lls_next)
|
||||
for (eq_class = classes.begin(); eq_class < classes.end(); eq_class++) {
|
||||
for (stack = *eq_class, n = 0; stack; stack = stack->lls_next)
|
||||
n++;
|
||||
if (n >= 3)
|
||||
for (stack = *class_; stack; stack = stack->lls_next)
|
||||
for (stack = *eq_class; stack; stack = stack->lls_next)
|
||||
for (temp = stack->lls_next; temp; temp = temp->lls_next) {
|
||||
boolean =
|
||||
make_binary_node(nod_eql, (JRD_NOD) stack->lls_object,
|
||||
@ -2110,9 +2116,9 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb, USHORT base_count)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (class_ = classes.begin(); class_ < classes.end(); class_++)
|
||||
if (search_stack(node1, *class_)) {
|
||||
for (temp = *class_; temp; temp = temp->lls_next)
|
||||
for (eq_class = classes.begin(); eq_class < classes.end(); eq_class++)
|
||||
if (search_stack(node1, *eq_class)) {
|
||||
for (temp = *eq_class; temp; temp = temp->lls_next)
|
||||
if (!node_equality(node1, (JRD_NOD) temp->lls_object)) {
|
||||
if (reverse) {
|
||||
arg1 = boolean->nod_arg[0];
|
||||
@ -2233,12 +2239,12 @@ static bool dump_rsb(const jrd_req* request,
|
||||
*
|
||||
**************************************/
|
||||
USHORT length;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
STR alias;
|
||||
SCHAR *name, *buffer;
|
||||
RSB *ptr, *end;
|
||||
SSHORT return_length;
|
||||
JRD_PRC procedure;
|
||||
jrd_prc* procedure;
|
||||
|
||||
DEV_BLKCHK(rsb, type_rsb);
|
||||
|
||||
@ -3635,7 +3641,7 @@ static void gen_join(TDBB tdbb,
|
||||
csb_repeat* csb_tail = &csb->csb_rpt[streams[1]];
|
||||
fb_assert(csb_tail);
|
||||
if (csb_tail->csb_flags & csb_compute) {
|
||||
JRD_REL relation = csb_tail->csb_relation;
|
||||
jrd_rel* relation = csb_tail->csb_relation;
|
||||
fb_assert(relation);
|
||||
FMT format = CMP_format(tdbb, csb, streams[1]);
|
||||
fb_assert(format);
|
||||
@ -3662,7 +3668,7 @@ static void gen_join(TDBB tdbb,
|
||||
for (UCHAR* stream = streams + 1; stream < end_stream; stream++) {
|
||||
csb_repeat* csb_tail = &csb->csb_rpt[*stream];
|
||||
fb_assert(csb_tail);
|
||||
JRD_REL relation = csb_tail->csb_relation;
|
||||
jrd_rel* relation = csb_tail->csb_relation;
|
||||
fb_assert(relation);
|
||||
FMT format = CMP_format(tdbb, csb, *stream);
|
||||
// if this is an external file, set an arbitrary cardinality;
|
||||
@ -3745,7 +3751,7 @@ static void gen_join(TDBB tdbb,
|
||||
static RSB gen_navigation(TDBB tdbb,
|
||||
OPT opt,
|
||||
USHORT stream,
|
||||
JRD_REL relation, STR alias, IDX * idx, JRD_NOD * sort_ptr)
|
||||
jrd_rel* relation, STR alias, IDX * idx, JRD_NOD * sort_ptr)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3870,7 +3876,7 @@ static RSB gen_navigation(TDBB tdbb,
|
||||
|
||||
static RSB gen_nav_rsb(TDBB tdbb,
|
||||
OPT opt,
|
||||
USHORT stream, JRD_REL relation, STR alias, IDX * idx
|
||||
USHORT stream, jrd_rel* relation, STR alias, IDX * idx
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
, RSE_GET_MODE mode
|
||||
#endif
|
||||
@ -4063,7 +4069,7 @@ static RSB gen_procedure(TDBB tdbb, OPT opt, JRD_NOD node)
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
CSB csb = opt->opt_csb;
|
||||
JRD_PRC procedure = MET_lookup_procedure_id(tdbb,
|
||||
jrd_prc* procedure = MET_lookup_procedure_id(tdbb,
|
||||
(SSHORT)(SLONG)node->nod_arg[e_prc_procedure], FALSE, FALSE, 0);
|
||||
RSB rsb = FB_NEW_RPT(*tdbb->tdbb_default, RSB_PRC_count) Rsb();
|
||||
rsb->rsb_type = rsb_procedure;
|
||||
@ -4171,7 +4177,7 @@ static RSB gen_retrieval(TDBB tdbb,
|
||||
|
||||
CSB csb = opt->opt_csb;
|
||||
csb_repeat* csb_tail = &csb->csb_rpt[stream];
|
||||
JRD_REL relation = csb_tail->csb_relation;
|
||||
jrd_rel* relation = csb_tail->csb_relation;
|
||||
|
||||
fb_assert(relation);
|
||||
|
||||
@ -4514,7 +4520,7 @@ static RSB gen_rsb(TDBB tdbb,
|
||||
RSB rsb,
|
||||
JRD_NOD inversion,
|
||||
SSHORT stream,
|
||||
JRD_REL relation, STR alias, JRD_NOD boolean, float cardinality)
|
||||
jrd_rel* relation, STR alias, JRD_NOD boolean, float cardinality)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -4902,7 +4908,7 @@ static bool gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers)
|
||||
USHORT i, river_cnt, stream_cnt;
|
||||
ULONG selected_rivers[OPT_STREAM_BITS], selected_rivers2[OPT_STREAM_BITS];
|
||||
UCHAR *stream;
|
||||
JRD_NOD *class_, node, node1, node2, *ptr;
|
||||
JRD_NOD *eq_class, node, node1, node2, *ptr;
|
||||
RSB rsb, merge_rsb;
|
||||
RSB *rsb_tail;
|
||||
Opt::opt_conjunct *tail, *end;
|
||||
@ -4954,16 +4960,16 @@ static bool gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers)
|
||||
for (stack2 = stack1->lls_next; stack2; stack2 = stack2->lls_next) {
|
||||
river2 = (RIV) stack2->lls_object;
|
||||
if (river_reference(river2, node2)) {
|
||||
for (class_ = classes; class_ < last_class; class_ += cnt) {
|
||||
for (eq_class = classes; eq_class < last_class; eq_class += cnt) {
|
||||
if (node_equality(node1, classes[river1->riv_number])
|
||||
|| node_equality(node2, classes[river2->riv_number]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
class_[river1->riv_number] = node1;
|
||||
class_[river2->riv_number] = node2;
|
||||
if (class_ == last_class) {
|
||||
eq_class[river1->riv_number] = node1;
|
||||
eq_class[river2->riv_number] = node2;
|
||||
if (eq_class == last_class) {
|
||||
last_class += cnt;
|
||||
}
|
||||
}
|
||||
@ -4977,23 +4983,23 @@ static bool gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers)
|
||||
|
||||
river_cnt = stream_cnt = 0;
|
||||
Firebird::HalfStaticArray<JRD_NOD*, OPT_STATIC_ITEMS> selected_classes(tdbb->tdbb_default, cnt);
|
||||
for (class_ = classes; class_ < last_class; class_ += cnt) {
|
||||
i = river_count(cnt, class_);
|
||||
for (eq_class = classes; eq_class < last_class; eq_class += cnt) {
|
||||
i = river_count(cnt, eq_class);
|
||||
if (i > river_cnt) {
|
||||
river_cnt = i;
|
||||
selected_classes.shrink(0);
|
||||
selected_classes.add(class_);
|
||||
class_mask(cnt, class_, selected_rivers);
|
||||
selected_classes.add(eq_class);
|
||||
class_mask(cnt, eq_class, selected_rivers);
|
||||
}
|
||||
else {
|
||||
class_mask(cnt, class_, selected_rivers2);
|
||||
class_mask(cnt, eq_class, selected_rivers2);
|
||||
for (i = 0; i < OPT_STREAM_BITS; i++) {
|
||||
if ((selected_rivers[i] & selected_rivers2[i]) != selected_rivers[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == OPT_STREAM_BITS) {
|
||||
selected_classes.add(class_);
|
||||
selected_classes.add(eq_class);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5389,7 +5395,7 @@ static RSB make_cross(TDBB tdbb, OPT opt, LLS stack)
|
||||
}
|
||||
|
||||
|
||||
static JRD_NOD make_index_node(TDBB tdbb, JRD_REL relation, CSB csb, IDX * idx)
|
||||
static JRD_NOD make_index_node(TDBB tdbb, jrd_rel* relation, CSB csb, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -5509,7 +5515,7 @@ static JRD_NOD make_inversion(TDBB tdbb, OPT opt, JRD_NOD boolean, USHORT stream
|
||||
DEV_BLKCHK(boolean, type_nod);
|
||||
|
||||
csb_repeat* csb_tail = &opt->opt_csb->csb_rpt[stream];
|
||||
JRD_REL relation = csb_tail->csb_relation;
|
||||
jrd_rel* relation = csb_tail->csb_relation;
|
||||
|
||||
if ((!relation) || (relation->rel_file)) {
|
||||
return NULL;
|
||||
@ -5648,7 +5654,7 @@ static JRD_NOD make_inversion(TDBB tdbb, OPT opt, JRD_NOD boolean, USHORT stream
|
||||
|
||||
static JRD_NOD make_missing(TDBB tdbb,
|
||||
OPT opt,
|
||||
JRD_REL relation, JRD_NOD boolean, USHORT stream, IDX * idx)
|
||||
jrd_rel* relation, JRD_NOD boolean, USHORT stream, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -5705,7 +5711,7 @@ static JRD_NOD make_missing(TDBB tdbb,
|
||||
|
||||
static JRD_NOD make_starts(TDBB tdbb,
|
||||
OPT opt,
|
||||
JRD_REL relation, JRD_NOD boolean, USHORT stream, IDX * idx)
|
||||
jrd_rel* relation, JRD_NOD boolean, USHORT stream, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -6323,7 +6329,7 @@ static void print_order(OPT opt,
|
||||
#endif
|
||||
|
||||
|
||||
static USHORT river_count(USHORT count, JRD_NOD * class_)
|
||||
static USHORT river_count(USHORT count, JRD_NOD* eq_class)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -6339,15 +6345,15 @@ static USHORT river_count(USHORT count, JRD_NOD * class_)
|
||||
**************************************/
|
||||
USHORT i, cnt;
|
||||
#ifdef DEV_BUILD
|
||||
if (*class_) {
|
||||
DEV_BLKCHK(*class_, type_nod);
|
||||
if (*eq_class) {
|
||||
DEV_BLKCHK(*eq_class, type_nod);
|
||||
}
|
||||
#endif
|
||||
cnt = 0;
|
||||
for (i = 0; i < count; i++, class_++)
|
||||
if (*class_) {
|
||||
for (i = 0; i < count; i++, eq_class++)
|
||||
if (*eq_class) {
|
||||
cnt++;
|
||||
DEV_BLKCHK(*class_, type_nod);
|
||||
DEV_BLKCHK(*eq_class, type_nod);
|
||||
}
|
||||
|
||||
return cnt;
|
||||
|
@ -82,7 +82,7 @@ void EXT_close(RSB rsb)
|
||||
TDBB tdbb;
|
||||
REL relation;
|
||||
EXT file;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
int status;
|
||||
|
||||
@ -342,7 +342,7 @@ void EXT_modify(RPB * old_rpb, RPB * new_rpb, int *transaction)
|
||||
**************************************/
|
||||
REL relation;
|
||||
EXT file;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
REC record;
|
||||
const fmt* format;
|
||||
int offset, status;
|
||||
@ -387,7 +387,7 @@ EXT_open(RSB rsb)
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
REL relation;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
REC record;
|
||||
const fmt* format;
|
||||
@ -878,7 +878,7 @@ static bool get_dbkey(RSB rsb)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
REL relation;
|
||||
EXT file;
|
||||
RPB *rpb;
|
||||
@ -955,7 +955,7 @@ static bool get_indexed(RSB rsb)
|
||||
REL relation;
|
||||
const fmt* format;
|
||||
IDX *index;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
UCHAR key_buffer[256], *p;
|
||||
int status, result;
|
||||
@ -1078,7 +1078,7 @@ static bool get_sequential(RSB rsb)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
REL relation;
|
||||
EXT file;
|
||||
RPB *rpb;
|
||||
@ -1197,7 +1197,7 @@ static open_indexed(RSB rsb)
|
||||
TDBB tdbb;
|
||||
REL relation;
|
||||
EXT file;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
NOD node;
|
||||
IRB retrieval;
|
||||
@ -1237,7 +1237,7 @@ static open_sequential(RSB rsb)
|
||||
TDBB tdbb;
|
||||
REL relation;
|
||||
EXT file;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
int status;
|
||||
|
||||
|
@ -97,7 +97,7 @@ typedef union {
|
||||
|
||||
|
||||
JIO_fini(journal)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -135,7 +135,7 @@ JIO_fini(journal)
|
||||
|
||||
|
||||
JIO_get_position(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -178,7 +178,7 @@ DIR JIO_next_dir(dir)
|
||||
|
||||
|
||||
JIO_open(journal)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -233,7 +233,7 @@ JIO_open(journal)
|
||||
|
||||
|
||||
JIO_put(journal, message, size)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
ltjc *message;
|
||||
USHORT size;
|
||||
{
|
||||
@ -322,9 +322,9 @@ JIO_put(journal, message, size)
|
||||
|
||||
|
||||
JIO_read(journal, position, buffer, size)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
USHORT *position;
|
||||
JRNH *buffer;
|
||||
jrnh* buffer;
|
||||
USHORT size;
|
||||
{
|
||||
/**************************************
|
||||
@ -389,7 +389,7 @@ JIO_read(journal, position, buffer, size)
|
||||
|
||||
|
||||
JIO_read_header(journal, header, h_length, id_space, i_length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
JFH header;
|
||||
USHORT h_length;
|
||||
TEXT *id_space;
|
||||
@ -426,7 +426,7 @@ JIO_read_header(journal, header, h_length, id_space, i_length)
|
||||
|
||||
|
||||
SLONG JIO_rewind(journal, position)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
USHORT *position;
|
||||
{
|
||||
/**************************************
|
||||
@ -459,7 +459,7 @@ SLONG JIO_rewind(journal, position)
|
||||
|
||||
|
||||
JIO_truncate(journal, position, sequence)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
USHORT *position;
|
||||
SLONG sequence;
|
||||
{
|
||||
@ -503,7 +503,7 @@ JIO_truncate(journal, position, sequence)
|
||||
|
||||
|
||||
static acquire(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -530,7 +530,7 @@ static acquire(journal, data)
|
||||
|
||||
|
||||
static SLONG add_database(journal, name_string, name_length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
TEXT *name_string;
|
||||
USHORT name_length;
|
||||
{
|
||||
@ -643,7 +643,7 @@ static delete_dir(header, id_space, name_string, name_length)
|
||||
|
||||
|
||||
static error(journal, value, string, operation)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
int value;
|
||||
TEXT *string;
|
||||
ISC_STATUS operation;
|
||||
@ -669,7 +669,7 @@ static error(journal, value, string, operation)
|
||||
|
||||
#ifdef VMS
|
||||
static extend_file(journal)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -760,7 +760,7 @@ static extend_file(journal)
|
||||
|
||||
|
||||
static extend_segments(journal)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -797,7 +797,7 @@ static extend_segments(journal)
|
||||
|
||||
#ifdef VMS
|
||||
static journal_open(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -909,7 +909,7 @@ static journal_open(journal, data)
|
||||
|
||||
#ifndef VMS
|
||||
static journal_open(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -988,7 +988,7 @@ static DIR locate_dir(header, id_space, name_string, name_length)
|
||||
|
||||
#ifdef VMS
|
||||
static lock_create(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -1038,7 +1038,7 @@ static lock_create(journal, data)
|
||||
|
||||
#ifndef VMS
|
||||
static lock_create(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -1066,7 +1066,7 @@ static lock_create(journal, data)
|
||||
|
||||
|
||||
static bool lock_exclusive(journal, flag)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
SSHORT flag;
|
||||
{
|
||||
/**************************************
|
||||
@ -1095,7 +1095,7 @@ static bool lock_exclusive(journal, flag)
|
||||
|
||||
|
||||
static lock_release(journal)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1120,7 +1120,7 @@ static lock_release(journal)
|
||||
|
||||
|
||||
static SLONG lookup_id(journal, name_string, name_length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
TEXT *name_string;
|
||||
{
|
||||
/**************************************
|
||||
@ -1149,7 +1149,7 @@ static SLONG lookup_id(journal, name_string, name_length)
|
||||
|
||||
|
||||
static high_water(journal, header)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
JFH header;
|
||||
{
|
||||
/**************************************
|
||||
@ -1209,7 +1209,7 @@ static move(from, to, length)
|
||||
|
||||
#ifdef VMS
|
||||
static position_and_read(journal, block, buffer, length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
ULONG block;
|
||||
UCHAR *buffer;
|
||||
USHORT length;
|
||||
@ -1256,7 +1256,7 @@ static position_and_read(journal, block, buffer, length)
|
||||
|
||||
#ifndef VMS
|
||||
static position_and_read(journal, block, buffer, length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
ULONG block;
|
||||
UCHAR *buffer;
|
||||
USHORT length;
|
||||
@ -1290,7 +1290,7 @@ static position_and_read(journal, block, buffer, length)
|
||||
|
||||
#ifdef VMS
|
||||
static position_and_write(journal, block, buffer, length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
ULONG block;
|
||||
UCHAR *buffer;
|
||||
USHORT length;
|
||||
@ -1335,7 +1335,7 @@ static position_and_write(journal, block, buffer, length)
|
||||
|
||||
#ifndef VMS
|
||||
static position_and_write(journal, block, buffer, length)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
ULONG block;
|
||||
UCHAR *buffer;
|
||||
USHORT length;
|
||||
@ -1367,7 +1367,7 @@ static position_and_write(journal, block, buffer, length)
|
||||
|
||||
|
||||
static release(journal, data)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
@ -1395,7 +1395,7 @@ static release(journal, data)
|
||||
|
||||
#ifdef VMS
|
||||
static bool vms_convert(journal, data, mode, wait)
|
||||
JRN journal;
|
||||
jrn* journal;
|
||||
LDATA *data;
|
||||
{
|
||||
/**************************************
|
||||
|
@ -1265,7 +1265,8 @@ void PAG_init2(USHORT shadow_number)
|
||||
|
||||
fil* file = dbb->dbb_file;
|
||||
if (shadow_number) {
|
||||
for (sdw* shadow = dbb->dbb_shadow; shadow; shadow = shadow->sdw_next) {
|
||||
sdw* shadow = dbb->dbb_shadow;
|
||||
for (; shadow; shadow = shadow->sdw_next) {
|
||||
if (shadow->sdw_number == shadow_number) {
|
||||
file = shadow->sdw_file;
|
||||
break;
|
||||
|
@ -86,7 +86,7 @@ static const TEXT elements[][10] =
|
||||
#include "gen/codetext.h"
|
||||
|
||||
static void error(CSB, ...);
|
||||
static SSHORT find_proc_field(JRD_PRC, TEXT *);
|
||||
static SSHORT find_proc_field(jrd_prc*, TEXT *);
|
||||
static JRD_NOD par_args(TDBB, CSB, USHORT);
|
||||
static JRD_NOD par_cast(TDBB, CSB);
|
||||
static XCP par_condition(TDBB, CSB);
|
||||
@ -104,7 +104,7 @@ static JRD_NOD par_modify(TDBB, CSB);
|
||||
static USHORT par_name(CSB, TEXT *);
|
||||
static JRD_NOD par_plan(TDBB, CSB);
|
||||
static JRD_NOD par_procedure(TDBB, CSB, SSHORT);
|
||||
static void par_procedure_parms(TDBB, CSB, JRD_PRC, JRD_NOD *, JRD_NOD *, USHORT);
|
||||
static void par_procedure_parms(TDBB, CSB, jrd_prc*, JRD_NOD *, JRD_NOD *, USHORT);
|
||||
static JRD_NOD par_relation(TDBB, CSB, SSHORT, BOOLEAN);
|
||||
static JRD_NOD par_rse(TDBB, CSB, SSHORT);
|
||||
static JRD_NOD par_sort(TDBB, CSB, BOOLEAN);
|
||||
@ -122,11 +122,11 @@ static void warning(CSB, ...);
|
||||
|
||||
|
||||
JRD_NOD PAR_blr(TDBB tdbb,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
const UCHAR* blr,
|
||||
CSB view_csb,
|
||||
CSB* csb_ptr,
|
||||
JRD_REQ* request_ptr,
|
||||
jrd_req** request_ptr,
|
||||
BOOLEAN trigger,
|
||||
USHORT flags)
|
||||
{
|
||||
@ -444,7 +444,7 @@ JRD_NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context,
|
||||
}
|
||||
|
||||
jrd_nod* temp_node = PAR_gen_field(tdbb, stream, id);
|
||||
jrd_fld* field = (JRD_FLD) (*temp_rel->rel_fields)[id];
|
||||
jrd_fld* field = (jrd_fld*) (*temp_rel->rel_fields)[id];
|
||||
if (field) {
|
||||
if (field->fld_default_value && field->fld_not_null)
|
||||
temp_node->nod_arg[e_fld_default_value] =
|
||||
@ -659,7 +659,7 @@ static void error(CSB csb, ...)
|
||||
}
|
||||
|
||||
|
||||
static SSHORT find_proc_field(JRD_PRC procedure, TEXT * name)
|
||||
static SSHORT find_proc_field(jrd_prc* procedure, TEXT * name)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1097,12 +1097,12 @@ static JRD_NOD par_field(TDBB tdbb, CSB csb, SSHORT operator_)
|
||||
* Parse a field.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
JRD_PRC procedure;
|
||||
jrd_rel* relation;
|
||||
jrd_prc* procedure;
|
||||
TEXT name[32];
|
||||
SSHORT id;
|
||||
csb_repeat *tail;
|
||||
JRD_PRC scan_proc;
|
||||
jrd_prc* scan_proc;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
@ -1198,7 +1198,7 @@ static JRD_NOD par_field(TDBB tdbb, CSB csb, SSHORT operator_)
|
||||
if (is_column) {
|
||||
jrd_rel* temp_rel = csb->csb_rpt[stream].csb_relation;
|
||||
if (temp_rel) {
|
||||
jrd_fld* field = (JRD_FLD) (*temp_rel->rel_fields)[id];
|
||||
jrd_fld* field = (jrd_fld*) (*temp_rel->rel_fields)[id];
|
||||
if (field) {
|
||||
if (field->fld_default_value && field->fld_not_null)
|
||||
node->nod_arg[e_fld_default_value] =
|
||||
@ -1603,7 +1603,7 @@ static JRD_NOD par_plan(TDBB tdbb, CSB csb)
|
||||
|
||||
jrd_nod* relation_node = par_relation(tdbb, csb, n, FALSE);
|
||||
plan->nod_arg[e_retrieve_relation] = relation_node;
|
||||
jrd_rel* relation = (JRD_REL) relation_node->nod_arg[e_rel_relation];
|
||||
jrd_rel* relation = (jrd_rel*) relation_node->nod_arg[e_rel_relation];
|
||||
|
||||
n = BLR_BYTE;
|
||||
if (n >= csb->csb_rpt.getCount() || !(csb->csb_rpt[n].csb_flags & csb_used))
|
||||
@ -1742,7 +1742,7 @@ static JRD_NOD par_procedure(TDBB tdbb, CSB csb, SSHORT operator_)
|
||||
* Parse an procedural view reference.
|
||||
*
|
||||
**************************************/
|
||||
JRD_PRC procedure;
|
||||
jrd_prc* procedure;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
@ -1784,7 +1784,7 @@ static JRD_NOD par_procedure(TDBB tdbb, CSB csb, SSHORT operator_)
|
||||
static void par_procedure_parms(
|
||||
TDBB tdbb,
|
||||
CSB csb,
|
||||
JRD_PRC procedure,
|
||||
jrd_prc* procedure,
|
||||
JRD_NOD * message_ptr,
|
||||
JRD_NOD * parameter_ptr, USHORT input_flag)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ DATABASE DB = FILENAME "ODS.RDB";
|
||||
|
||||
#ifdef EXPRESSION_INDICES
|
||||
int PCMET_expression_index(
|
||||
TDBB tdbb, SSHORT phase, DFW work, JRD_TRA transaction)
|
||||
TDBB tdbb, SSHORT phase, DFW work, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -67,11 +67,11 @@ int PCMET_expression_index(
|
||||
* Create a new expression index.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
IDX idx;
|
||||
PLB default_pool, new_pool = NULL;
|
||||
CSB csb;
|
||||
JRD_REQ current_request;
|
||||
jrd_req* current_request;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
@ -196,7 +196,7 @@ int PCMET_expression_index(
|
||||
|
||||
|
||||
#ifdef EXPRESSION_INDICES
|
||||
void PCMET_lookup_index( JRD_REL relation, IDX * idx)
|
||||
void PCMET_lookup_index( jrd_rel* relation, IDX * idx)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -64,8 +64,10 @@ static void apply_transaction(TIP, jrnd*);
|
||||
static void disable(void);
|
||||
static JRNP* next_clump(jrnd*, const jrnp*);
|
||||
static void process_page(TDBB, jrnd*, SLONG, SLONG, PAG, SBM*, bool);
|
||||
static void quad_move(UCHAR *, UCHAR *);
|
||||
static void rec_process_record(TDBB, JRNH*, USHORT, ULONG,
|
||||
#ifdef NOT_USED_OR_REPLACED
|
||||
static void quad_move(const UCHAR*, UCHAR*); // unused
|
||||
#endif
|
||||
static void rec_process_record(TDBB, jrnh*, USHORT, ULONG,
|
||||
ULONG, PAG, SBM*, bool);
|
||||
static void scan_and_apply_logs(const TEXT*, TEXT*, CP*, SBM*, bool, SLONG*,
|
||||
SLONG, PAG);
|
||||
@ -894,7 +896,8 @@ static void process_page(
|
||||
}
|
||||
|
||||
|
||||
static void quad_move(UCHAR * a, UCHAR * b)
|
||||
#ifdef NOT_USED_OR_REPLACED
|
||||
static void quad_move(const UCHAR* a, UCHAR* b)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -912,11 +915,12 @@ static void quad_move(UCHAR * a, UCHAR * b)
|
||||
MOVE_BYTE(a, b);
|
||||
MOVE_BYTE(a, b);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void rec_process_record(
|
||||
TDBB tdbb,
|
||||
JRNH* record,
|
||||
jrnh* record,
|
||||
USHORT length,
|
||||
ULONG seqno,
|
||||
ULONG offset,
|
||||
@ -1073,7 +1077,7 @@ static void scan_and_apply_logs(
|
||||
continue;
|
||||
}
|
||||
|
||||
rec_process_record(tdbb, (JRNH *) wal_buff, len, seqno, offset, page,
|
||||
rec_process_record(tdbb, (jrnh*) wal_buff, len, seqno, offset, page,
|
||||
sbm_rec, activate_shadow);
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
|
||||
rpb req_rpb[1]; /* record parameter blocks */
|
||||
};
|
||||
typedef jrd_req *JRD_REQ;
|
||||
typedef jrd_req* JRD_REQ; // CVC: Scheduled for termination, don't use the uppercase type!!!
|
||||
|
||||
#define REQ_SIZE (sizeof (struct jrd_req) - sizeof (((JRD_REQ) NULL)->req_rpb[0]))
|
||||
|
||||
@ -302,3 +302,4 @@ class acc : public pool_alloc<type_acc>
|
||||
typedef acc *ACC;
|
||||
|
||||
#endif /* JRD_REQ_H */
|
||||
|
||||
|
@ -41,15 +41,15 @@
|
||||
#include "../jrd/vio_proto.h"
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static LCK allocate_record_lock(JRD_TRA, RPB *);
|
||||
static LCK allocate_record_lock(jrd_tra*, RPB *);
|
||||
#endif
|
||||
static LCK allocate_relation_lock(MemoryPool*, JRD_REL);
|
||||
static LCK allocate_relation_lock(MemoryPool*, jrd_rel*);
|
||||
#ifdef PC_ENGINE
|
||||
static LCK attachment_relation_lock(JRD_REL);
|
||||
static LCK attachment_relation_lock(jrd_rel*);
|
||||
static void drop_record_lock(LCK);
|
||||
static LCK find_record_lock(RPB *);
|
||||
static BOOLEAN obtain_lock(JRD_TRA, LCK, USHORT);
|
||||
static void start_record_locking(JRD_REL);
|
||||
static BOOLEAN obtain_lock(jrd_tra*, LCK, USHORT);
|
||||
static void start_record_locking(jrd_rel*);
|
||||
#endif
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ LCK RLCK_lock_record(RPB * rpb,
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
LCK RLCK_lock_record_implicit(JRD_TRA transaction,
|
||||
LCK RLCK_lock_record_implicit(jrd_tra* transaction,
|
||||
RPB * rpb,
|
||||
USHORT lock_level,
|
||||
int (*ast) (BLK), BLK ast_arg)
|
||||
@ -139,7 +139,7 @@ LCK RLCK_lock_record_implicit(JRD_TRA transaction,
|
||||
*
|
||||
**************************************/
|
||||
USHORT interest_lock_level = 0;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
|
||||
lck* lock = allocate_record_lock(transaction, rpb);
|
||||
lock->lck_ast = ast;
|
||||
@ -197,7 +197,7 @@ LCK RLCK_lock_record_implicit(JRD_TRA transaction,
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
LCK RLCK_lock_relation(JRD_REL relation,
|
||||
LCK RLCK_lock_relation(jrd_rel* relation,
|
||||
USHORT lock_level, int (*ast) (BLK), BLK ast_arg)
|
||||
{
|
||||
/**************************************
|
||||
@ -229,8 +229,8 @@ LCK RLCK_lock_relation(JRD_REL relation,
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
LCK RLCK_range_relation(JRD_TRA transaction,
|
||||
JRD_REL relation, int (*ast) (BLK), BLK ast_arg)
|
||||
LCK RLCK_range_relation(jrd_tra* transaction,
|
||||
jrd_rel* relation, int (*ast) (BLK), BLK ast_arg)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -274,7 +274,7 @@ LCK RLCK_range_relation(JRD_TRA transaction,
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
LCK RLCK_record_locking(JRD_REL relation)
|
||||
LCK RLCK_record_locking(jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -347,7 +347,7 @@ void RLCK_release_lock(LCK lock)
|
||||
/* now use the lock type to determine the type
|
||||
of lock to release */
|
||||
if (lock->lck_type == LCK_relation)
|
||||
RLCK_unlock_relation(0, (JRD_REL) lock->lck_object);
|
||||
RLCK_unlock_relation(0, (jrd_rel*) lock->lck_object);
|
||||
else if (lock->lck_type == LCK_record)
|
||||
RLCK_unlock_record(lock, 0);
|
||||
else
|
||||
@ -376,7 +376,7 @@ void RLCK_release_locks(ATT attachment)
|
||||
if (vector = attachment->att_relation_locks) {
|
||||
for (lptr = vector->begin(), lend = vector->end(); lptr < lend; lptr++) {
|
||||
if (lock = ((LCK)(*lptr)) )
|
||||
RLCK_unlock_relation(0, (JRD_REL) lock->lck_object);
|
||||
RLCK_unlock_relation(0, (jrd_rel*) lock->lck_object);
|
||||
}
|
||||
}
|
||||
/* unlock all explicit record locks */
|
||||
@ -395,8 +395,8 @@ void RLCK_release_locks(ATT attachment)
|
||||
|
||||
|
||||
LCK RLCK_reserve_relation(TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
JRD_REL relation, USHORT write_flag, USHORT error_flag)
|
||||
jrd_tra* transaction,
|
||||
jrd_rel* relation, USHORT write_flag, USHORT error_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -511,7 +511,7 @@ void RLCK_shutdown_database(DBB dbb)
|
||||
for (ptr = vector->begin(), end = vector->end(); ptr < end; ptr++)
|
||||
{
|
||||
jrd_rel* relation;
|
||||
if ( (relation = ((JRD_REL)(*ptr)) ) ) {
|
||||
if ( (relation = ((jrd_rel*)(*ptr)) ) ) {
|
||||
if (relation->rel_record_locking)
|
||||
LCK_release(tdbb, relation->rel_record_locking);
|
||||
if (relation->rel_interest_lock)
|
||||
@ -526,7 +526,7 @@ void RLCK_shutdown_database(DBB dbb)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
void RLCK_signal_refresh(JRD_TRA transaction)
|
||||
void RLCK_signal_refresh(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -540,7 +540,7 @@ void RLCK_signal_refresh(JRD_TRA transaction)
|
||||
*
|
||||
**************************************/
|
||||
USHORT i;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
/* for each relation, take out a range relation lock and then release it */
|
||||
@ -561,7 +561,7 @@ void RLCK_signal_refresh(JRD_TRA transaction)
|
||||
for (i = 0; i < vector->count(); i++) {
|
||||
lck* lock = (LCK *) ((*vector)[i]);
|
||||
if (lock) {
|
||||
relation = (JRD_REL) lock->lck_object;
|
||||
relation = (jrd_rel*) lock->lck_object;
|
||||
local_lock->lck_key.lck_long = relation->rel_id;
|
||||
local_lock->lck_object = reinterpret_cast<blk*>(relation);
|
||||
LCK_lock_non_blocking(tdbb, local_lock, LCK_SW, 0);
|
||||
@ -574,7 +574,7 @@ void RLCK_signal_refresh(JRD_TRA transaction)
|
||||
#endif
|
||||
|
||||
|
||||
LCK RLCK_transaction_relation_lock(JRD_TRA transaction, JRD_REL relation)
|
||||
LCK RLCK_transaction_relation_lock(jrd_tra* transaction, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -631,13 +631,13 @@ void RLCK_unlock_record(LCK lock, RPB * rpb)
|
||||
* in the specified record parameter block.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
LCK record_locking;
|
||||
SLONG process_count;
|
||||
if (rpb)
|
||||
relation = rpb->rpb_relation;
|
||||
else if (lock)
|
||||
relation = (JRD_REL) lock->lck_parent->lck_object;
|
||||
relation = (jrd_rel*) lock->lck_parent->lck_object;
|
||||
else
|
||||
relation = NULL; /* theoretically impossible */
|
||||
RLCK_unlock_record_implicit(lock, rpb);
|
||||
@ -693,7 +693,7 @@ void RLCK_unlock_record_implicit(LCK lock, RPB * rpb)
|
||||
So do nothing.
|
||||
*/
|
||||
|
||||
jrd_rel* relation = (JRD_REL) lock->lck_parent->lck_object;
|
||||
jrd_rel* relation = (jrd_rel*) lock->lck_parent->lck_object;
|
||||
if (lock_level == LCK_EX) {
|
||||
if (!--relation->rel_write_locks)
|
||||
if (!relation->rel_read_locks)
|
||||
@ -713,7 +713,7 @@ void RLCK_unlock_record_implicit(LCK lock, RPB * rpb)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
void RLCK_unlock_relation(LCK lock, JRD_REL relation)
|
||||
void RLCK_unlock_relation(LCK lock, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -760,7 +760,7 @@ void RLCK_unlock_relation(LCK lock, JRD_REL relation)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static LCK allocate_record_lock(JRD_TRA transaction, RPB * rpb)
|
||||
static LCK allocate_record_lock(jrd_tra* transaction, RPB * rpb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -816,7 +816,7 @@ static LCK allocate_record_lock(JRD_TRA transaction, RPB * rpb)
|
||||
|
||||
|
||||
#endif
|
||||
static LCK allocate_relation_lock(MemoryPool* pool, JRD_REL relation)
|
||||
static LCK allocate_relation_lock(MemoryPool* pool, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -848,7 +848,7 @@ static LCK allocate_relation_lock(MemoryPool* pool, JRD_REL relation)
|
||||
}
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static LCK attachment_relation_lock(JRD_REL relation)
|
||||
static LCK attachment_relation_lock(jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -939,7 +939,7 @@ static LCK find_record_lock(RPB * rpb)
|
||||
for (lock = attachment->att_record_locks; lock; lock = lock->lck_att_next)
|
||||
{
|
||||
if ((rpb->rpb_number == lock->lck_key.lck_long)
|
||||
&& (rpb->rpb_relation == (JRD_REL) lock->lck_parent->lck_object))
|
||||
&& (rpb->rpb_relation == (jrd_rel*) lock->lck_parent->lck_object))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -949,7 +949,7 @@ static LCK find_record_lock(RPB * rpb)
|
||||
#endif
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static BOOLEAN obtain_lock(JRD_TRA transaction, LCK lock, USHORT lock_level)
|
||||
static BOOLEAN obtain_lock(jrd_tra* transaction, LCK lock, USHORT lock_level)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -982,7 +982,7 @@ static BOOLEAN obtain_lock(JRD_TRA transaction, LCK lock, USHORT lock_level)
|
||||
#endif
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static void start_record_locking(JRD_REL relation)
|
||||
static void start_record_locking(jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ void RNG_add_page(ULONG page_number)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RNG refresh_range, next_refresh_range;
|
||||
VEC page_locks;
|
||||
LCK page_lock;
|
||||
@ -148,7 +148,7 @@ void RNG_add_record(RPB * rpb)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RNG refresh_range, next_refresh_range;
|
||||
VEC record_locks;
|
||||
LCK record_lock;
|
||||
@ -220,13 +220,13 @@ JRD_NOD RNG_add_relation(JRD_NOD node)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
DSC *desc;
|
||||
USHORT range_number;
|
||||
VEC refresh_ranges;
|
||||
RNG refresh_range;
|
||||
JRD_NOD relation_node;
|
||||
JRD_REL relation;
|
||||
jrd_rel* relation;
|
||||
LCK relation_lock;
|
||||
VEC relation_locks;
|
||||
|
||||
@ -238,7 +238,7 @@ JRD_NOD RNG_add_relation(JRD_NOD node)
|
||||
range_number = (USHORT) MOV_get_long(desc, 0);
|
||||
|
||||
relation_node = node->nod_arg[e_range_relation_relation];
|
||||
relation = (JRD_REL) relation_node->nod_arg[e_rel_relation];
|
||||
relation = (jrd_rel*) relation_node->nod_arg[e_rel_relation];
|
||||
|
||||
/* check to see if the range exists */
|
||||
|
||||
@ -298,7 +298,7 @@ void RNG_add_uncommitted_record(RPB * rpb)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RNG refresh_range, next_refresh_range;
|
||||
VEC transaction_locks;
|
||||
LCK transaction_lock;
|
||||
@ -373,8 +373,8 @@ DSC *RNG_begin(JRD_NOD node, VLU impure)
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
DBB dbb;
|
||||
JRD_REQ request;
|
||||
JRD_TRA transaction;
|
||||
jrd_req* request;
|
||||
jrd_tra* transaction;
|
||||
DSC desc, *desc2;
|
||||
RNG refresh_range;
|
||||
USHORT range_number;
|
||||
@ -477,7 +477,7 @@ JRD_NOD RNG_delete(JRD_NOD node)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
DSC *desc;
|
||||
RNG refresh_range;
|
||||
USHORT range_number;
|
||||
@ -509,7 +509,7 @@ JRD_NOD RNG_delete(JRD_NOD node)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
void RNG_delete_ranges(JRD_REQ request)
|
||||
void RNG_delete_ranges(jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -551,7 +551,7 @@ JRD_NOD RNG_end(JRD_NOD node)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
DSC *desc;
|
||||
RNG refresh_range, *ptr;
|
||||
USHORT range_number;
|
||||
@ -662,7 +662,7 @@ void RNG_release_locks(RNG refresh_range)
|
||||
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
void RNG_release_ranges(JRD_REQ request)
|
||||
void RNG_release_ranges(jrd_req* request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -710,7 +710,7 @@ void RNG_shutdown_attachment(ATT attachment)
|
||||
VEC refresh_ranges;
|
||||
RNG refresh_range;
|
||||
USHORT range_number, i;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
LCK *lock_ptr;
|
||||
TDBB tdbb;
|
||||
|
||||
@ -770,7 +770,7 @@ static void delete_range(RNG refresh_range)
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
DBB dbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
VEC refresh_ranges;
|
||||
RNG *ptr;
|
||||
|
||||
@ -883,7 +883,7 @@ static void stop_creating(RNG refresh_range)
|
||||
*
|
||||
**************************************/
|
||||
TDBB tdbb;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RNG *ptr;
|
||||
|
||||
tdbb = GET_THREAD_DATA;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*
|
||||
* $Id: rse.cpp,v 1.48 2003-12-31 05:35:53 robocop Exp $
|
||||
* $Id: rse.cpp,v 1.49 2004-01-03 10:59:41 robocop Exp $
|
||||
*
|
||||
* 2001.07.28: John Bellardo: Implemented rse_skip and made rse_first work with
|
||||
* seekable streams.
|
||||
@ -112,13 +112,13 @@ static BOOLEAN get_procedure(TDBB, RSB, IRSB_PROCEDURE, RPB *);
|
||||
static BOOLEAN get_record(TDBB, RSB, RSB, RSE_GET_MODE);
|
||||
static BOOLEAN get_union(TDBB, RSB, IRSB);
|
||||
static void join_to_nulls(TDBB, RSB, USHORT);
|
||||
static void map_sort_data(JRD_REQ, SMB, UCHAR *);
|
||||
static void map_sort_data(jrd_req*, SMB, UCHAR *);
|
||||
static void open_merge(TDBB, RSB, IRSB_MRG);
|
||||
static void open_procedure(TDBB, RSB, IRSB_PROCEDURE);
|
||||
static void open_sort(TDBB, RSB, IRSB_SORT, UINT64);
|
||||
static void proc_assignment(const dsc*, const dsc*, UCHAR*, dsc*, SSHORT, REC);
|
||||
static void pop_rpbs(JRD_REQ, RSB);
|
||||
static void push_rpbs(TDBB, JRD_REQ, RSB);
|
||||
static void pop_rpbs(jrd_req*, RSB);
|
||||
static void push_rpbs(TDBB, jrd_req*, RSB);
|
||||
static ULONG read_merge_block(TDBB, MFB, ULONG);
|
||||
static bool reject(const UCHAR*, const UCHAR*, void*);
|
||||
static void restore_record(RPB *);
|
||||
@ -160,7 +160,7 @@ void RSE_close(TDBB tdbb, RSB rsb)
|
||||
|
||||
case rsb_sequential:
|
||||
{
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
RPB* rpb = &request->req_rpb[rsb->rsb_stream];
|
||||
if (rpb->rpb_window.win_flags & WIN_large_scan &&
|
||||
rpb->rpb_relation->rel_scan_count)
|
||||
@ -248,7 +248,7 @@ BOOLEAN RSE_find_dbkey(TDBB tdbb, RSB rsb, JRD_NOD find_key, JRD_NOD record_vers
|
||||
SBM *bitmap;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
/* get the record number from the passed dbkey */
|
||||
|
||||
@ -419,7 +419,7 @@ BOOLEAN RSE_get_record(TDBB tdbb, RSB rsb, RSE_GET_MODE mode)
|
||||
*
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
IRSB impure = (IRSB) ((UCHAR *) request + rsb->rsb_impure);
|
||||
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
@ -446,7 +446,7 @@ BOOLEAN RSE_get_record(TDBB tdbb, RSB rsb, RSE_GET_MODE mode)
|
||||
if (rsb->rsb_flags & rsb_writelock)
|
||||
{
|
||||
// Lock record if we were asked for it
|
||||
JRD_TRA transaction = request->req_transaction;
|
||||
jrd_tra* transaction = request->req_transaction;
|
||||
|
||||
RSB test_rsb;
|
||||
if (rsb->rsb_type == rsb_boolean)
|
||||
@ -455,7 +455,7 @@ BOOLEAN RSE_get_record(TDBB tdbb, RSB rsb, RSE_GET_MODE mode)
|
||||
test_rsb = rsb;
|
||||
|
||||
RPB* org_rpb = request->req_rpb + test_rsb->rsb_stream;
|
||||
JRD_REL relation = org_rpb->rpb_relation;
|
||||
jrd_rel* relation = org_rpb->rpb_relation;
|
||||
|
||||
if (relation && !relation->rel_view_rse && !relation->rel_file)
|
||||
{
|
||||
@ -499,7 +499,7 @@ BKM RSE_get_bookmark(TDBB tdbb, RSB rsb)
|
||||
* the current record in a navigational stream.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
BKM bookmark;
|
||||
RPB *rpb;
|
||||
|
||||
@ -554,7 +554,7 @@ void RSE_mark_crack(TDBB tdbb, RSB rsb, USHORT flags)
|
||||
* Position stream on a crack.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
IRSB impure;
|
||||
|
||||
@ -610,7 +610,7 @@ void RSE_open(TDBB tdbb, RSB rsb)
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
while (true) {
|
||||
IRSB_INDEX impure = (IRSB_INDEX) ((SCHAR *) request + rsb->rsb_impure);
|
||||
@ -794,7 +794,7 @@ BOOLEAN RSE_reset_position(TDBB tdbb, RSB rsb, RPB * new_rpb)
|
||||
* the position indicated by the passed record.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RPB *rpb;
|
||||
IRSB_INDEX impure;
|
||||
SBM *bitmap;
|
||||
@ -868,7 +868,7 @@ BOOLEAN RSE_set_bookmark(TDBB tdbb, RSB rsb, RPB * rpb, BKM bookmark)
|
||||
* specified by the given bookmark.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
IRSB impure;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -969,9 +969,9 @@ static void close_procedure(TDBB tdbb, RSB rsb)
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
IRSB_PROCEDURE impure = (IRSB_PROCEDURE) ((UCHAR *) request + rsb->rsb_impure);
|
||||
JRD_REQ proc_request = impure->irsb_req_handle;
|
||||
jrd_req* proc_request = impure->irsb_req_handle;
|
||||
if (proc_request) {
|
||||
/* bug #7884: at this point the transaction could already have
|
||||
been released, so null it out so as not to dereference it */
|
||||
@ -1007,7 +1007,7 @@ static SSHORT compare(TDBB tdbb, jrd_nod* node1, jrd_nod* node2)
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
jrd_nod* const* ptr1 = node1->nod_arg;
|
||||
jrd_nod* const* ptr2 = node2->nod_arg;
|
||||
for (const jrd_nod* const* const end = ptr1 + node1->nod_count;
|
||||
@ -1621,7 +1621,7 @@ static BOOLEAN get_merge_join(
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
RSB* const end = rsb->rsb_arg + rsb->rsb_count * 2;
|
||||
|
||||
/* If there is a group of equivalent records already formed,
|
||||
@ -1842,7 +1842,7 @@ static BOOLEAN get_merge_join(TDBB tdbb, RSB rsb, IRSB_MRG impure)
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
RSB* const end = rsb->rsb_arg + rsb->rsb_count * 2;
|
||||
|
||||
/* If there is a record group already formed, fetch the next combination */
|
||||
@ -2092,10 +2092,10 @@ static BOOLEAN get_procedure(TDBB tdbb,
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
JRD_PRC procedure = rsb->rsb_procedure;
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_prc* procedure = rsb->rsb_procedure;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
impure = (IRSB_PROCEDURE) ((UCHAR *) request + rsb->rsb_impure);
|
||||
JRD_REQ proc_request = impure->irsb_req_handle;
|
||||
jrd_req* proc_request = impure->irsb_req_handle;
|
||||
fmt* rec_format = procedure->prc_format;
|
||||
|
||||
const fmt* msg_format = (FMT) procedure->prc_output_msg->nod_arg[e_msg_format];
|
||||
@ -2181,7 +2181,7 @@ static BOOLEAN get_record(TDBB tdbb,
|
||||
|
||||
/* check request flags for special processing */
|
||||
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
if (request->req_flags & req_abort)
|
||||
{
|
||||
return FALSE;
|
||||
@ -2800,7 +2800,7 @@ static UCHAR *get_sort(TDBB tdbb, RSB rsb
|
||||
*
|
||||
**************************************/
|
||||
IRSB_SORT impure;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
UCHAR *data;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
@ -2876,7 +2876,7 @@ static void join_to_nulls(TDBB tdbb, RSB rsb, USHORT streams)
|
||||
* outer join, and make them all indicate a null record.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
LLS stack;
|
||||
RPB *rpb;
|
||||
FMT format;
|
||||
@ -2906,7 +2906,7 @@ static void join_to_nulls(TDBB tdbb, RSB rsb, USHORT streams)
|
||||
}
|
||||
|
||||
|
||||
static void map_sort_data(JRD_REQ request, SMB map, UCHAR * data)
|
||||
static void map_sort_data(jrd_req* request, SMB map, UCHAR * data)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3041,36 +3041,35 @@ static void open_procedure(TDBB tdbb, RSB rsb, IRSB_PROCEDURE impure)
|
||||
* Initialize a procedural view.
|
||||
*
|
||||
**************************************/
|
||||
JRD_NOD inputs, *ptr, *end, in_message;
|
||||
JRD_PRC procedure;
|
||||
JRD_REQ request, proc_request;
|
||||
JRD_NOD *ptr, *end, in_message;
|
||||
FMT format;
|
||||
USHORT iml;
|
||||
UCHAR *im;
|
||||
RPB *rpb;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
inputs = (JRD_NOD) rsb->rsb_arg[RSB_PRC_inputs];
|
||||
procedure = rsb->rsb_procedure;
|
||||
request = tdbb->tdbb_request;
|
||||
jrd_nod* inputs = (JRD_NOD) rsb->rsb_arg[RSB_PRC_inputs];
|
||||
jrd_prc* procedure = rsb->rsb_procedure;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
/* get rid of any lingering record */
|
||||
|
||||
rpb = request->req_rpb + rsb->rsb_stream;
|
||||
RPB* rpb = request->req_rpb + rsb->rsb_stream;
|
||||
if (rpb->rpb_record) {
|
||||
delete rpb->rpb_record;
|
||||
rpb->rpb_record = NULL;
|
||||
}
|
||||
|
||||
proc_request = EXE_find_request(tdbb, procedure->prc_request, FALSE);
|
||||
jrd_req* proc_request = EXE_find_request(tdbb, procedure->prc_request, FALSE);
|
||||
impure->irsb_req_handle = proc_request;
|
||||
if (inputs) {
|
||||
enum jrd_req::req_s saved_state = request->req_operation;
|
||||
|
||||
for (ptr = inputs->nod_arg, end = ptr + inputs->nod_count; ptr < end;
|
||||
ptr++)
|
||||
{
|
||||
EXE_assignment(tdbb, *ptr);
|
||||
}
|
||||
|
||||
request->req_operation = saved_state;
|
||||
in_message = (JRD_NOD) rsb->rsb_arg[RSB_PRC_in_msg];
|
||||
@ -3088,8 +3087,9 @@ static void open_procedure(TDBB tdbb, RSB rsb, IRSB_PROCEDURE impure)
|
||||
|
||||
proc_request->req_flags &= ~req_proc_fetch;
|
||||
EXE_start(tdbb, proc_request, request->req_transaction);
|
||||
if (iml)
|
||||
if (iml) {
|
||||
EXE_send(tdbb, proc_request, 0, iml, im);
|
||||
}
|
||||
proc_request->req_flags |= req_proc_fetch;
|
||||
}
|
||||
|
||||
@ -3113,7 +3113,7 @@ static void open_sort(TDBB tdbb, RSB rsb, IRSB_SORT impure, UINT64 max_records)
|
||||
smb_repeat *item, *end_item;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
RSE_open(tdbb, rsb->rsb_next);
|
||||
SMB map = (SMB) rsb->rsb_arg[0];
|
||||
@ -3321,7 +3321,7 @@ static void proc_assignment(
|
||||
}
|
||||
|
||||
|
||||
static void pop_rpbs(JRD_REQ request, RSB rsb)
|
||||
static void pop_rpbs(jrd_req* request, RSB rsb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3433,7 +3433,7 @@ static void pop_rpbs(JRD_REQ request, RSB rsb)
|
||||
}
|
||||
|
||||
|
||||
static void push_rpbs(TDBB tdbb, JRD_REQ request, RSB rsb)
|
||||
static void push_rpbs(TDBB tdbb, jrd_req* request, RSB rsb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -3648,7 +3648,7 @@ static void resynch_merge(
|
||||
* to the number of records in the grouping.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
RSB *ptr, *end, sort_rsb;
|
||||
SLONG records;
|
||||
irsb_mrg::irsb_mrg_repeat * tail;
|
||||
@ -3750,7 +3750,7 @@ static void unget_sort(TDBB tdbb, RSB rsb, UCHAR * data)
|
||||
*
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
JRD_REQ request = tdbb->tdbb_request;
|
||||
jrd_req* request = tdbb->tdbb_request;
|
||||
|
||||
IRSB_SORT impure = (IRSB_SORT) ((UCHAR *) request + rsb->rsb_impure);
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
typedef struct thread {
|
||||
struct thread *thread_next; /* Next thread to be scheduled */
|
||||
struct thread *thread_prior; /* Prior thread */
|
||||
EVENT_T thread_stall[1]; /* Generic event to stall thread */
|
||||
event_t thread_stall[1]; /* Generic event to stall thread */
|
||||
SLONG thread_id; /* Current thread id */
|
||||
USHORT thread_count; /* AST disable count */
|
||||
USHORT thread_flags; /* Flags */
|
||||
|
194
src/jrd/scl.epp
194
src/jrd/scl.epp
@ -82,9 +82,11 @@ static bool check_hex(const TEXT*, USHORT);
|
||||
static bool check_number(const TEXT*, USHORT);
|
||||
static bool check_user_group(const TEXT*, USHORT, STR*, ULONG*);
|
||||
static bool check_string(const TEXT*, const TEXT*);
|
||||
static SLONG compute_access(TDBB, const scl*, JRD_REL, const TEXT*, const TEXT*);
|
||||
static SLONG compute_access(TDBB, const scl*, const jrd_rel*, const TEXT*,
|
||||
const TEXT*);
|
||||
static TEXT* save_string(const TEXT*, TEXT**);
|
||||
static SLONG walk_acl(TDBB, const TEXT*, JRD_REL, const TEXT*, const TEXT*, STR*, ULONG*);
|
||||
static SLONG walk_acl(TDBB, const TEXT*, const jrd_rel*, const TEXT*,
|
||||
const TEXT*, STR*, ULONG*);
|
||||
|
||||
static inline void check_and_move(UCHAR*& to, UCHAR from, STR& start, ULONG* length_ptr)
|
||||
{
|
||||
@ -148,9 +150,9 @@ void SCL_check_access(const scl* s_class,
|
||||
0);
|
||||
}
|
||||
|
||||
ATT attachment = tdbb->tdbb_attachment;
|
||||
att* attachment = tdbb->tdbb_attachment;
|
||||
|
||||
SCL att_class = attachment->att_security_class;
|
||||
const scl* att_class = attachment->att_security_class;
|
||||
if (att_class && !(att_class->scl_flags & mask))
|
||||
{
|
||||
type = "DATABASE";
|
||||
@ -161,9 +163,10 @@ void SCL_check_access(const scl* s_class,
|
||||
if (!s_class || (mask & s_class->scl_flags)) {
|
||||
return;
|
||||
}
|
||||
JRD_REL view = NULL;
|
||||
if (view_id)
|
||||
const jrd_rel* view = NULL;
|
||||
if (view_id) {
|
||||
view = MET_lookup_relation_id(tdbb, view_id, false);
|
||||
}
|
||||
if ((view || trg_name || prc_name) &&
|
||||
(compute_access(tdbb, s_class, view, trg_name, prc_name) & mask))
|
||||
{
|
||||
@ -196,7 +199,7 @@ void SCL_check_access(const scl* s_class,
|
||||
}
|
||||
|
||||
|
||||
void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
void SCL_check_index(TDBB tdbb, const TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
{
|
||||
/******************************************************
|
||||
*
|
||||
@ -215,13 +218,10 @@ void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
* becomes relation_name since index ids are relative to tables.
|
||||
*
|
||||
*******************************************************/
|
||||
SCL s_class, default_s_class;
|
||||
TEXT reln_name[32], aux_idx_name[32];
|
||||
TEXT *idx_name_ptr = index_name, *relation_name_ptr = index_name;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
s_class = default_s_class = NULL;
|
||||
const scl* s_class = NULL;
|
||||
const scl* default_s_class = NULL;
|
||||
|
||||
// No security to check for if the index is not yet created
|
||||
|
||||
@ -229,7 +229,10 @@ void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
return;
|
||||
}
|
||||
|
||||
TEXT reln_name[32], aux_idx_name[32];
|
||||
reln_name[0] = aux_idx_name[0] = 0;
|
||||
const TEXT* idx_name_ptr = index_name;
|
||||
const TEXT* relation_name_ptr = index_name;
|
||||
|
||||
volatile BLK request = NULL;
|
||||
|
||||
@ -249,7 +252,7 @@ void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
default_s_class = SCL_get_class(REL.RDB$DEFAULT_CLASS);
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ) request);
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
}
|
||||
else {
|
||||
idx_name_ptr = aux_idx_name;
|
||||
@ -267,14 +270,15 @@ void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
default_s_class = SCL_get_class (REL.RDB$DEFAULT_CLASS);
|
||||
END_FOR;
|
||||
|
||||
CMP_release (tdbb, (JRD_REQ)request);
|
||||
CMP_release (tdbb, (jrd_req*)request);
|
||||
}
|
||||
|
||||
// Check if the relation exists. It may not have been created yet.
|
||||
// Just return in that case.
|
||||
|
||||
if (!reln_name || !*reln_name)
|
||||
if (!reln_name || !*reln_name) {
|
||||
return;
|
||||
}
|
||||
|
||||
SCL_check_access(s_class, 0, NULL, NULL, mask, object_table, reln_name);
|
||||
|
||||
@ -304,24 +308,25 @@ void SCL_check_index(TDBB tdbb, TEXT* index_name, UCHAR index_id, USHORT mask)
|
||||
SCL_check_access(s_class, 0, NULL, NULL, mask,
|
||||
object_column, RF.RDB$FIELD_NAME);
|
||||
}
|
||||
else
|
||||
else {
|
||||
SCL_check_access(default_s_class, 0, NULL, NULL, mask,
|
||||
object_column, RF.RDB$FIELD_NAME);
|
||||
}
|
||||
|
||||
END_FOR;
|
||||
|
||||
CMP_release(tdbb, (JRD_REQ) request);
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
}
|
||||
catch (const std::exception&) {
|
||||
if (request) {
|
||||
CMP_release(tdbb, (JRD_REQ) request);
|
||||
CMP_release(tdbb, (jrd_req*) request);
|
||||
}
|
||||
Firebird::status_exception::raise(tdbb->tdbb_status_vector[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCL_check_procedure(DSC* dsc_name, USHORT mask)
|
||||
void SCL_check_procedure(const dsc* dsc_name, USHORT mask)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -348,26 +353,27 @@ void SCL_check_procedure(DSC* dsc_name, USHORT mask)
|
||||
const TEXT* const endp = name + sizeof(name) - 1;
|
||||
const TEXT* q = (TEXT*) dsc_name->dsc_address;
|
||||
const TEXT* const endq = q + dsc_name->dsc_length;
|
||||
while (q < endq && p < endp && *q)
|
||||
while (q < endq && p < endp && *q) {
|
||||
*p++ = *q++;
|
||||
}
|
||||
*p = 0;
|
||||
} // end scope block
|
||||
fb_utils::fb_exact_name(name);
|
||||
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
|
||||
SCL s_class = NULL;
|
||||
const scl* s_class = NULL;
|
||||
|
||||
BLK request = (BLK) CMP_find_request(tdbb, irq_p_security, IRQ_REQUESTS);
|
||||
|
||||
FOR(REQUEST_HANDLE request) JRD_PRC IN RDB$PROCEDURES WITH
|
||||
JRD_PRC.RDB$PROCEDURE_NAME EQ name
|
||||
FOR(REQUEST_HANDLE request) SPROC IN RDB$PROCEDURES
|
||||
WITH SPROC.RDB$PROCEDURE_NAME EQ name
|
||||
|
||||
if (!REQUEST(irq_p_security))
|
||||
REQUEST(irq_p_security) = request;
|
||||
|
||||
if (!JRD_PRC.RDB$SECURITY_CLASS.NULL)
|
||||
s_class = SCL_get_class(JRD_PRC.RDB$SECURITY_CLASS);
|
||||
if (!SPROC.RDB$SECURITY_CLASS.NULL)
|
||||
s_class = SCL_get_class(SPROC.RDB$SECURITY_CLASS);
|
||||
END_FOR;
|
||||
|
||||
if (!REQUEST(irq_p_security))
|
||||
@ -377,7 +383,7 @@ void SCL_check_procedure(DSC* dsc_name, USHORT mask)
|
||||
}
|
||||
|
||||
|
||||
void SCL_check_relation(DSC* dsc_name, USHORT mask)
|
||||
void SCL_check_relation(const dsc* dsc_name, USHORT mask)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -404,20 +410,21 @@ void SCL_check_relation(DSC* dsc_name, USHORT mask)
|
||||
const TEXT* const endp = name + sizeof(name) - 1;
|
||||
const TEXT* q = (TEXT*) dsc_name->dsc_address;
|
||||
const TEXT* const endq = q + dsc_name->dsc_length;
|
||||
while (q < endq && p < endp && *q)
|
||||
while (q < endq && p < endp && *q) {
|
||||
*p++ = *q++;
|
||||
}
|
||||
*p = 0;
|
||||
} // end scope block
|
||||
fb_utils::fb_exact_name(name);
|
||||
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
|
||||
SCL s_class = NULL;
|
||||
const scl* s_class = NULL;
|
||||
|
||||
BLK request = (BLK) CMP_find_request(tdbb, irq_v_security, IRQ_REQUESTS);
|
||||
|
||||
FOR(REQUEST_HANDLE request) REL IN RDB$RELATIONS WITH
|
||||
REL.RDB$RELATION_NAME EQ name
|
||||
FOR(REQUEST_HANDLE request) REL IN RDB$RELATIONS
|
||||
WITH REL.RDB$RELATION_NAME EQ name
|
||||
|
||||
if (!REQUEST(irq_v_security))
|
||||
REQUEST(irq_v_security) = request;
|
||||
@ -452,13 +459,15 @@ SCL SCL_get_class(/* INOUT */ TEXT* string)
|
||||
|
||||
// Name may be absent or terminated with NULL or blank. Clean up name.
|
||||
|
||||
if (!string)
|
||||
if (!string) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fb_utils::fb_exact_name(string);
|
||||
|
||||
if (!string[0])
|
||||
if (!string[0]) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ATT attachment = tdbb->tdbb_attachment;
|
||||
|
||||
@ -508,18 +517,16 @@ int SCL_get_mask(const TEXT* relation_name, const TEXT* field_name)
|
||||
* access for database.
|
||||
*
|
||||
**************************************/
|
||||
JRD_REL relation;
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
ATT attachment = tdbb->tdbb_attachment;
|
||||
|
||||
// Start with database security class
|
||||
|
||||
SCL s_class = attachment->att_security_class;
|
||||
const scl* s_class = attachment->att_security_class;
|
||||
USHORT access = (s_class) ? s_class->scl_flags : -1;
|
||||
|
||||
// If there's a relation, track it down
|
||||
|
||||
jrd_rel* relation;
|
||||
if (relation_name &&
|
||||
(relation = MET_lookup_relation(tdbb, relation_name)))
|
||||
{
|
||||
@ -529,7 +536,7 @@ int SCL_get_mask(const TEXT* relation_name, const TEXT* field_name)
|
||||
access &= s_class->scl_flags;
|
||||
}
|
||||
|
||||
JRD_FLD field;
|
||||
jrd_fld* field;
|
||||
SSHORT id;
|
||||
if (field_name &&
|
||||
(id = MET_lookup_field(tdbb, relation, field_name, 0)) >= 0 &&
|
||||
@ -662,7 +669,7 @@ void SCL_init(bool create,
|
||||
if (!REQUEST(irq_get_role_name))
|
||||
REQUEST(irq_get_role_name) = request;
|
||||
|
||||
EXE_unwind(tdbb, (JRD_REQ) request);
|
||||
EXE_unwind(tdbb, (jrd_req*) request);
|
||||
ERR_post(isc_login_same_as_role_name,
|
||||
isc_arg_string, ERR_cstring(login_name), 0);
|
||||
|
||||
@ -730,7 +737,7 @@ void SCL_init(bool create,
|
||||
strcpy(role_name, "NONE");
|
||||
}
|
||||
|
||||
USHORT length = strlen(name) + strlen(role_name) + strlen(project) +
|
||||
const USHORT length = strlen(name) + strlen(role_name) + strlen(project) +
|
||||
strlen(organization) + 4; /* for the terminating nulls */
|
||||
usr* user = FB_NEW_RPT(*dbb->dbb_permanent, length) usr();
|
||||
tdbb->tdbb_attachment->att_user = user;
|
||||
@ -742,8 +749,9 @@ void SCL_init(bool create,
|
||||
user->usr_user_id = id;
|
||||
user->usr_group_id = group;
|
||||
user->usr_node_id = node_id;
|
||||
if (wheel)
|
||||
if (wheel) {
|
||||
user->usr_flags |= USR_locksmith;
|
||||
}
|
||||
|
||||
BLK handle = NULL, handle1 = NULL;
|
||||
|
||||
@ -754,7 +762,7 @@ void SCL_init(bool create,
|
||||
tdbb->tdbb_attachment->att_security_class =
|
||||
SCL_get_class(X.RDB$SECURITY_CLASS);
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ) handle);
|
||||
CMP_release(tdbb, (jrd_req*) handle);
|
||||
|
||||
FOR(REQUEST_HANDLE handle1)
|
||||
FIRST 1 REL IN RDB$RELATIONS WITH REL.
|
||||
@ -771,7 +779,7 @@ void SCL_init(bool create,
|
||||
}
|
||||
}
|
||||
END_FOR;
|
||||
CMP_release(tdbb, (JRD_REQ) handle1);
|
||||
CMP_release(tdbb, (jrd_req*) handle1);
|
||||
}
|
||||
else {
|
||||
user->usr_flags |= USR_owner;
|
||||
@ -827,18 +835,19 @@ SCL SCL_recompute_class(TDBB tdbb, TEXT* string)
|
||||
* can't find it, return NULL.
|
||||
*
|
||||
**************************************/
|
||||
SCL s_class;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
if (!(s_class = SCL_get_class(string)))
|
||||
scl* s_class = SCL_get_class(string);
|
||||
if (!s_class) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s_class->scl_flags = (USHORT) compute_access(tdbb, s_class, NULL, NULL,
|
||||
NULL);
|
||||
|
||||
if (s_class->scl_flags & SCL_exists)
|
||||
if (s_class->scl_flags & SCL_exists) {
|
||||
return s_class;
|
||||
}
|
||||
|
||||
// Class no long exists - get rid of it!
|
||||
|
||||
@ -860,12 +869,10 @@ void SCL_release(SCL s_class)
|
||||
* Release an unneeded and unloved security class.
|
||||
*
|
||||
**************************************/
|
||||
SCL *next;
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
ATT attachment = tdbb->tdbb_attachment;
|
||||
|
||||
for (next = &attachment->att_security_classes; *next;
|
||||
for (scl** next = &attachment->att_security_classes; *next;
|
||||
next = &(*next)->scl_next)
|
||||
{
|
||||
if (*next == s_class)
|
||||
@ -889,24 +896,25 @@ static bool check_hex(const TEXT* acl, USHORT number)
|
||||
*
|
||||
* Functional description
|
||||
* Check a string against and acl numeric string. If they don't match,
|
||||
* return TRUE.
|
||||
* return true.
|
||||
*
|
||||
**************************************/
|
||||
USHORT l;
|
||||
|
||||
int n = 0;
|
||||
if ( (l = *acl++) )
|
||||
USHORT l = *acl++;
|
||||
if (l)
|
||||
{
|
||||
do
|
||||
{
|
||||
TEXT c = *acl++;
|
||||
do {
|
||||
const TEXT c = *acl++;
|
||||
n *= 10;
|
||||
if (c >= '0' && c <= '9')
|
||||
if (c >= '0' && c <= '9') {
|
||||
n += c - '0';
|
||||
else if (c >= 'a' && c <= 'f')
|
||||
}
|
||||
else if (c >= 'a' && c <= 'f') {
|
||||
n += c - 'a' + 10;
|
||||
else if (c >= 'A' && c <= 'F')
|
||||
}
|
||||
else if (c >= 'A' && c <= 'F') {
|
||||
n += c - 'A' + 10;
|
||||
}
|
||||
} while (--l);
|
||||
}
|
||||
|
||||
@ -924,13 +932,12 @@ static bool check_number(const TEXT* acl, USHORT number)
|
||||
*
|
||||
* Functional description
|
||||
* Check a string against and acl numeric string. If they don't match,
|
||||
* return TRUE.
|
||||
* return true.
|
||||
*
|
||||
**************************************/
|
||||
USHORT l;
|
||||
|
||||
int n = 0;
|
||||
if ( (l = *acl++) )
|
||||
USHORT l = *acl++;
|
||||
if (l)
|
||||
{
|
||||
do {
|
||||
n = n * UIC_BASE + *acl++ - '0';
|
||||
@ -965,11 +972,9 @@ static bool check_user_group(const TEXT* acl,
|
||||
* converts character user group id to numeric user group id.
|
||||
*
|
||||
* Check numeric user group id against an acl numeric string.
|
||||
* If they don't match, return TRUE.
|
||||
* If they don't match, return true.
|
||||
*
|
||||
**************************************/
|
||||
USHORT l;
|
||||
|
||||
TDBB tdbb = GET_THREAD_DATA;
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
|
||||
@ -980,19 +985,20 @@ static bool check_user_group(const TEXT* acl,
|
||||
|
||||
buffer = FB_NEW_RPT(*dbb->dbb_permanent, *length_ptr) str();
|
||||
|
||||
if ( (l = *acl++) )
|
||||
USHORT l = *acl++;
|
||||
if (l)
|
||||
{
|
||||
if (isdigit(*acl)) // this is a group id
|
||||
{
|
||||
do
|
||||
do {
|
||||
n = n * UIC_BASE + *acl++ - '0';
|
||||
while (--l);
|
||||
} while (--l);
|
||||
}
|
||||
else // processing group name
|
||||
{
|
||||
TEXT* user_group_name = (TEXT*) buffer->str_data;
|
||||
do {
|
||||
TEXT one_char = *acl++;
|
||||
const TEXT one_char = *acl++;
|
||||
*user_group_name++ = LOWWER(one_char);
|
||||
} while (--l);
|
||||
*user_group_name = '\0';
|
||||
@ -1028,8 +1034,6 @@ static bool check_string(const TEXT* acl, const TEXT* string)
|
||||
* return true.
|
||||
*
|
||||
**************************************/
|
||||
USHORT l;
|
||||
|
||||
// Add these asserts to catch calls to this function with NULL,
|
||||
// the caller to this function must check to ensure that the arguments are not
|
||||
// NULL - Shaunak Mistry 03-May-99.
|
||||
@ -1039,13 +1043,15 @@ static bool check_string(const TEXT* acl, const TEXT* string)
|
||||
|
||||
// JPN: Since Kanji User names are not allowed, no need to fix this UPPER loop
|
||||
|
||||
if ( (l = *acl++) )
|
||||
USHORT l = *acl++;
|
||||
if (l)
|
||||
{
|
||||
do {
|
||||
TEXT c1 = *acl++;
|
||||
TEXT c2 = *string++;
|
||||
if (UPPER7(c1) != UPPER7(c2))
|
||||
const TEXT c1 = *acl++;
|
||||
const TEXT c2 = *string++;
|
||||
if (UPPER7(c1) != UPPER7(c2)) {
|
||||
return true;
|
||||
}
|
||||
} while (--l);
|
||||
}
|
||||
|
||||
@ -1053,8 +1059,9 @@ static bool check_string(const TEXT* acl, const TEXT* string)
|
||||
// Need to check all since can have embedded spaces.
|
||||
|
||||
while (*string) {
|
||||
if (*string++ != ' ')
|
||||
if (*string++ != ' ') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1062,7 +1069,7 @@ static bool check_string(const TEXT* acl, const TEXT* string)
|
||||
|
||||
static SLONG compute_access(TDBB tdbb,
|
||||
const scl* s_class,
|
||||
JRD_REL view,
|
||||
const jrd_rel* view,
|
||||
const TEXT* trg_name,
|
||||
const TEXT* prc_name)
|
||||
{
|
||||
@ -1078,7 +1085,6 @@ static SLONG compute_access(TDBB tdbb,
|
||||
* access permissions. Return a flag word of recognized privileges.
|
||||
*
|
||||
**************************************/
|
||||
BLB blob = NULL;
|
||||
volatile STR str_buffer = NULL;
|
||||
SLONG length = BLOB_BUFFER_SIZE, *length_ptr = &length;
|
||||
|
||||
@ -1104,7 +1110,7 @@ static SLONG compute_access(TDBB tdbb,
|
||||
REQUEST(irq_l_security) = request;
|
||||
|
||||
privileges |= SCL_exists;
|
||||
blob = BLB_open(tdbb, dbb->dbb_sys_trans, (BID) & X.RDB$ACL);
|
||||
blb* blob = BLB_open(tdbb, dbb->dbb_sys_trans, (BID) & X.RDB$ACL);
|
||||
TEXT* acl = buffer;
|
||||
while (true)
|
||||
{
|
||||
@ -1119,7 +1125,7 @@ static SLONG compute_access(TDBB tdbb,
|
||||
|
||||
if (blob->blb_fragment_size)
|
||||
{
|
||||
ULONG old_offset = (ULONG) (acl - buffer);
|
||||
const ULONG old_offset = (ULONG) (acl - buffer);
|
||||
length += BLOB_BUFFER_SIZE;
|
||||
// TMN: Cast away volatile
|
||||
str::extend(const_cast<str*&>(str_buffer), length);
|
||||
@ -1189,7 +1195,7 @@ static TEXT* save_string(const TEXT* string, TEXT** ptr)
|
||||
|
||||
static SLONG walk_acl(TDBB tdbb,
|
||||
const TEXT* acl,
|
||||
JRD_REL view,
|
||||
const jrd_rel* view,
|
||||
const TEXT* trg_name,
|
||||
const TEXT* prc_name,
|
||||
STR* start_ptr,
|
||||
@ -1206,18 +1212,13 @@ static SLONG walk_acl(TDBB tdbb,
|
||||
* is found, return privileges.
|
||||
*
|
||||
**************************************/
|
||||
bool hit;
|
||||
TEXT c;
|
||||
TEXT* p;
|
||||
volatile BLK request;
|
||||
|
||||
SET_TDBB(tdbb);
|
||||
DBB dbb = tdbb->tdbb_database;
|
||||
|
||||
// Munch ACL. If we find a hit, eat up privileges.
|
||||
|
||||
struct usr user = *tdbb->tdbb_attachment->att_user;
|
||||
TEXT* role_name = user.usr_sql_role_name;
|
||||
const TEXT* role_name = user.usr_sql_role_name;
|
||||
|
||||
if (view && (view->rel_flags & REL_sql_relation))
|
||||
{
|
||||
@ -1241,6 +1242,10 @@ static SLONG walk_acl(TDBB tdbb,
|
||||
return -1 & ~SCL_corrupt;
|
||||
}
|
||||
|
||||
const TEXT* p;
|
||||
bool hit = false;
|
||||
TEXT c;
|
||||
|
||||
while ( (c = *acl++) )
|
||||
{
|
||||
switch (c)
|
||||
@ -1281,11 +1286,16 @@ static SLONG walk_acl(TDBB tdbb,
|
||||
hit = false;
|
||||
else
|
||||
{
|
||||
TEXT login_name[129], *p, *q;
|
||||
for (p = login_name, q = user.usr_user_name;
|
||||
(*p++ = UPPER7(*q)); q++);
|
||||
TEXT login_name[129];
|
||||
TEXT* pln = login_name;
|
||||
const TEXT* q = user.usr_user_name;
|
||||
while (*pln++ = UPPER7(*q)) {
|
||||
++q;
|
||||
}
|
||||
hit = false;
|
||||
request = (BLK)CMP_find_request(tdbb, irq_get_role_mem,
|
||||
// Was volatile BLK request;
|
||||
blk* volatile request =
|
||||
(BLK)CMP_find_request(tdbb, irq_get_role_mem,
|
||||
IRQ_REQUESTS);
|
||||
|
||||
FOR(REQUEST_HANDLE request) U IN RDB$USER_PRIVILEGES WITH
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
void SCL_check_access(const struct scl*, SLONG, const TEXT*,
|
||||
const TEXT*, USHORT, const TEXT*, const TEXT*);
|
||||
void SCL_check_procedure(struct dsc*, USHORT);
|
||||
void SCL_check_relation(struct dsc*, USHORT);
|
||||
void SCL_check_procedure(const struct dsc*, USHORT);
|
||||
void SCL_check_relation(const struct dsc*, USHORT);
|
||||
struct scl* SCL_get_class(/* INOUT */ TEXT*);
|
||||
int SCL_get_mask(const TEXT*, const TEXT*);
|
||||
void SCL_init(bool, const TEXT*, const TEXT*, const TEXT*, const TEXT*,
|
||||
@ -35,7 +35,7 @@ void SCL_init(bool, const TEXT*, const TEXT*, const TEXT*, const TEXT*,
|
||||
void SCL_move_priv(UCHAR**, USHORT, STR*, ULONG*);
|
||||
struct scl* SCL_recompute_class(TDBB, TEXT*);
|
||||
void SCL_release(struct scl*);
|
||||
void SCL_check_index(TDBB, TEXT*, UCHAR, USHORT);
|
||||
void SCL_check_index(TDBB, const TEXT*, UCHAR, USHORT);
|
||||
|
||||
#endif // JRD_SCL_PROTO_H
|
||||
|
||||
|
@ -873,7 +873,8 @@ void SDW_shutdown_shadow(SDW shadow)
|
||||
if (shadow) {
|
||||
PIO_close(shadow->sdw_file);
|
||||
fil* file;
|
||||
for (fil* free = shadow->sdw_file; (file = free->fil_next); free = file)
|
||||
fil* free = shadow->sdw_file;
|
||||
for (; (file = free->fil_next); free = file)
|
||||
{
|
||||
delete free;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public:
|
||||
UCHAR* svc_stdout;
|
||||
TEXT** svc_argv;
|
||||
ULONG svc_argc;
|
||||
EVENT_T svc_start_event[1]; /* fired once service has started successfully */
|
||||
event_t svc_start_event[1]; /* fired once service has started successfully */
|
||||
const struct serv* svc_service;
|
||||
UCHAR* svc_resp_buf;
|
||||
UCHAR* svc_resp_ptr;
|
||||
|
@ -1500,12 +1500,11 @@ void THD_sleep(ULONG milliseconds)
|
||||
#else
|
||||
|
||||
#ifdef ANY_THREADING
|
||||
EVENT_T timer;
|
||||
EVENT timer_ptr = &timer;
|
||||
SLONG count;
|
||||
event_t timer;
|
||||
event_t* timer_ptr = &timer;
|
||||
|
||||
ISC_event_init(&timer, 0, 0);
|
||||
count = ISC_event_clear(&timer);
|
||||
SLONG count = ISC_event_clear(&timer);
|
||||
|
||||
ISC_event_wait(1, &timer_ptr, &count, milliseconds * 1000, NULL, 0);
|
||||
ISC_event_fini(&timer);
|
||||
|
@ -98,23 +98,23 @@ static SLONG bump_transaction_id(TDBB, WIN *);
|
||||
#else
|
||||
static HDR bump_transaction_id(TDBB, WIN *);
|
||||
#endif
|
||||
static void retain_context(TDBB, JRD_TRA, const bool);
|
||||
static void retain_context(TDBB, jrd_tra*, const bool);
|
||||
#ifdef VMS
|
||||
static void compute_oldest_retaining(TDBB, JRD_TRA, const bool);
|
||||
static void compute_oldest_retaining(TDBB, jrd_tra*, const bool);
|
||||
#endif
|
||||
#ifdef PC_ENGINE
|
||||
static void downgrade_lock(JRD_TRA);
|
||||
static void downgrade_lock(jrd_tra*);
|
||||
#endif
|
||||
static void expand_view_lock(JRD_TRA, JRD_REL, SCHAR);
|
||||
static void expand_view_lock(jrd_tra*, jrd_rel*, SCHAR);
|
||||
static TIP fetch_inventory_page(TDBB, WIN *, SLONG, USHORT);
|
||||
static SLONG inventory_page(TDBB, SLONG);
|
||||
static SSHORT limbo_transaction(TDBB, SLONG);
|
||||
static void restart_requests(TDBB, JRD_TRA);
|
||||
static void restart_requests(TDBB, jrd_tra*);
|
||||
#ifdef SWEEP_THREAD
|
||||
static BOOLEAN start_sweeper(TDBB, DBB);
|
||||
static void THREAD_ROUTINE sweep_database(char*);
|
||||
#endif
|
||||
static void transaction_options(TDBB, JRD_TRA, const UCHAR*, USHORT);
|
||||
static void transaction_options(TDBB, jrd_tra*, const UCHAR*, USHORT);
|
||||
#ifdef VMS
|
||||
static BOOLEAN vms_convert(LCK, SLONG *, SCHAR, BOOLEAN);
|
||||
#endif
|
||||
@ -326,7 +326,7 @@ void TRA_cleanup(TDBB tdbb)
|
||||
}
|
||||
|
||||
|
||||
void TRA_commit(TDBB tdbb, JRD_TRA transaction, const bool retaining_flag)
|
||||
void TRA_commit(TDBB tdbb, jrd_tra* transaction, const bool retaining_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -730,7 +730,7 @@ void TRA_invalidate(DBB database, ULONG mask)
|
||||
}
|
||||
|
||||
|
||||
void TRA_link_transaction(TDBB tdbb, JRD_TRA transaction)
|
||||
void TRA_link_transaction(TDBB tdbb, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -751,7 +751,7 @@ void TRA_link_transaction(TDBB tdbb, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void TRA_post_resources(TDBB tdbb, JRD_TRA transaction, RSC resources)
|
||||
void TRA_post_resources(TDBB tdbb, jrd_tra* transaction, RSC resources)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -864,7 +864,7 @@ BOOLEAN TRA_precommited(TDBB tdbb, SLONG old_number, SLONG new_number)
|
||||
}
|
||||
|
||||
|
||||
void TRA_prepare(TDBB tdbb, JRD_TRA transaction, USHORT length,
|
||||
void TRA_prepare(TDBB tdbb, jrd_tra* transaction, USHORT length,
|
||||
const UCHAR* msg)
|
||||
{
|
||||
/**************************************
|
||||
@ -1001,7 +1001,7 @@ jrd_tra* TRA_reconnect(TDBB tdbb, const UCHAR* id, USHORT length)
|
||||
}
|
||||
|
||||
|
||||
void TRA_release_transaction(TDBB tdbb, JRD_TRA transaction)
|
||||
void TRA_release_transaction(TDBB tdbb, jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1086,7 +1086,7 @@ void TRA_release_transaction(TDBB tdbb, JRD_TRA transaction)
|
||||
}
|
||||
|
||||
|
||||
void TRA_rollback(TDBB tdbb, JRD_TRA transaction, const bool retaining_flag)
|
||||
void TRA_rollback(TDBB tdbb, jrd_tra* transaction, const bool retaining_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1217,7 +1217,7 @@ void TRA_rollback(TDBB tdbb, JRD_TRA transaction, const bool retaining_flag)
|
||||
}
|
||||
|
||||
|
||||
void TRA_set_state(TDBB tdbb, JRD_TRA transaction, SLONG number, SSHORT state)
|
||||
void TRA_set_state(TDBB tdbb, jrd_tra* transaction, SLONG number, SSHORT state)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1353,7 +1353,7 @@ void TRA_shutdown_attachment(TDBB tdbb, ATT attachment)
|
||||
}
|
||||
|
||||
|
||||
int TRA_snapshot_state(TDBB tdbb, JRD_TRA trans, SLONG number)
|
||||
int TRA_snapshot_state(TDBB tdbb, jrd_tra* trans, SLONG number)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1754,7 +1754,7 @@ int TRA_state(UCHAR * bit_vector, ULONG oldest, ULONG number)
|
||||
}
|
||||
|
||||
|
||||
int TRA_sweep(TDBB tdbb, JRD_TRA trans)
|
||||
int TRA_sweep(TDBB tdbb, jrd_tra* trans)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1957,7 +1957,7 @@ LCK TRA_transaction_lock(TDBB tdbb, BLK object)
|
||||
}
|
||||
|
||||
|
||||
int TRA_wait(TDBB tdbb, JRD_TRA trans, SLONG number, USHORT wait)
|
||||
int TRA_wait(TDBB tdbb, jrd_tra* trans, SLONG number, USHORT wait)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2189,7 +2189,7 @@ static HDR bump_transaction_id(TDBB tdbb, WIN * window)
|
||||
#ifdef VMS
|
||||
static void compute_oldest_retaining(
|
||||
TDBB tdbb,
|
||||
JRD_TRA transaction, const bool write_flag)
|
||||
jrd_tra* transaction, const bool write_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2289,7 +2289,7 @@ static void compute_oldest_retaining(
|
||||
#endif
|
||||
|
||||
#ifdef PC_ENGINE
|
||||
static void downgrade_lock(JRD_TRA transaction)
|
||||
static void downgrade_lock(jrd_tra* transaction)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2342,7 +2342,7 @@ static void downgrade_lock(JRD_TRA transaction)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void expand_view_lock(JRD_TRA transaction, JRD_REL relation, SCHAR lock_type)
|
||||
static void expand_view_lock(jrd_tra* transaction, jrd_rel* relation, SCHAR lock_type)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2499,7 +2499,7 @@ static SSHORT limbo_transaction(TDBB tdbb, SLONG id)
|
||||
}
|
||||
|
||||
|
||||
static void restart_requests(TDBB tdbb, JRD_TRA trans)
|
||||
static void restart_requests(TDBB tdbb, jrd_tra* trans)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2528,7 +2528,7 @@ static void restart_requests(TDBB tdbb, JRD_TRA trans)
|
||||
vec* vector = request->req_sub_requests;
|
||||
if (vector) {
|
||||
for (USHORT level = 1; level < vector->count(); level++) {
|
||||
jrd_req* clone = (JRD_REQ) (*vector)[level];
|
||||
jrd_req* clone = (jrd_req*) (*vector)[level];
|
||||
if (clone && clone->req_transaction) {
|
||||
EXE_unwind(tdbb, clone);
|
||||
EXE_start(tdbb, clone, trans);
|
||||
@ -2539,7 +2539,7 @@ static void restart_requests(TDBB tdbb, JRD_TRA trans)
|
||||
}
|
||||
|
||||
|
||||
static void retain_context(TDBB tdbb, JRD_TRA transaction, const bool commit)
|
||||
static void retain_context(TDBB tdbb, jrd_tra* transaction, const bool commit)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2841,7 +2841,7 @@ static void THREAD_ROUTINE sweep_database(char* database)
|
||||
|
||||
static void transaction_options(
|
||||
TDBB tdbb,
|
||||
JRD_TRA transaction,
|
||||
jrd_tra* transaction,
|
||||
const UCHAR* tpb, USHORT tpb_length)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -69,7 +69,6 @@ class jrd_tra : public pool_alloc_rpt<SCHAR, type_tra>
|
||||
UCHAR tra_callback_count; /* callback count for 'execute statement' */
|
||||
UCHAR tra_transactions[1];
|
||||
};
|
||||
typedef jrd_tra *JRD_TRA;
|
||||
|
||||
#define TRA_system 1L /* system transaction */
|
||||
#define TRA_update 2L /* update is permitted */
|
||||
|
@ -644,25 +644,25 @@ static const TEXT msg_table[][52] = {
|
||||
};
|
||||
|
||||
|
||||
static RTN corrupt(TDBB, VDR, USHORT, JRD_REL, ...);
|
||||
static RTN corrupt(TDBB, VDR, USHORT, jrd_rel*, ...);
|
||||
static FETCH_CODE fetch_page(TDBB, VDR, SLONG, USHORT, WIN *, void *);
|
||||
static void garbage_collect(TDBB, VDR);
|
||||
#ifdef DEBUG_VAL_VERBOSE
|
||||
static void print_rhd(USHORT, const rhd*);
|
||||
#endif
|
||||
static RTN walk_blob(TDBB, VDR, JRD_REL, BLH, USHORT, SLONG);
|
||||
static RTN walk_chain(TDBB, VDR, JRD_REL, RHD, SLONG);
|
||||
static RTN walk_blob(TDBB, VDR, jrd_rel*, BLH, USHORT, SLONG);
|
||||
static RTN walk_chain(TDBB, VDR, jrd_rel*, RHD, SLONG);
|
||||
static void walk_database(TDBB, VDR);
|
||||
static RTN walk_data_page(TDBB, VDR, JRD_REL, SLONG, SLONG);
|
||||
static RTN walk_data_page(TDBB, VDR, jrd_rel*, SLONG, SLONG);
|
||||
static void walk_generators(TDBB, VDR);
|
||||
static void walk_header(TDBB, VDR, SLONG);
|
||||
static RTN walk_index(TDBB, VDR, JRD_REL, SLONG, USHORT);
|
||||
static RTN walk_index(TDBB, VDR, jrd_rel*, SLONG, USHORT);
|
||||
static void walk_log(TDBB, VDR);
|
||||
static void walk_pip(TDBB, VDR);
|
||||
static RTN walk_pointer_page(TDBB, VDR, JRD_REL, int);
|
||||
static RTN walk_record(TDBB, VDR, JRD_REL, RHD, USHORT, SLONG, bool);
|
||||
static RTN walk_relation(TDBB, VDR, JRD_REL);
|
||||
static RTN walk_root(TDBB, VDR, JRD_REL);
|
||||
static RTN walk_pointer_page(TDBB, VDR, jrd_rel*, int);
|
||||
static RTN walk_record(TDBB, VDR, jrd_rel*, RHD, USHORT, SLONG, bool);
|
||||
static RTN walk_relation(TDBB, VDR, jrd_rel*);
|
||||
static RTN walk_root(TDBB, VDR, jrd_rel*);
|
||||
static RTN walk_tip(TDBB, VDR, SLONG);
|
||||
|
||||
static const SLONG end_level = END_LEVEL, end_bucket = END_BUCKET;
|
||||
@ -742,7 +742,7 @@ BOOLEAN VAL_validate(TDBB tdbb, USHORT switches)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static RTN corrupt(TDBB tdbb, VDR control, USHORT err_code, JRD_REL relation, ...)
|
||||
static RTN corrupt(TDBB tdbb, VDR control, USHORT err_code, jrd_rel* relation, ...)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -982,7 +982,7 @@ static void print_rhd(USHORT length, const rhd* header)
|
||||
|
||||
static RTN walk_blob(TDBB tdbb,
|
||||
VDR control,
|
||||
JRD_REL relation, BLH header, USHORT length, SLONG number)
|
||||
jrd_rel* relation, BLH header, USHORT length, SLONG number)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1061,7 +1061,7 @@ static RTN walk_blob(TDBB tdbb,
|
||||
|
||||
static RTN walk_chain(TDBB tdbb,
|
||||
VDR control,
|
||||
JRD_REL relation, RHD header, SLONG head_number)
|
||||
jrd_rel* relation, RHD header, SLONG head_number)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1155,7 +1155,7 @@ static void walk_database(TDBB tdbb, VDR control)
|
||||
if (i >= 32 /* rel_MAX */ ) // Why not system flag instead?
|
||||
VAL_debug_level = 2;
|
||||
#endif
|
||||
jrd_rel* relation = (JRD_REL) (*vector)[i];
|
||||
jrd_rel* relation = (jrd_rel*) (*vector)[i];
|
||||
if (relation)
|
||||
walk_relation(tdbb, control, relation);
|
||||
}
|
||||
@ -1165,7 +1165,7 @@ static void walk_database(TDBB tdbb, VDR control)
|
||||
|
||||
static RTN walk_data_page(TDBB tdbb,
|
||||
VDR control,
|
||||
JRD_REL relation, SLONG page_number, SLONG sequence)
|
||||
jrd_rel* relation, SLONG page_number, SLONG sequence)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1360,7 +1360,7 @@ static void walk_header(TDBB tdbb, VDR control, SLONG page_num)
|
||||
}
|
||||
|
||||
static RTN walk_index(TDBB tdbb,
|
||||
VDR control, JRD_REL relation, SLONG page_number, USHORT id)
|
||||
VDR control, jrd_rel* relation, SLONG page_number, USHORT id)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1722,7 +1722,7 @@ static void walk_pip(TDBB tdbb, VDR control)
|
||||
|
||||
static RTN walk_pointer_page( TDBB tdbb,
|
||||
VDR control,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
int sequence)
|
||||
{
|
||||
/**************************************
|
||||
@ -1819,7 +1819,7 @@ static RTN walk_pointer_page( TDBB tdbb,
|
||||
|
||||
static RTN walk_record(TDBB tdbb,
|
||||
VDR control,
|
||||
JRD_REL relation,
|
||||
jrd_rel* relation,
|
||||
RHD header,
|
||||
USHORT length, SLONG number, bool delta_flag)
|
||||
{
|
||||
@ -1963,7 +1963,7 @@ static RTN walk_record(TDBB tdbb,
|
||||
}
|
||||
|
||||
|
||||
static RTN walk_relation(TDBB tdbb, VDR control, JRD_REL relation)
|
||||
static RTN walk_relation(TDBB tdbb, VDR control, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2054,7 +2054,7 @@ static RTN walk_relation(TDBB tdbb, VDR control, JRD_REL relation)
|
||||
}
|
||||
|
||||
|
||||
static RTN walk_root(TDBB tdbb, VDR control, JRD_REL relation)
|
||||
static RTN walk_root(TDBB tdbb, VDR control, jrd_rel* relation)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
598
src/jrd/vio.cpp
598
src/jrd/vio.cpp
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: why.cpp,v 1.48 2003-12-31 05:35:53 robocop Exp $
|
||||
$Id: why.cpp,v 1.49 2004-01-03 10:59:41 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -240,7 +240,7 @@ static void subsystem_enter(void);
|
||||
static void subsystem_exit(void);
|
||||
|
||||
#ifndef REQUESTER
|
||||
static EVENT_T why_event[1];
|
||||
static event_t why_event[1];
|
||||
static SSHORT why_initialized = 0;
|
||||
#endif
|
||||
static SLONG why_enabled = 0;
|
||||
|
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
$Id: lock.cpp,v 1.82 2003-12-31 05:36:01 robocop Exp $
|
||||
$Id: lock.cpp,v 1.83 2004-01-03 10:59:43 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -3311,7 +3311,7 @@ static void lock_initialize(void* arg, SH_MEM shmem_data, bool initialize)
|
||||
}
|
||||
for (i = 1; i < (USHORT) LOCK_sem_count; i++)
|
||||
{
|
||||
EVENT_T local_event;
|
||||
event_t local_event;
|
||||
|
||||
ISC_event_init(&local_event, shmem_data->sh_mem_mutex_arg, i);
|
||||
semaphores->smb_mask[i / BITS_PER_LONG] |= 1L << (i % BITS_PER_LONG);
|
||||
|
@ -325,11 +325,11 @@ typedef struct own
|
||||
#endif
|
||||
#endif /* WIN_NT */
|
||||
#ifdef SOLARIS_MT
|
||||
EVENT_T own_blocking[1]; /* Blocking event block */
|
||||
EVENT_T own_stall[1]; /* Owner is stalling for other owner */
|
||||
event_t own_blocking[1]; /* Blocking event block */
|
||||
event_t own_stall[1]; /* Owner is stalling for other owner */
|
||||
#endif
|
||||
#if !(defined WIN_NT) || (defined WIN_NT && !defined SUPERSERVER)
|
||||
EVENT_T own_wakeup[1]; /* Wakeup event block */
|
||||
event_t own_wakeup[1]; /* Wakeup event block */
|
||||
#endif
|
||||
USHORT own_semaphore; /* Owner semaphore -- see note below */
|
||||
USHORT own_flags; /* Misc stuff */
|
||||
|
@ -119,10 +119,10 @@ static void event_list(void)
|
||||
if (!interest->rint_request)
|
||||
ib_printf("(0)");
|
||||
else {
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
PRB process;
|
||||
|
||||
request = (JRD_REQ) ABS_PTR(interest->rint_request);
|
||||
request = (jrd_req*) ABS_PTR(interest->rint_request);
|
||||
process = (PRB) ABS_PTR(request->req_process);
|
||||
ib_printf("%6d ", process->prb_process_id);
|
||||
}
|
||||
@ -152,10 +152,10 @@ static void event_list(void)
|
||||
if (!interest->rint_request)
|
||||
ib_printf("(0)");
|
||||
else {
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
PRB process;
|
||||
|
||||
request = (JRD_REQ) ABS_PTR(interest->rint_request);
|
||||
request = (jrd_req*) ABS_PTR(interest->rint_request);
|
||||
process = (PRB) ABS_PTR(request->req_process);
|
||||
ib_printf("%6d ", process->prb_process_id);
|
||||
}
|
||||
@ -186,7 +186,7 @@ static void event_table_dump(void)
|
||||
PRB process;
|
||||
FRB free;
|
||||
EVNT event, parent;
|
||||
JRD_REQ request;
|
||||
jrd_req* request;
|
||||
SES session;
|
||||
RINT interest;
|
||||
SLONG offset;
|
||||
@ -222,8 +222,8 @@ static void event_table_dump(void)
|
||||
break;
|
||||
|
||||
case type_req:
|
||||
ib_printf("JRD_REQ (%ld)\n", block->hdr_length);
|
||||
request = (JRD_REQ) block;
|
||||
ib_printf("jrd_req* (%ld)\n", block->hdr_length);
|
||||
request = (jrd_req*) block;
|
||||
ib_printf("\tProcess: %ld, interests: %ld, ast: %lx, arg: %lx\n",
|
||||
request->req_process, request->req_interests,
|
||||
request->req_ast, request->req_ast_arg);
|
||||
|
@ -45,7 +45,7 @@ static const struct
|
||||
{type_fmt , sizeof(fmt) , sizeof(((FMT) NULL)->fmt_desc[0])},
|
||||
{type_rrq , sizeof(rrq) , sizeof(((RRQ) NULL)->rrq_rpt [0])},
|
||||
{type_rtr , sizeof(rtr) , 0},
|
||||
{type_str , sizeof(str) , 1}, // random string block
|
||||
{type_str , sizeof(rem_str) , 1}, // random string block
|
||||
{type_rbl , sizeof(rbl) , 1},
|
||||
{type_port , sizeof(port) , 1},
|
||||
{type_msg , sizeof(message) , 1},
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: inet.cpp,v 1.94 2003-12-11 10:33:28 robocop Exp $
|
||||
$Id: inet.cpp,v 1.95 2004-01-03 10:59:46 robocop Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -1184,7 +1184,7 @@ static int accept_connection(PORT port,
|
||||
case CNCT_user:
|
||||
{
|
||||
const int length = *id++;
|
||||
str* string = (str*) ALLOCV(type_str, length);
|
||||
rem_str* string = (rem_str*) ALLOCV(type_str, length);
|
||||
port->port_user_name = string;
|
||||
string->str_length = length;
|
||||
if (length) {
|
||||
@ -1785,7 +1785,7 @@ static bool check_proxy(PORT port,
|
||||
TEXT line[128];
|
||||
int c;
|
||||
SLONG length;
|
||||
STR string;
|
||||
rem_str* string;
|
||||
|
||||
#ifndef VMS
|
||||
strcpy(proxy_file, PROXY_FILE);
|
||||
@ -1812,7 +1812,7 @@ static bool check_proxy(PORT port,
|
||||
ALLR_free(port->port_user_name);
|
||||
length = strlen(target_user);
|
||||
port->port_user_name = string =
|
||||
(STR) ALLOCV(type_str, (int) length);
|
||||
(rem_str*) ALLOCV(type_str, (int) length);
|
||||
string->str_length = length;
|
||||
strncpy(string->str_data, target_user, length);
|
||||
strcpy(user_name, target_user);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PROGRAM: JRD Remote Server
|
||||
* MODULE: chuser.c
|
||||
* MODULE: chuser.cpp
|
||||
* DESCRIPTION: Change user identity.
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
@ -445,3 +445,4 @@ static int get_major_vms_version(void)
|
||||
|
||||
return (int) (buffer[1] - '0');
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* PROGRAM: IB Server
|
||||
* MODULE: property.c
|
||||
* MODULE: property.cpp
|
||||
* DESCRIPTION: Property sheet implementation for WIN32 server
|
||||
*
|
||||
*/
|
||||
@ -347,3 +347,4 @@ static void RefreshUserCount(HWND hDlg)
|
||||
|
||||
SetCursor(hOldCursor);
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
#ifndef WINDOW_H
|
||||
#define WINDOW_H
|
||||
#ifndef OS_WIN32_WINDOW_H
|
||||
#define OS_WIN32_WINDOW_H
|
||||
|
||||
#define APP_HSIZE 220
|
||||
#define APP_VSIZE 150
|
||||
@ -49,4 +49,5 @@
|
||||
static char *szClassName = "FB_Server";
|
||||
static char *szWindowName = "Firebird Server";
|
||||
|
||||
#endif // WINDOW_H
|
||||
#endif // OS_WIN32_WINDOW_H
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* PROGRAM: JRD Remote Server
|
||||
* MODULE: winmain.c
|
||||
* MODULE: winmain.cpp
|
||||
* DESCRIPTION: Windows Main server routine for router testing
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
@ -282,3 +282,4 @@ long FAR PASCAL _export WndProc(
|
||||
}
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ static PORT aux_request(PORT, PACKET *);
|
||||
static void cleanup_port(PORT);
|
||||
static void disconnect(PORT);
|
||||
static void exit_handler(PORT);
|
||||
static STR make_pipe_name(const TEXT*, const TEXT*, const TEXT*);
|
||||
static rem_str* make_pipe_name(const TEXT*, const TEXT*, const TEXT*);
|
||||
static PORT receive(PORT, PACKET *);
|
||||
static int send_full(PORT, PACKET *);
|
||||
static int send_partial(PORT, PACKET *);
|
||||
@ -606,7 +606,7 @@ static int accept_connection( PORT port, P_CNCT * cnct)
|
||||
case CNCT_user:
|
||||
{
|
||||
const int length = *id++;
|
||||
str* string= (str*) ALLOCV(type_str, length);
|
||||
rem_str* string= (rem_str*) ALLOCV(type_str, length);
|
||||
port->port_user_name = string;
|
||||
string->str_length = length;
|
||||
if (length) {
|
||||
@ -995,7 +995,7 @@ static void exit_handler( PORT main_port)
|
||||
}
|
||||
|
||||
|
||||
static STR make_pipe_name(
|
||||
static rem_str* make_pipe_name(
|
||||
const TEXT* connect_name,
|
||||
const TEXT* suffix_name,
|
||||
const TEXT* str_pid)
|
||||
|
@ -118,7 +118,7 @@ bool_t xdr_free();
|
||||
#ifdef VMS
|
||||
double MTH$CVT_D_G(), MTH$CVT_G_D();
|
||||
|
||||
static STR gfloat_buffer;
|
||||
static rem_str* gfloat_buffer;
|
||||
#endif
|
||||
|
||||
|
||||
@ -1357,7 +1357,7 @@ static bool_t xdr_semi_opaque( XDR* xdrs, REM_MSG message, FMT format)
|
||||
if (!gfloat_buffer || gfloat_buffer->str_length < format->fmt_length) {
|
||||
if (gfloat_buffer)
|
||||
ALLR_free(gfloat_buffer);
|
||||
gfloat_buffer = (STR) ALLOCV(type_str, format->fmt_length);
|
||||
gfloat_buffer = (rem_str*) ALLOCV(type_str, format->fmt_length);
|
||||
gfloat_buffer->str_length = format->fmt_length;
|
||||
}
|
||||
|
||||
@ -1409,20 +1409,19 @@ static bool_t xdr_semi_opaque_slice( XDR* xdrs, LSTRING* slice)
|
||||
* Move data while converting for doubles in d_float format.
|
||||
*
|
||||
**************************************/
|
||||
ULONG msg_len;
|
||||
|
||||
BLOB_PTR* p = slice->lstr_address;
|
||||
for (ULONG n = slice->lstr_length; n; n -= msg_len, p += msg_len) {
|
||||
msg_len = MIN(n, MAX_OPAQUE);
|
||||
const ULONG msg_len = MIN(n, MAX_OPAQUE);
|
||||
|
||||
BLOB_PTR* msg_addr;
|
||||
if (xdrs->x_op == XDR_ENCODE) {
|
||||
/* Using an str structure is fine as long as MAX_OPAQUE < 64K */
|
||||
/* Using a rem_str structure is fine as long as MAX_OPAQUE < 64K */
|
||||
|
||||
if (!gfloat_buffer || gfloat_buffer->str_length < msg_len) {
|
||||
if (gfloat_buffer)
|
||||
if (gfloat_buffer) {
|
||||
ALLR_free(gfloat_buffer);
|
||||
gfloat_buffer = (STR) ALLOCV(type_str, msg_len);
|
||||
}
|
||||
gfloat_buffer = (rem_str*) ALLOCV(type_str, msg_len);
|
||||
gfloat_buffer->str_length = msg_len;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ ULONG REMOTE_compute_batch_size (struct port *, USHORT, P_OP, FMT);
|
||||
void REMOTE_get_timeout_params (struct port*, const UCHAR*, USHORT);
|
||||
struct rrq* REMOTE_find_request (struct rrq *, USHORT);
|
||||
void REMOTE_free_packet (struct port *, struct packet *);
|
||||
struct str* REMOTE_make_string (const SCHAR*);
|
||||
struct rem_str* REMOTE_make_string (const SCHAR*);
|
||||
void REMOTE_release_messages (struct message *);
|
||||
void REMOTE_release_request (struct rrq *);
|
||||
void REMOTE_reset_request (struct rrq *, struct message *);
|
||||
@ -38,3 +38,4 @@ void REMOTE_save_status_strings (ISC_STATUS *);
|
||||
OBJCT REMOTE_set_object (struct port *, struct blk *, OBJCT);
|
||||
|
||||
#endif // REMOTE_REMOT_PROTO_H
|
||||
|
||||
|
@ -441,7 +441,7 @@ void REMOTE_get_timeout_params(
|
||||
}
|
||||
|
||||
|
||||
STR REMOTE_make_string(const SCHAR* input)
|
||||
rem_str* REMOTE_make_string(const SCHAR* input)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -455,7 +455,7 @@ STR REMOTE_make_string(const SCHAR* input)
|
||||
*
|
||||
**************************************/
|
||||
const USHORT length = strlen(input);
|
||||
STR string = (STR) ALLOCV(type_str, length);
|
||||
rem_str* string = (rem_str*) ALLOCV(type_str, length);
|
||||
#ifdef DEBUG_REMOTE_MEMORY
|
||||
ib_printf("REMOTE_make_string allocate string %x\n", string);
|
||||
#endif
|
||||
|
@ -164,12 +164,12 @@ typedef struct vcl
|
||||
|
||||
/* Random string block -- jack of all kludges */
|
||||
|
||||
typedef struct str
|
||||
struct rem_str
|
||||
{
|
||||
struct blk str_header;
|
||||
USHORT str_length;
|
||||
SCHAR str_data[2];
|
||||
} *STR;
|
||||
};
|
||||
|
||||
/* Include definition of descriptor */
|
||||
|
||||
@ -406,11 +406,11 @@ typedef struct port
|
||||
#endif
|
||||
VEC port_object_vector;
|
||||
BLK* port_objects;
|
||||
STR port_version;
|
||||
STR port_host; /* Our name */
|
||||
STR port_connection; /* Name of connection */
|
||||
STR port_user_name;
|
||||
STR port_passwd;
|
||||
rem_str* port_version;
|
||||
rem_str* port_host; /* Our name */
|
||||
rem_str* port_connection; /* Name of connection */
|
||||
rem_str* port_user_name;
|
||||
rem_str* port_passwd;
|
||||
struct rpr* port_rpr; /* port stored procedure reference */
|
||||
struct rsr* port_statement; /* Statement for execute immediate */
|
||||
struct rmtque* port_receive_rmtque; /* for client, responses waiting */
|
||||
|
@ -755,7 +755,7 @@ static ISC_STATUS attach_database(
|
||||
FRBRD *handle;
|
||||
ISC_STATUS_ARRAY status_vector;
|
||||
RDB rdb;
|
||||
STR string;
|
||||
rem_str* string;
|
||||
|
||||
send->p_operation = op_accept;
|
||||
handle = NULL;
|
||||
@ -2967,7 +2967,7 @@ bool process_packet(PORT port,
|
||||
*
|
||||
**************************************/
|
||||
P_OP op;
|
||||
STR string;
|
||||
rem_str* string;
|
||||
TEXT msg[128];
|
||||
SRVR server;
|
||||
struct trdb thd_context, *trdb;
|
||||
@ -4136,8 +4136,6 @@ ISC_STATUS port::send_response( PACKET* send,
|
||||
case isc_arg_warning:
|
||||
case isc_arg_gds:
|
||||
{
|
||||
USHORT fac = 0, class_ = 0;
|
||||
|
||||
/* When talking with older (pre 6.0) clients, do not send
|
||||
* warnings.
|
||||
*/
|
||||
@ -4157,14 +4155,17 @@ ISC_STATUS port::send_response( PACKET* send,
|
||||
* that the facility is part of the status code we need to know
|
||||
* this on the client side, thus when talking with 6.0 and newer
|
||||
* clients, do not decode the status code, just send it to the
|
||||
* client. The same check is made in interface.c::check_response
|
||||
* client. The same check is made in interface.cpp::check_response
|
||||
*/
|
||||
|
||||
if (this->port_protocol < PROTOCOL_VERSION10)
|
||||
if (this->port_protocol < PROTOCOL_VERSION10) {
|
||||
USHORT fac = 0, code_class = 0;
|
||||
*v++ = code =
|
||||
gds__decode(*status_vector++, &fac, &class_);
|
||||
else
|
||||
gds__decode(*status_vector++, &fac, &code_class);
|
||||
}
|
||||
else {
|
||||
*v++ = code = *status_vector++;
|
||||
}
|
||||
for (;;) {
|
||||
switch (*status_vector) {
|
||||
case isc_arg_string:
|
||||
@ -4286,7 +4287,7 @@ ISC_STATUS port::service_attach(P_ATCH* attach, PACKET* send)
|
||||
FRBRD *handle;
|
||||
ISC_STATUS_ARRAY status_vector;
|
||||
RDB rdb;
|
||||
STR string;
|
||||
rem_str* string;
|
||||
|
||||
send->p_operation = op_accept;
|
||||
handle = NULL;
|
||||
|
@ -164,7 +164,7 @@ typedef struct wals {
|
||||
SLONG wals_group_id; /* id of the group of the database file */
|
||||
SLONG wals_writer_pid; /* Process id of the WAL writer */
|
||||
MTX_T wals_mutex [1]; /* Mutex controlling access to WAL segment */
|
||||
EVENT_T wals_events [MAX_WALSEMS];
|
||||
event_t wals_events [MAX_WALSEMS];
|
||||
SLONG wals_last_pid; /* Process-id of the last process acquiring mutex */
|
||||
USHORT wals_num_attaches; /* Number of processes who did attachment to WAL segment */
|
||||
USHORT wals_num_detaches; /* Number of processes who did detachment from WAL segment */
|
||||
@ -282,7 +282,7 @@ typedef struct wal {
|
||||
SH_MEM_T wal_shmem_data;
|
||||
#if (defined WIN_NT)
|
||||
MTX_T wal_mutex [1]; /* Mutex controlling access to WAL segment */
|
||||
EVENT_T wal_events [MAX_WALSEMS];
|
||||
event_t wal_events [MAX_WALSEMS];
|
||||
#endif
|
||||
SLONG wal_pid; /* Process (Thread) id of the current process (thread) */
|
||||
SLONG wal_length; /* Length of the WAL segement */
|
||||
|
Loading…
Reference in New Issue
Block a user