mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:43:03 +01:00
Change the interface again. Please full rebuild (although the many recent changes to common.h almost qualify as full rebuild).
This commit is contained in:
parent
1f8e5a1ff8
commit
e90fc8d63f
@ -2647,7 +2647,7 @@ static dsql_req* prepare(thread_db* tdbb, dsql_dbb* database, jrd_tra* transacti
|
||||
statement->req_flags |= REQ_blr_version4;
|
||||
|
||||
GEN_request(statement, node);
|
||||
const USHORT length = statement->req_blr_data.getCount();
|
||||
const ULONG length = statement->req_blr_data.getCount();
|
||||
|
||||
// stop here for ddl statements
|
||||
|
||||
|
@ -290,7 +290,7 @@ static void gen_compile( const gpre_req* request, int column)
|
||||
fprintf(gpreGlob.out_file, "if (!%s)", request->req_handle);
|
||||
align(column);
|
||||
fprintf(gpreGlob.out_file,
|
||||
"%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), TRUE);",
|
||||
"%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), true);",
|
||||
request->req_handle, request->req_ident, request->req_ident);
|
||||
}
|
||||
|
||||
|
@ -578,7 +578,7 @@ jrd_req* CMP_clone_request(thread_db* tdbb, jrd_req* request, USHORT level, bool
|
||||
}
|
||||
|
||||
|
||||
jrd_req* CMP_compile2(thread_db* tdbb, const UCHAR* blr, ULONG blr_length, USHORT internal_flag,
|
||||
jrd_req* CMP_compile2(thread_db* tdbb, const UCHAR* blr, ULONG blr_length, bool internal_flag,
|
||||
USHORT dbginfo_length, const UCHAR* dbginfo)
|
||||
{
|
||||
/**************************************
|
||||
@ -604,8 +604,8 @@ jrd_req* CMP_compile2(thread_db* tdbb, const UCHAR* blr, ULONG blr_length, USHOR
|
||||
{
|
||||
Jrd::ContextPoolHolder context(tdbb, new_pool);
|
||||
|
||||
CompilerScratch* csb = PAR_parse(tdbb, blr, blr_length,
|
||||
internal_flag, dbginfo_length, dbginfo);
|
||||
CompilerScratch* csb =
|
||||
PAR_parse(tdbb, blr, blr_length, internal_flag, dbginfo_length, dbginfo);
|
||||
|
||||
request = CMP_make_request(tdbb, csb, internal_flag);
|
||||
new_pool->setStatsGroup(request->req_memory_stats);
|
||||
|
@ -32,8 +32,8 @@ bool CMP_clone_is_active(const Jrd::jrd_req*);
|
||||
Jrd::jrd_nod* CMP_clone_node_opt(Jrd::thread_db*, Jrd::CompilerScratch*, Jrd::jrd_nod*);
|
||||
Jrd::jrd_nod* CMP_clone_node(Jrd::thread_db*, Jrd::CompilerScratch*, Jrd::jrd_nod*);
|
||||
Jrd::jrd_req* CMP_clone_request(Jrd::thread_db*, Jrd::jrd_req*, USHORT, bool);
|
||||
Jrd::jrd_req* CMP_compile2(Jrd::thread_db*, const UCHAR*, ULONG, USHORT, USHORT = 0,
|
||||
const UCHAR* = NULL);
|
||||
Jrd::jrd_req* CMP_compile2(Jrd::thread_db*, const UCHAR* blr, ULONG blr_length, bool internal_flag,
|
||||
USHORT = 0, const UCHAR* = NULL);
|
||||
Jrd::CompilerScratch::csb_repeat* CMP_csb_element(Jrd::CompilerScratch*, USHORT);
|
||||
void CMP_decrement_prc_use_count(Jrd::thread_db*, Jrd::jrd_prc*);
|
||||
Jrd::jrd_req* CMP_find_request(Jrd::thread_db*, USHORT, USHORT);
|
||||
|
@ -4871,7 +4871,7 @@ static bool get_who( thread_db* tdbb, Global* gbl, Firebird::MetaName& output_na
|
||||
try {
|
||||
if (!request)
|
||||
{
|
||||
request = CMP_compile2(tdbb, who_blr, sizeof(who_blr), TRUE);
|
||||
request = CMP_compile2(tdbb, who_blr, sizeof(who_blr), true);
|
||||
}
|
||||
EXE_start(tdbb, request, gbl->gbl_transaction);
|
||||
SqlIdentifier x;
|
||||
|
@ -147,7 +147,7 @@ SINT64 DYN_UTIL_gen_unique_id(thread_db* tdbb,
|
||||
memcpy(p, gen_id_blr2, sizeof(gen_id_blr2));
|
||||
p += sizeof(gen_id_blr2);
|
||||
|
||||
request = CMP_compile2(tdbb, blr.begin(), (ULONG) blr.getCount(), TRUE);
|
||||
request = CMP_compile2(tdbb, blr.begin(), (ULONG) blr.getCount(), true);
|
||||
}
|
||||
|
||||
EXE_start(tdbb, request, dbb->dbb_sys_trans);
|
||||
@ -582,7 +582,7 @@ bool DYN_UTIL_get_prot(thread_db* tdbb,
|
||||
|
||||
if (!request)
|
||||
{
|
||||
request = CMP_compile2(tdbb, prot_blr, sizeof(prot_blr), TRUE);
|
||||
request = CMP_compile2(tdbb, prot_blr, sizeof(prot_blr), true);
|
||||
}
|
||||
gds__vtov(rname, in_msg.relation_name, sizeof(in_msg.relation_name));
|
||||
gds__vtov(fname, in_msg.field_name, sizeof(in_msg.field_name));
|
||||
|
@ -1712,7 +1712,8 @@ ISC_STATUS GDS_COMPILE(ISC_STATUS* user_status,
|
||||
TraceBlrCompile trace(tdbb, blr_length, (UCHAR*) blr);
|
||||
try
|
||||
{
|
||||
JRD_compile(tdbb, attachment, req_handle, blr_length, reinterpret_cast<const UCHAR*>(blr),
|
||||
JRD_compile(tdbb, attachment, req_handle,
|
||||
(USHORT) blr_length, reinterpret_cast<const UCHAR*>(blr),
|
||||
RefStrPtr(), 0, NULL);
|
||||
|
||||
fb_assert(*req_handle);
|
||||
@ -6589,7 +6590,7 @@ void JRD_unwind_request(thread_db* tdbb, jrd_req* request, SSHORT level)
|
||||
void JRD_compile(thread_db* tdbb,
|
||||
Attachment* attachment,
|
||||
jrd_req** req_handle,
|
||||
SSHORT blr_length,
|
||||
ULONG blr_length,
|
||||
const UCHAR* blr,
|
||||
RefStrPtr ref_str,
|
||||
USHORT dbginfo_length, const UCHAR* dbginfo)
|
||||
@ -6607,7 +6608,7 @@ void JRD_compile(thread_db* tdbb,
|
||||
if (*req_handle)
|
||||
status_exception::raise(Arg::Gds(isc_bad_req_handle));
|
||||
|
||||
jrd_req* request = CMP_compile2(tdbb, blr, blr_length, FALSE, dbginfo_length, dbginfo);
|
||||
jrd_req* request = CMP_compile2(tdbb, blr, blr_length, false, dbginfo_length, dbginfo);
|
||||
|
||||
request->req_attachment = attachment;
|
||||
request->req_request = attachment->att_requests;
|
||||
|
@ -160,7 +160,7 @@ void JRD_start_multiple(Jrd::thread_db* tdbb, Jrd::jrd_tra** tra_handle, USHORT
|
||||
void JRD_start_transaction(Jrd::thread_db* tdbb, Jrd::jrd_tra** transaction, SSHORT count, ...);
|
||||
void JRD_unwind_request(Jrd::thread_db* tdbb, Jrd::jrd_req* request, SSHORT level);
|
||||
void JRD_compile(Jrd::thread_db* tdbb, Jrd::Attachment* attachment, Jrd::jrd_req** req_handle,
|
||||
SSHORT blr_length, const UCHAR* blr, Firebird::RefStrPtr,
|
||||
ULONG blr_length, const UCHAR* blr, Firebird::RefStrPtr,
|
||||
USHORT dbginfo_length, const UCHAR* dbginfo);
|
||||
bool JRD_verify_database_access(const Firebird::PathName&);
|
||||
|
||||
|
@ -186,15 +186,18 @@ jrd_nod* PAR_blr(thread_db* tdbb, jrd_rel* relation, const UCHAR* blr, ULONG blr
|
||||
}
|
||||
|
||||
const SSHORT version = csb->csb_blr_reader.getByte();
|
||||
|
||||
if (version != blr_version4 && version != blr_version5) {
|
||||
switch (version)
|
||||
{
|
||||
case blr_version4:
|
||||
csb->csb_g_flags |= csb_blr_version4;
|
||||
break;
|
||||
case blr_version5:
|
||||
break; // nothing to do
|
||||
default:
|
||||
error(csb, Arg::Gds(isc_metadata_corrupt) <<
|
||||
Arg::Gds(isc_wroblrver) << Arg::Num(blr_version4) << Arg::Num(version));
|
||||
}
|
||||
|
||||
if (version == blr_version4)
|
||||
csb->csb_g_flags |= csb_blr_version4;
|
||||
|
||||
jrd_nod* node = PAR_parse_node(tdbb, csb, OTHER);
|
||||
csb->csb_node = node;
|
||||
|
||||
@ -665,7 +668,7 @@ jrd_nod* PAR_make_node(thread_db* tdbb, int size)
|
||||
|
||||
|
||||
CompilerScratch* PAR_parse(thread_db* tdbb, const UCHAR* blr, ULONG blr_length,
|
||||
USHORT internal_flag, USHORT dbginfo_length, const UCHAR* dbginfo)
|
||||
bool internal_flag, USHORT dbginfo_length, const UCHAR* dbginfo)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -682,18 +685,19 @@ CompilerScratch* PAR_parse(thread_db* tdbb, const UCHAR* blr, ULONG blr_length,
|
||||
CompilerScratch* csb = CompilerScratch::newCsb(*tdbb->getDefaultPool(), 5);
|
||||
csb->csb_blr_reader = BlrReader(blr, blr_length);
|
||||
|
||||
const SSHORT version = csb->csb_blr_reader.getByte();
|
||||
if (internal_flag)
|
||||
csb->csb_g_flags |= csb_internal;
|
||||
|
||||
if (version != blr_version4 && version != blr_version5)
|
||||
{
|
||||
error(csb, Arg::Gds(isc_wroblrver) << Arg::Num(blr_version4) << Arg::Num(version));
|
||||
}
|
||||
|
||||
if (version == blr_version4)
|
||||
const SSHORT version = csb->csb_blr_reader.getByte();
|
||||
switch (version)
|
||||
{
|
||||
case blr_version4:
|
||||
csb->csb_g_flags |= csb_blr_version4;
|
||||
break;
|
||||
case blr_version5:
|
||||
break; // nothing to do
|
||||
default:
|
||||
error(csb, Arg::Gds(isc_wroblrver) << Arg::Num(blr_version4) << Arg::Num(version));
|
||||
}
|
||||
|
||||
if (dbginfo_length > 0)
|
||||
|
@ -54,8 +54,8 @@ Jrd::jrd_nod* PAR_gen_field(Jrd::thread_db*, USHORT, USHORT);
|
||||
Jrd::jrd_nod* PAR_make_field(Jrd::thread_db*, Jrd::CompilerScratch*, USHORT, const Firebird::MetaName&);
|
||||
Jrd::jrd_nod* PAR_make_list(Jrd::thread_db*, Jrd::NodeStack&);
|
||||
Jrd::jrd_nod* PAR_make_node(Jrd::thread_db*, int);
|
||||
Jrd::CompilerScratch* PAR_parse(Jrd::thread_db*, const UCHAR*, ULONG, USHORT,
|
||||
USHORT = 0, const UCHAR* = NULL);
|
||||
Jrd::CompilerScratch* PAR_parse(Jrd::thread_db*, const UCHAR* blr, ULONG blr_length,
|
||||
bool internal_flag, USHORT = 0, const UCHAR* = NULL);
|
||||
|
||||
SLONG PAR_symbol_to_gdscode(const Firebird::string&);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user