Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
398a9f5
Percentile functions
sim1984 Nov 20, 2025
732db5a
Optimization. Record numbers are calculated only once.
sim1984 Nov 21, 2025
4241c38
Test ICU in Android
asfernandes Nov 24, 2025
314378c
Fixed PERCENTILE_DISC with non-numeric argument
sim1984 Nov 24, 2025
312ccbb
increment build number
actions-user Nov 24, 2025
a1f25a5
Getting the parameter type when preparing a query for percentile func…
sim1984 Nov 25, 2025
5179bfe
update doc
sim1984 Nov 25, 2025
be4359f
Changes according to asfernandes
sim1984 Nov 26, 2025
4af373f
Totally misc
dyemanov Nov 29, 2025
8048d14
A few more checks for a valid database file, see also #8450. This pre…
dyemanov Nov 29, 2025
8b3c3d5
increment build number
actions-user Nov 29, 2025
0c1f862
More accurate calculation of the average page fill factor (#8816)
dyemanov Dec 1, 2025
56dfbc2
increment build number
actions-user Dec 1, 2025
579ff5c
Restore the broken record layout optimization by gbak and extend it t…
dyemanov Dec 3, 2025
a2e406c
Merge pull request #8818 from FirebirdSQL/work/gh-8817
hvlad Dec 2, 2025
ead6d59
increment build number
actions-user Dec 3, 2025
ba0d7b2
Fix #8820 - Missing a column name for boolean expression
asfernandes Dec 4, 2025
9048844
increment build number
actions-user Dec 4, 2025
4ae039f
On Windows, return number of valid (full-sized) pages rather than rou…
dyemanov Dec 7, 2025
e878785
increment build number
actions-user Dec 7, 2025
62a2a15
Per pagespace I/O statistics and new trace API interfaces to allow ex…
dyemanov Dec 8, 2025
3b980c6
increment build number
actions-user Dec 8, 2025
ddc4402
Fixes a loop in the GENERATE_SERIES function on boundary values. (#8812)
sim1984 Dec 10, 2025
2a02c8c
increment build number
actions-user Dec 10, 2025
2bf3502
Fix trace docs still using parts of FB 2.5 syntax
mrotteveel Dec 12, 2025
67946bf
Add DeepWiki shield
pcisar Dec 12, 2025
1ea9ef5
increment build number
actions-user Dec 12, 2025
5791b57
Fix errors in LISTAGG implementation
asfernandes Dec 13, 2025
547c6c6
Change wrong and unused return
asfernandes Dec 13, 2025
64f3082
Check field source schema name change
asfernandes Dec 13, 2025
2734218
increment build number
actions-user Dec 13, 2025
68981fa
Fix double increment of variable `i`
asfernandes Dec 15, 2025
a73f5de
increment build number
actions-user Dec 15, 2025
16a7f49
Correction
asfernandes Dec 16, 2025
3b2bc84
Frontported pull request #8826: Fixed potential endless loop inside M…
hvlad Dec 16, 2025
8098b4c
increment build number
actions-user Dec 16, 2025
6826f9b
Fix warnings
asfernandes Dec 17, 2025
effbde2
Added check for percentile constancy within a group
sim1984 Dec 17, 2025
ac85f87
increment build number
actions-user Dec 17, 2025
a3355d5
Update tzdata to version 2025c. (#8832)
github-actions[bot] Dec 20, 2025
f3806fe
increment build number
actions-user Dec 20, 2025
7a87c1f
Fix file name in UTF-8 encoding for gstat (#8829)
paradox1307 Dec 23, 2025
0317f68
increment build number
actions-user Dec 23, 2025
1652fcc
Fix for #8836 (#8838)
aafemt Dec 24, 2025
cfe495d
increment build number
actions-user Dec 24, 2025
f115163
Comment according to Mark's request
AlexPeshkoff Dec 25, 2025
8ed234a
Fixed #8806: Missing privilege checks for the COMMENT ON PARAMETER co…
AlexPeshkoff Dec 25, 2025
5ee2b41
increment build number
actions-user Dec 25, 2025
08387c8
Fix cardinality estimation for the invariant filter
dyemanov Dec 26, 2025
0c1aa58
Fix the cardinality estimation (FIRST ROWS case) in HASH JOINs
dyemanov Dec 26, 2025
ce08ec0
increment build number
actions-user Dec 26, 2025
fc0b004
Fix debug build after b7f5b4b (Use cloop cmake build) (#8824)
aafemt Dec 29, 2025
ab9432c
increment build number
actions-user Dec 29, 2025
a7c8c64
Fix undefined message number error in DELETE WHERE CURRENT OF RETURNING
asfernandes Jan 1, 2026
3767287
increment build number
actions-user Jan 1, 2026
77c8c9d
Fix #8842 - GTT accept weird syntax and has unnecessary syntax conflicts
asfernandes Jan 2, 2026
b40984e
Misc correction
dyemanov Jan 3, 2026
abec538
increment build number
actions-user Jan 3, 2026
e88f729
Fix unused variable warnings
asfernandes Jan 3, 2026
9760157
Fix #8822: Some procedures containing LIST aggregate function are not…
dyemanov Jan 4, 2026
f8c49d4
Percentile functions
sim1984 Nov 20, 2025
5ea818f
Optimization. Record numbers are calculated only once.
sim1984 Nov 21, 2025
4b9e7d7
Fixed PERCENTILE_DISC with non-numeric argument
sim1984 Nov 24, 2025
80e3189
Getting the parameter type when preparing a query for percentile func…
sim1984 Nov 25, 2025
25cbbbf
update doc
sim1984 Nov 25, 2025
3e54bde
Changes according to asfernandes
sim1984 Nov 26, 2025
834feaf
Added check for percentile constancy within a group
sim1984 Dec 17, 2025
fe789bd
Use blr_within_group_order instead blr_sort
sim1984 Jan 4, 2026
03da30c
Merge branch 'percentile-functions' of github.com:sim1984/firebird in…
sim1984 Jan 4, 2026
98c3a50
use blr_within_group_order instead nlr_sort
sim1984 Jan 4, 2026
aaf3174
fixed build
sim1984 Jan 4, 2026
0d51cdf
Changes according to dyemanov
sim1984 Jan 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status (GitHub)](https://github.com/FirebirdSQL/firebird/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/FirebirdSQL/firebird/actions/workflows/main.yml?query=branch%3Amaster)
[![Build Status (AppVeyor)](https://ci.appveyor.com/api/projects/status/github/FirebirdSQL/firebird?branch=master&svg=true)](https://ci.appveyor.com/project/FirebirdSQL/firebird)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/FirebirdSQL/firebird)

# Firebird README

Expand Down
17 changes: 17 additions & 0 deletions builds/install/arch-specific/android/BuildFinalPackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ $ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName push gen/$InitialDebugTar
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir && tar xvf $InitialDebugTar)"
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./common_test --log_level=error && ./libEngine14_test --log_level=error && ./isql_test --log_level=error)"
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell "(cd $AndroidDir/firebird && ./AfterUntar.sh)"

# Verify ICU works
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName shell <<EOF
set -e
cd $AndroidDir/firebird
mkdir -p icu_test
export FIREBIRD_LOCK=$AndroidDir/firebird/icu_test
export FIREBIRD_TMP=$AndroidDir/firebird/icu_test
cat <<'SQL' | ./isql -q
create database 'icu_test/icu_test.fdb';
select '1' from rdb\$database;
select _win1252 '2' from rdb\$database;
select _utf8 '3' collate unicode from rdb\$database;
drop database;
SQL
EOF

$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/firebird.msg gen/Release/firebird/
$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/security6.fdb gen/Release/firebird/
#$ANDROID_HOME/platform-tools/adb -s $AndroidDeviceName pull $AndroidDir/firebird/examples/empbuild/employe2.fdb gen/Release/firebird/examples/empbuild/
Expand Down
7 changes: 5 additions & 2 deletions builds/win32/gen_helper.nmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@ RPL_AWK_SRC=$(MISC)\def_awk.c
RPL_GREP=$(FB_GEN_DIR)\isc_grep.exe
RPL_GREP_SRC=$(MISC)\isc_grep.c
# These utils are platform and build independent, use fixed temporary dir.
UTL_TMP_DIR=$(FB_TEMP_DIR)\Release\misc

updateCloopInterfaces: $(API_H_FILE) $(API_PAS_FILE)

$(UTL_TMP_DIR):
-mkdir $@ 2>nul

$(API_H_FILE): $(IDL_FILE)
$(CLOOP) $(IDL_FILE) c++ $@ IDL_FB_INTERFACES_H Firebird I

$(RPL_AWK): $(RPL_AWK_SRC)
$(RPL_AWK): $(RPL_AWK_SRC) $(UTL_TMP_DIR)
# NMAKE strips trailing backslash during macro substitution that's why it is here and not in definition.
$(CPP) /Fe$@ /Fo$(UTL_TMP_DIR)\ $(RPL_AWK_SRC)

$(RPL_GREP): $(RPL_GREP_SRC)
$(RPL_GREP): $(RPL_GREP_SRC) $(UTL_TMP_DIR)
$(CPP) /Fe$@ /Fo$(UTL_TMP_DIR)\ $(RPL_GREP_SRC)

$(FB_GEN_DIR)\iberror.pas: $(ERR_CONSTS_PAS) $(FB_ROOT_PATH)\src\include\firebird\impl\msg\*.h
Expand Down
66 changes: 33 additions & 33 deletions doc/README.trace_services
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

Trace and audit services.

Firebird 2.5 offers new trace and audit facilities. These new abilities allow
Expand All @@ -12,7 +12,7 @@ engine. List of events to trace, which data items to trace and placement of
trace output is specified by trace configuration when trace session is created.

There are two kinds of trace sessions : system audit and user trace.

System audit session is started by the engine itself and obtains configuration
from the text file. The name of this file is set via new setting in firebird.conf
("AuditTraceConfigFile") and by default has empty value, i.e. no system audit
Expand Down Expand Up @@ -44,7 +44,7 @@ session. When application reads part of the output so output size stay less than

When application decides to stop its trace session it just does detach from
service. Also there is ability to manage trace sessions (suspend\resume\stop).
Administrators are allowed to manage any trace session while ordinary users are
Administrators are allowed to manage any trace session while ordinary users are
allowed to manage their own trace sessions only.

If user trace session was created by ordinary user it will trace only
Expand All @@ -65,9 +65,9 @@ plugin is responsible for logging these events in some form.

There is "standard" implementation of trace plugin, fbtrace.dll (.so) located
in \plugins folder.


There is new specialized standalone utility to work with trace services :

There is new specialized standalone utility to work with trace services :
fbtracemgr. It has the following command line switches :

Action switches :
Expand All @@ -94,20 +94,20 @@ Also, it prints usage screen if run without parameters.


Examples

I. Sample configuration files for user trace sessions:

a) Trace prepare, free and execution of all statements within connection 12345

database
{
enabled true
connection_id 12345
log_statement_prepare true
log_statement_free true
log_statement_start true
log_statement_finish true
time_threshold 0
enabled = true
connection_id = 12345
log_statement_prepare= true
log_statement_free = true
log_statement_start = true
log_statement_finish = true
time_threshold = 0
}

b) Trace all connections of given user to database mydatabase.fdb
Expand All @@ -116,28 +116,28 @@ b) Trace all connections of given user to database mydatabase.fdb

database = %[\\/]mydatabase.fdb
{
enabled true
include_filter (%)(INSERT|UPDATE|DELETE)(%)
log_statement_finish true
log_procedure_finish true
log_trigger_finish true
print_plan true
print_perf true
time_threshold 0
enabled = true
include_filter = (%)(INSERT|UPDATE|DELETE)(%)
log_statement_finish = true
log_procedure_finish = true
log_trigger_finish = true
print_plan = true
print_perf = true
time_threshold = 0
}

c) Trace connections and transactions in all databases except of security database

database
{
enabled true
log_connections true
log_transactions true
enabled = true
log_connections = true
log_transactions = true
}

database = security.db
{
enabled false
enabled = false
}


Expand All @@ -148,27 +148,27 @@ a) Start user trace named "My trace" using configuration file fbtrace.conf and r
its output on the screen :

fbtracemgr -se service_mgr -start -name "My trace" -config fbtrace.conf

To stop this trace session press Ctrl+C at fbtracemgr console window. Or, in
another console : list sessions and look for interesting session ID (b) and stop it
another console : list sessions and look for interesting session ID (b) and stop it
using this found ID (e).

b) List trace sessions

fbtracemgr -se service_mgr -list

c) Suspend trace session with ID 1

fbtracemgr -se service_mgr -suspend -id 1

d) Resume trace session with ID 1

fbtracemgr -se service_mgr -resume -id 1

e) Stop trace session with ID 1

fbtracemgr -se service_mgr -stop -id 1



There are three general use cases :
Expand Down
41 changes: 41 additions & 0 deletions doc/Using_OO_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2101,3 +2101,44 @@ struct FbVarChar

This document is currently missing 2 types of plugins – ExternalEngine and Trace. Information about them will be made
available in next release of it.

# Trace plugin

_TODO_

# Trace objects

_TODO_

# Trace performance statistics

Trace plugin may retrieve various performance statistics available using the `getPerfStats()` method of the trace object, which returns a pointer to the `IPerformanceStats` interface.

```cpp
IPerformanceStats* stats = statement->getPerfStats();
```

The returned pointer may be `nullptr` if the corresponding trace object is not in the terminate state yet (i.e. still active / being executed).

<a name="PerformanceStats"></a> PerformanceStats interface:

- ISC_UINT64 getElapsedTime() - returns the elapsed time, in milliseconds
- ISC_UINT64 getFetchedRecords() - returns number of records fetched during execution
- IPerformanceCounters* getCounters(unsigned group) - returns the requested performance counters group

The following groups of performance counters are currently supported:

- COUNTER_GROUP_PAGES - per-pagespace counters
- COUNTER_GROUP_TABLES - per-table counters

If `getCounters()` is called with a counter group not supported by the implementation, `nullptr` is returned.

<a name="PerformanceCounters"></a> PerformanceCounters interface:

- unsigned getObjectCount() - returns number of objects (e.g. tables) containing non-zero performance counters
- unsigned getMaxCounterIndex() - returns maximum index number of the performance counters supported by the implementation (it's the same for all objects of the same group)
- unsigned getObjectId(unsigned index) - returns ID of the specified object
- const char* getObjectName(unsigned index) - returns name of the specified object
- const ISC_INT64* getObjectCounters(unsigned index) - returns pointer to the vector of performance counters (containing getMaxCounterIndex() + 1 elements) of the specified object

The returned pointer to the vector (as well as the whole instance of `PerformanceStats`) is valid until the object used to obtain the statistics (using the `getPerfStats()` method) is destroyed.
2 changes: 1 addition & 1 deletion doc/sql.extensions/README.listagg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ INSERT INTO TEST_T values(3, 'C', 'A', 'L', true, 'Ж');
INSERT INTO TEST_T values(4, 'D', 'B', 'K', true, 'Й');
COMMIT;

SELECT LISTAGG (ALL COL4, ':') AS FROM TEST_T;
SELECT LISTAGG (ALL COL4, ':') FROM TEST_T;
=======
J:I:L:K

Expand Down
Loading
Loading