8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +01:00

Fixed bug #8171 : Trace plugin unloaded if called method is not implemented

This commit is contained in:
Vlad Khorsun 2024-07-08 00:15:34 +03:00
parent cc71c6fcf4
commit 262af1d2fc
3 changed files with 12 additions and 8 deletions

View File

@ -1574,6 +1574,7 @@ interface TracePlugin : ReferenceCounted
TraceFunction function, boolean started, uint func_result);
version: // 4.0.1 -> 4.0.2
[notImplemented(true)]
boolean trace_dsql_restart(TraceDatabaseConnection connection, TraceTransaction transaction,
TraceSQLStatement statement, uint number);
@ -1581,12 +1582,15 @@ version: // 4.0 -> 5.0
// Compilation of stored procedures, functions, triggers
[notImplemented(true)]
boolean trace_proc_compile(TraceDatabaseConnection connection, TraceProcedure procedure,
int64 time_millis, uint proc_result);
[notImplemented(true)]
boolean trace_func_compile(TraceDatabaseConnection connection, TraceFunction function,
int64 time_millis, uint func_result);
[notImplemented(true)]
boolean trace_trigger_compile(TraceDatabaseConnection connection, TraceTrigger trigger,
int64 time_millis, uint trig_result);
}

View File

@ -6342,7 +6342,7 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
return 0;
return true;
}
FB_BOOLEAN ret = static_cast<VTable*>(this->cloopVTable)->trace_dsql_restart(this, connection, transaction, statement, number);
return ret;
@ -6352,7 +6352,7 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
return 0;
return true;
}
FB_BOOLEAN ret = static_cast<VTable*>(this->cloopVTable)->trace_proc_compile(this, connection, procedure, time_millis, proc_result);
return ret;
@ -6362,7 +6362,7 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
return 0;
return true;
}
FB_BOOLEAN ret = static_cast<VTable*>(this->cloopVTable)->trace_func_compile(this, connection, function, time_millis, func_result);
return ret;
@ -6372,7 +6372,7 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
return 0;
return true;
}
FB_BOOLEAN ret = static_cast<VTable*>(this->cloopVTable)->trace_trigger_compile(this, connection, trigger, time_millis, trig_result);
return ret;

View File

@ -9291,7 +9291,7 @@ end;
function ITracePlugin.trace_dsql_restart(connection: ITraceDatabaseConnection; transaction: ITraceTransaction; statement: ITraceSQLStatement; number: Cardinal): Boolean;
begin
if (vTable.version < 4) then begin
Result := false;
Result := true;
end
else begin
Result := TracePluginVTable(vTable).trace_dsql_restart(Self, connection, transaction, statement, number);
@ -9301,7 +9301,7 @@ end;
function ITracePlugin.trace_proc_compile(connection: ITraceDatabaseConnection; procedure_: ITraceProcedure; time_millis: Int64; proc_result: Cardinal): Boolean;
begin
if (vTable.version < 5) then begin
Result := false;
Result := true;
end
else begin
Result := TracePluginVTable(vTable).trace_proc_compile(Self, connection, procedure_, time_millis, proc_result);
@ -9311,7 +9311,7 @@ end;
function ITracePlugin.trace_func_compile(connection: ITraceDatabaseConnection; function_: ITraceFunction; time_millis: Int64; func_result: Cardinal): Boolean;
begin
if (vTable.version < 5) then begin
Result := false;
Result := true;
end
else begin
Result := TracePluginVTable(vTable).trace_func_compile(Self, connection, function_, time_millis, func_result);
@ -9321,7 +9321,7 @@ end;
function ITracePlugin.trace_trigger_compile(connection: ITraceDatabaseConnection; trigger: ITraceTrigger; time_millis: Int64; trig_result: Cardinal): Boolean;
begin
if (vTable.version < 5) then begin
Result := false;
Result := true;
end
else begin
Result := TracePluginVTable(vTable).trace_trigger_compile(Self, connection, trigger, time_millis, trig_result);