Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
b38046e
Encapsulation of metadata cache
AlexPeshkoff Nov 25, 2021
2a397de
Merge branch 'master' into metacache
AlexPeshkoff Nov 25, 2021
6234437
WIP - shared cache of sequences for replicator compiles fine
AlexPeshkoff Dec 20, 2021
a178212
Avoid too many builds for a while
AlexPeshkoff Dec 21, 2021
dd86eba
Shared cache of generators appears to be working
AlexPeshkoff Dec 28, 2021
c6383cb
Before adding conversion to non-safe PTRs
AlexPeshkoff Jan 17, 2022
3420540
Successfully compiled met.epp with hazard pointers to cache objects
AlexPeshkoff Jan 28, 2022
76ddfee
Compiled shared metacache
AlexPeshkoff Feb 14, 2022
4053ea8
Merge branch 'master' into metacache
AlexPeshkoff Feb 14, 2022
2917928
Make it compile after merge
AlexPeshkoff Feb 14, 2022
13895b9
Use SharedReadVector in HazardArray
AlexPeshkoff Feb 18, 2022
90a5d0e
Unify ctor
AlexPeshkoff Feb 18, 2022
55eac37
Avoid unlimited recursion in hazard GC
AlexPeshkoff Feb 18, 2022
5c82cfb
Merge branch 'master' into metacache
AlexPeshkoff Mar 13, 2022
cf85f59
Work in progress
AlexPeshkoff Apr 19, 2022
25ff2f7
WIP
AlexPeshkoff Apr 28, 2022
f0a0d07
WIP
AlexPeshkoff Apr 29, 2022
0164b8a
WIP
AlexPeshkoff May 12, 2022
5b85f04
Successful CREATE DATABASE with shared cache (still has some limitati…
AlexPeshkoff Jul 27, 2022
a25c5c5
Misc
AlexPeshkoff Jul 28, 2022
1ab5457
Successfully created security.fdb
AlexPeshkoff Aug 11, 2022
9054816
Completed DEV_BUILD, including creation of employee.fdb
AlexPeshkoff Oct 7, 2022
1ff3c46
Check for simple (trivially copyable) type in Array, some more or les…
AlexPeshkoff Oct 14, 2022
92a909a
Some changes before merge
AlexPeshkoff Apr 3, 2023
dae83f6
Merge result
AlexPeshkoff Apr 4, 2023
4215b9d
WIP
AlexPeshkoff Jul 14, 2023
7736734
WIP - take into an account states of an object (needs load / normal /…
AlexPeshkoff Dec 15, 2023
462d01b
WiP
AlexPeshkoff Jan 17, 2024
a16665e
met.epp compiles
AlexPeshkoff Jan 24, 2024
e1647ab
jrd dir compiled
AlexPeshkoff Feb 1, 2024
1ac8131
ExprNodes compiled
AlexPeshkoff Feb 6, 2024
626f50f
Shared between attachments statement is ready
AlexPeshkoff Feb 23, 2024
540806b
Fixed some unresolved external refs
AlexPeshkoff Feb 29, 2024
7b09922
WIP
AlexPeshkoff Mar 22, 2024
c2413fb
Use appropriate type CSetId/CollId/TTypeId instead plain SSHORT/USHORT
AlexPeshkoff Mar 27, 2024
320c7a6
Added checkReload() support to startup barrier of versioned object
AlexPeshkoff Mar 29, 2024
abc7273
WIP - took minimum care about required locks
AlexPeshkoff Apr 1, 2024
07ac45e
WIP - shared system requests cache
AlexPeshkoff Apr 2, 2024
35c7428
WIP - attachDatabase() passed till sclInit()
AlexPeshkoff Apr 20, 2024
7609c96
WIP - attachDatabase() completed, trivial SQL runs ok
AlexPeshkoff Apr 22, 2024
2eb2e3a
Routine::flags cleanup
AlexPeshkoff Apr 23, 2024
628255a
Misc
AlexPeshkoff Apr 26, 2024
1423739
Make work DDL operators for domains. Fixed a lot of issues related wi…
AlexPeshkoff May 8, 2024
99eb1c5
Avoid use of expensive std::function<>
AlexPeshkoff May 16, 2024
af683fc
DDL for collations & procedure cleanup
AlexPeshkoff May 21, 2024
c801683
WIP (saved before fbconf)
AlexPeshkoff Jun 5, 2024
8216d90
WIP (i.e. a lot of noisy debugging), but collation created in one tra…
AlexPeshkoff Jun 13, 2024
23fbb9e
Cleanup, first of all unneeded debug print
AlexPeshkoff Jun 14, 2024
cacea5d
CREATE/ALTER PROCEDURE support
AlexPeshkoff Jul 1, 2024
38ffaf4
DROP PROCEDURE support, added plumb cleanup of erased objects from ca…
AlexPeshkoff Jul 10, 2024
bfe98c3
Functions support
AlexPeshkoff Jul 12, 2024
494d7d7
Segfault when destroying UDF
AlexPeshkoff Jul 19, 2024
b933e6b
Refactoring indices DDL support - WiP
AlexPeshkoff Oct 2, 2024
f41b28c
WIP on indices
AlexPeshkoff Oct 25, 2024
8102f32
CREATE INDEX is working except expression indices
AlexPeshkoff Nov 1, 2024
9c87708
Warnings
AlexPeshkoff Nov 29, 2024
0de7b5c
The simplest form of "CREATE TABLE" is working
AlexPeshkoff Nov 29, 2024
1595e04
Make just-created table usable in current transaction
AlexPeshkoff Dec 2, 2024
2a00a58
Increase index flags capacity. Store transaction number as plain int6…
dyemanov Dec 4, 2024
428dd18
Revert back private members of irt_repeat
dyemanov Dec 5, 2024
1f6fec1
CREATE DATABASE works
AlexPeshkoff Dec 9, 2024
821a075
Create indices for constaints after table creation
AlexPeshkoff Dec 26, 2024
ce593a8
Successfully created all tables in employee.fdb
AlexPeshkoff Dec 27, 2024
7defa17
alter index active/inactive, WIP
AlexPeshkoff Dec 30, 2024
ddb9471
Working ALTER INDEX (IN)ACTIVE
AlexPeshkoff Jan 5, 2025
04163d7
DROP INDEX works
AlexPeshkoff Jan 8, 2025
9661e1e
Expression index support & some related formatting
AlexPeshkoff Jan 9, 2025
86a9e78
Fixed assertion in expunge
AlexPeshkoff Jan 9, 2025
2bbfd52
Fix recovery of incompletely erased indices
AlexPeshkoff Jan 10, 2025
fda52dd
Fixed memory leak in expression index
AlexPeshkoff Jan 13, 2025
f61bdeb
Fixed change of transaction type
AlexPeshkoff Jan 14, 2025
aae6a8d
Fixed assertion in BTR_all
AlexPeshkoff Jan 14, 2025
aaaa7ba
Fixed index selection when compiling relation
AlexPeshkoff Jan 17, 2025
28bdd0b
Reworked index root page related code, added some debugging
AlexPeshkoff Jan 17, 2025
fefe8c1
Fix alignment incompatibility between 32-bit and 64-bit builds. Parti…
dyemanov Jan 20, 2025
2474952
Successfully completed linux build
AlexPeshkoff Jan 23, 2025
f664963
Merged changes from master into metacache
AlexPeshkoff Feb 3, 2025
1f67cbb
Merged ods14-irt-repeat
AlexPeshkoff Feb 12, 2025
f916e6e
Make better template argument deduction in AutoSetRestoreFlag
AlexPeshkoff Feb 12, 2025
478c839
Trivial NodePrinter for debugging
AlexPeshkoff Feb 14, 2025
7538720
Better layering in the cache
AlexPeshkoff Feb 14, 2025
8adf2b4
Cache request
AlexPeshkoff Feb 14, 2025
5c2c0cc
Fixed reload of system relations into the cache during attach
AlexPeshkoff Feb 14, 2025
2f2833c
Fixed usage of system relations in internal requests
AlexPeshkoff Feb 14, 2025
4391eb0
Release internal cached statements when closing database
AlexPeshkoff Feb 14, 2025
e094d30
Removed wrong assert
AlexPeshkoff Feb 14, 2025
e4d31a3
Merge branch 'master' into ods14-irt-repeat
dyemanov Feb 15, 2025
30e4c77
Misc
AlexPeshkoff Feb 17, 2025
d343188
Added check for relation visibility to current transaction
AlexPeshkoff Feb 17, 2025
6519989
Fixed exclusive GC lock
AlexPeshkoff Feb 17, 2025
78a5a56
Sync with the metacache branch
dyemanov Feb 18, 2025
b875bcf
Synced with ods14-irt-repeat branch
AlexPeshkoff Feb 19, 2025
3cf1d36
Fixed DB shutdown when LINGER is in use
AlexPeshkoff Feb 21, 2025
a87b982
Delete just created table when transaction is rolled back
AlexPeshkoff Feb 22, 2025
0b5754c
Reenabled a number of DFW services not related with metadata cache
AlexPeshkoff Feb 28, 2025
1b85d6d
Added new access functions to cache. Fixed a case when object is drop…
AlexPeshkoff Mar 7, 2025
3979990
DROP TABLE support
AlexPeshkoff Mar 7, 2025
428e392
WIP - ALTER TABLE
AlexPeshkoff Mar 13, 2025
ae1935b
WIP
AlexPeshkoff Mar 21, 2025
53836de
Support ALTER/DROP table
AlexPeshkoff Apr 3, 2025
e1e5c08
Fixed ALTER TABLE DROP field(s)
AlexPeshkoff Apr 7, 2025
3e6be9a
Restored a number of cache-independent DFW calls that should run on c…
AlexPeshkoff Apr 7, 2025
fc4a265
Clean out dsql procedures cache
AlexPeshkoff Apr 11, 2025
af121e8
Take packages into an account & some cleanup
AlexPeshkoff Apr 13, 2025
74436f2
Clean out dsql functions cache
AlexPeshkoff Apr 15, 2025
6c67936
Fixed correct order of fields when doing "select * from ..."
AlexPeshkoff Apr 16, 2025
b1bb733
Misc fixes related with DROP INDEX
AlexPeshkoff Apr 18, 2025
fabfa28
Fixed a number of issues when deleting relations & indices
AlexPeshkoff Apr 22, 2025
0ae9bb6
Added VIEWs support
AlexPeshkoff Apr 25, 2025
1aa89fe
CREATE TRIGGER works
AlexPeshkoff May 6, 2025
b2b254c
Fixed detection of already modified objects
AlexPeshkoff May 7, 2025
cb71c85
Avoid use of data members when working with MDC
AlexPeshkoff May 7, 2025
04a8861
Cleanup
AlexPeshkoff May 14, 2025
ecd21bc
Fixed req_timer create & destroy
AlexPeshkoff May 14, 2025
7b45f27
Cleanup
AlexPeshkoff May 14, 2025
4eeea4e
Fixed execution & creation of DB-wide triggers
AlexPeshkoff May 14, 2025
0f8e19d
ALTER/DROP various TRIGGERs
AlexPeshkoff May 16, 2025
48ea282
ODS14: header page refactoring (#8401)
dyemanov Feb 20, 2025
193a5ff
Useful assert
AlexPeshkoff May 22, 2025
bd80457
Merged master branch, fixed bug in btr.cpp due to previous merge
AlexPeshkoff May 28, 2025
66c1a3c
Cleanup
AlexPeshkoff May 30, 2025
7d87af7
Fixed rollback of metacache changes after transaction rollback
AlexPeshkoff May 30, 2025
3593d5d
Fixed create/alter procedure
AlexPeshkoff Jun 3, 2025
5f3f0f2
Restore one more dfw lost during code refactoring
AlexPeshkoff Jun 4, 2025
07143b7
Restore package-related DFWs removed during code refactoring
AlexPeshkoff Jun 5, 2025
133387e
cleanup
AlexPeshkoff Jun 11, 2025
f19cd7d
misc
AlexPeshkoff Jun 11, 2025
2e52675
Do not use attachment pool for database-lifetime objects
AlexPeshkoff Jun 11, 2025
0cce1ba
FK-create
AlexPeshkoff Jun 16, 2025
afacac8
Moved relation ID generation and DPM pages creation to system trigger
AlexPeshkoff Jun 24, 2025
419dfc9
Fixed creation of DB-wide triggers after create database
AlexPeshkoff Jul 2, 2025
e21b2d3
Fixed restore by gbak
AlexPeshkoff Jul 2, 2025
32c9867
Fixed restore by gbak - part2
AlexPeshkoff Jul 2, 2025
b1a4e0a
Merge branch 'FK' into metacache
AlexPeshkoff Jul 3, 2025
fb979b8
FK-drop
AlexPeshkoff Jul 6, 2025
df78ac8
Small optimization when checking foreign keys
AlexPeshkoff Jul 25, 2025
2f241dc
Use NOSCAN when loading old object version before modification
AlexPeshkoff Jul 31, 2025
2768b76
misc
AlexPeshkoff Aug 1, 2025
d7e65f9
Make walk_database exception safe
AlexPeshkoff Aug 2, 2025
1524032
Should make diags a little better
AlexPeshkoff Aug 27, 2025
3d8a20e
Restore of real database with huge metadata runs successfully
AlexPeshkoff Aug 27, 2025
74d9945
Fixed races with garbage collector
AlexPeshkoff Sep 2, 2025
fe54b27
Fixed assert when non-existing relation is tried using ID
AlexPeshkoff Sep 2, 2025
6d2f5d7
Implemented rescan of cache elements in CS
AlexPeshkoff Sep 10, 2025
7b5bbfa
Misc
AlexPeshkoff Sep 15, 2025
d449c98
Re-link VIEW resources to current csb
AlexPeshkoff Sep 15, 2025
5fd6009
Fixed varchar field length in dsql
AlexPeshkoff Sep 15, 2025
443208b
Fixed dsql_rel fields length
AlexPeshkoff Sep 17, 2025
d4c515d
Cleanup
AlexPeshkoff Sep 18, 2025
c51e476
Cleanup
AlexPeshkoff Sep 18, 2025
222bb9b
Fixed removal of dropped elements from cache
AlexPeshkoff Sep 18, 2025
21bfb50
Fixed DROP TABLE after CREATE FOREIGN KEY and ROLLBACK
AlexPeshkoff Sep 18, 2025
02b608f
Make it work in classic mode
AlexPeshkoff Sep 25, 2025
ddcff4c
Code cleanup
AlexPeshkoff Sep 25, 2025
404c319
Ensure SubRoutine to satisfy basic NestConst requirements
AlexPeshkoff Sep 25, 2025
d151710
Code cleanup
AlexPeshkoff Sep 25, 2025
351277e
Avoid non-trivial types in array
AlexPeshkoff Sep 26, 2025
548e58f
Protection from a case when >1 attachment tries to change statement v…
AlexPeshkoff Sep 26, 2025
18e152c
Cleanup
AlexPeshkoff Sep 29, 2025
42a4c2e
Add check for deleted relation with particular ID
AlexPeshkoff Sep 29, 2025
702cd4c
User IDs cache should be located in DBB
AlexPeshkoff Sep 30, 2025
72b4a04
Misc
AlexPeshkoff Sep 30, 2025
125178f
Fixed ALTER PROCEDURE statement
AlexPeshkoff Sep 30, 2025
b9e09a3
Fixed CF_ISQL_26
AlexPeshkoff Oct 1, 2025
8d04e8d
Fixed CF_ISQL_27
AlexPeshkoff Oct 2, 2025
4f94183
small optimization
AlexPeshkoff Oct 2, 2025
43b8d7c
Fixed CF_ISQL_11
AlexPeshkoff Oct 2, 2025
533d318
WIP - take care about relation depends
AlexPeshkoff Oct 3, 2025
ca724b5
Better solution for gbak restore
AlexPeshkoff Oct 8, 2025
28f15cc
Fixed order of fields in format
AlexPeshkoff Oct 8, 2025
56ad646
Fixed nullable objects in DSQL
AlexPeshkoff Oct 8, 2025
063c765
Fixed AV when releasing GTT's pages
AlexPeshkoff Oct 9, 2025
304e58d
Cleanup
AlexPeshkoff Oct 9, 2025
2eed52a
Partially picked Fix for ESQL execute procedure
AlexPeshkoff Oct 10, 2025
c763130
Fixed most of assertions in TCS
AlexPeshkoff Oct 10, 2025
eae42a0
More cleanup and fixes of assertions
AlexPeshkoff Oct 13, 2025
a703f47
Merged with namespaces
AlexPeshkoff Oct 19, 2025
63a54a2
Almost compiles - except DdlNodes
AlexPeshkoff Oct 22, 2025
b0ba549
Engine compiles successfully
AlexPeshkoff Oct 24, 2025
536ae36
Misc
AlexPeshkoff Oct 28, 2025
b13a33b
Merged with SCHEMAs code passed first basic tests - create/attach dat…
AlexPeshkoff Oct 28, 2025
cacc784
Use correct flags
AlexPeshkoff Oct 29, 2025
da0326e
Restore running system triggers after merge
AlexPeshkoff Oct 29, 2025
b9de235
Fixed index creation
AlexPeshkoff Oct 30, 2025
811be9a
Fixed triggers
AlexPeshkoff Oct 30, 2025
71bd02b
Fixed procedures
AlexPeshkoff Oct 30, 2025
03c8776
Build complete
AlexPeshkoff Oct 31, 2025
5549892
Fixed collation attributes init during CREATE DATABASE
AlexPeshkoff Oct 31, 2025
e52923d
Misc
AlexPeshkoff Nov 3, 2025
c3fb83c
Avoid global transaction when restoring schemas
AlexPeshkoff Nov 4, 2025
b068f9c
Added check for not opened external file
AlexPeshkoff Nov 4, 2025
81c0195
Misc
AlexPeshkoff Nov 4, 2025
adf76fc
Fixed parse of various routines BLR
AlexPeshkoff Nov 4, 2025
a1c2378
Fix the release build
dyemanov Nov 5, 2025
5fa61a0
Fix incorrect lock state check
dyemanov Nov 5, 2025
b856e2d
Fix incorrect method override
dyemanov Nov 6, 2025
1ba1f1b
Sync lockprint with LCK_* changes
dyemanov Nov 6, 2025
a7400d4
Bump the LM shared memory version
dyemanov Nov 6, 2025
af3a3a2
Fixed a number of issues with DROP/DEACTIVATE INDEX
AlexPeshkoff Nov 11, 2025
fc03622
Fixed regression when drop table right after drop primary key constraint
AlexPeshkoff Nov 11, 2025
550695f
Ensure statisitics is refreshed after ALTER INDEX ACTIVE
AlexPeshkoff Nov 11, 2025
5629138
Move check for an attempt to drop index used by integrity constraint …
AlexPeshkoff Nov 12, 2025
edbbc56
Fixed drop of field, used as foreign key reference
AlexPeshkoff Nov 13, 2025
e56b498
Looks like attempt to reanimate index prepared for deletion (state ir…
AlexPeshkoff Nov 14, 2025
d13fd3e
Merged with master branch
AlexPeshkoff Nov 15, 2025
54e921c
Fixed case-insensitive behavior in CONTAINING
AlexPeshkoff Nov 16, 2025
6c85965
Fixed use of INTL data
AlexPeshkoff Nov 16, 2025
3f2f549
Carefully watch for cache version
AlexPeshkoff Nov 18, 2025
4d0e054
Fixed assert when removing statement from att_attachments
AlexPeshkoff Nov 19, 2025
baadab2
Fixed bugs/core_2042_test.py
AlexPeshkoff Nov 20, 2025
032b41d
Fixed bugs/core_2032_test
AlexPeshkoff Nov 21, 2025
4018f3f
Ensure safe MT access to relation's formats
AlexPeshkoff Nov 22, 2025
80b932e
Fixed use of locks
AlexPeshkoff Nov 24, 2025
9511c2c
Fixed use of shared read vector in formats list
AlexPeshkoff Nov 24, 2025
cbc096e
Fixed core_2766_test, DROP TABLE with indices caused problems
AlexPeshkoff Nov 25, 2025
7d3c4b8
Added forgotten irt page release
AlexPeshkoff Nov 25, 2025
f9b82d5
DROP TABLE with indices, continued
AlexPeshkoff Nov 26, 2025
02c5c8a
Fixed requests leak in EXECUTE PROCEDURE
AlexPeshkoff Nov 26, 2025
c8d0e0e
Fixed DROP TABLE with self-referencing foreign key
AlexPeshkoff Nov 26, 2025
6205b57
Fixed DROP VIEW with calculated fields
AlexPeshkoff Nov 26, 2025
91413ed
Fixed races between primary and secondary attachments
AlexPeshkoff Nov 26, 2025
f3ad315
Rollback metadata access transaction when unwind fresh attach
AlexPeshkoff Nov 27, 2025
4fc1348
Fixed cleanup of per-transaction temp table's pages
AlexPeshkoff Nov 27, 2025
6bf86ad
Removed wrong assertion - in a case of single attachment with -nodb s…
AlexPeshkoff Nov 27, 2025
514922e
Fixed per-statement memory stats
AlexPeshkoff Nov 28, 2025
f4b6e63
Enhancement needed for working DSQL statements cache
AlexPeshkoff Nov 30, 2025
2d25c50
Merge branch 'master' into metacache
AlexPeshkoff Nov 30, 2025
4c6d657
This should fix clang build
AlexPeshkoff Dec 1, 2025
36871e8
Fixed building tests
AlexPeshkoff Dec 1, 2025
b9591b4
Next attempt to make clang happy
AlexPeshkoff Dec 1, 2025
fdba886
Avoid clang warning re. use of uninitialized variable
AlexPeshkoff Dec 1, 2025
840859f
Fixed races when taking rescan lock
AlexPeshkoff Dec 1, 2025
4590dcc
Fixed operator - thanks to TreeHunter9
AlexPeshkoff Dec 2, 2025
070b9fa
Fixed pool leak after loadResources() call
AlexPeshkoff Dec 2, 2025
eac5814
Fixed pool pointer in internally allocated block
AlexPeshkoff Dec 2, 2025
d07752f
Fixed one more pool leak
AlexPeshkoff Dec 2, 2025
d685fa3
Redirected block does not contain red zone - do not check it
AlexPeshkoff Dec 3, 2025
6872d46
Clear versioned objects array before loading pointers to it
AlexPeshkoff Dec 3, 2025
5fd6b3e
Access to RelationPages::dpMap should be protected
AlexPeshkoff Dec 3, 2025
f783a73
Fixed access to system tables when doing fix_plugins_schemas()
AlexPeshkoff Dec 3, 2025
0bfd91e
SyncLockGuard is needed when accessing DBB internals even for debugging
AlexPeshkoff Dec 3, 2025
9111147
Merge branch 'master' into metacache
AlexPeshkoff Dec 3, 2025
977f2ca
Some changes suggested by Noremos after review
AlexPeshkoff Dec 3, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [push, pull_request]
on: [pull_request]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions src/alice/exe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int EXE_action(const TEXT* database, const SINT64 switches)
bool error = false;
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
{
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
Firebird::AutoMemoryPool newPool(MemoryPool::createPool(ALLOC_ARGS0));
AliceContextPoolHolder context(tdgbl, newPool);

for (USHORT i = 0; i < MAX_VAL_ERRORS; i++)
Expand Down Expand Up @@ -145,7 +145,7 @@ int EXE_two_phase(const TEXT* database, const SINT64 switches)
bool error = false;
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
{
Firebird::AutoMemoryPool newPool(MemoryPool::createPool());
Firebird::AutoMemoryPool newPool(MemoryPool::createPool(ALLOC_ARGS0));
AliceContextPoolHolder context(tdgbl, newPool);

for (USHORT i = 0; i < MAX_VAL_ERRORS; i++)
Expand Down
11 changes: 6 additions & 5 deletions src/burp/backup.epp
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,13 @@ burp_fld* get_fields( burp_rel* relation)

if (!Y.RDB$CHARACTER_SET_ID.NULL)
{
field->fld_character_set_id = Y.RDB$CHARACTER_SET_ID;
field->fld_character_set_id = CSetId(Y.RDB$CHARACTER_SET_ID);
field->fld_flags |= FLD_charset_flag;
}

if (!X.RDB$COLLATION_ID.NULL)
{
field->fld_collation_id = X.RDB$COLLATION_ID;
field->fld_collation_id = CollId(X.RDB$COLLATION_ID);
field->fld_flags |= FLD_collate_flag;
}

Expand Down Expand Up @@ -886,13 +886,13 @@ burp_fld* get_fields( burp_rel* relation)

if (!Y.RDB$CHARACTER_SET_ID.NULL)
{
field->fld_character_set_id = Y.RDB$CHARACTER_SET_ID;
field->fld_character_set_id = CSetId(Y.RDB$CHARACTER_SET_ID);
field->fld_flags |= FLD_charset_flag;
}

if (!X.RDB$COLLATION_ID.NULL)
{
field->fld_collation_id = X.RDB$COLLATION_ID;
field->fld_collation_id = CollId(X.RDB$COLLATION_ID);
field->fld_flags |= FLD_collate_flag;
}

Expand Down Expand Up @@ -1647,7 +1647,8 @@ void put_index( burp_rel* relation)
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle1)
X IN RDB$INDICES WITH
X.RDB$SCHEMA_NAME EQUIV NULLIF(relation->rel_name.schema.c_str(), '') AND
X.RDB$RELATION_NAME EQ relation->rel_name.object.c_str()
X.RDB$RELATION_NAME EQ relation->rel_name.object.c_str() AND
X.RDB$INDEX_NAME NOT STARTING TEMP_DEPEND
{
count = 0;
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle2)
Expand Down
7 changes: 4 additions & 3 deletions src/burp/burp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "../common/status.h"
#include "../common/sha.h"
#include "../common/classes/ImplementHelper.h"
#include "../jrd/intl.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
Expand Down Expand Up @@ -767,8 +768,8 @@ struct burp_fld
SSHORT fld_null_flag;
ISC_QUAD fld_default_value;
ISC_QUAD fld_default_source;
SSHORT fld_character_set_id;
SSHORT fld_collation_id;
CSetId fld_character_set_id;
CollId fld_collation_id;
RCRD_OFFSET fld_sql;
RCRD_OFFSET fld_null;
};
Expand Down Expand Up @@ -984,7 +985,7 @@ class GblPool
}

explicit GblPool(bool ownPool)
: gbl_pool(ownPool ? MemoryPool::createPool(getDefaultMemoryPool()) : getDefaultMemoryPool())
: gbl_pool(ownPool ? MemoryPool::createPool(ALLOC_ARGS1 getDefaultMemoryPool()) : getDefaultMemoryPool())
{ }

~GblPool()
Expand Down
29 changes: 17 additions & 12 deletions src/burp/restore.epp
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,19 @@ void activateIndex(BurpGlobals* tdgbl, const QualifiedMetaString& indexName)
{
MODIFY IND1 USING
IND1.RDB$INDEX_INACTIVE = FALSE;
END_MODIFY
END_MODIFY;
ON_ERROR
fError = true;
fb_utils::copyStatus(&local_status_vector, isc_status);
END_ERROR;
}
END_FOR
END_FOR;

ON_ERROR
if (!fError)
fb_utils::copyStatus(&local_status_vector, isc_status);
fError = true;
fb_utils::copyStatus(&local_status_vector, isc_status);
END_ERROR
END_ERROR;

if (!fError)
{
Expand Down Expand Up @@ -4029,11 +4035,11 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation, USHORT id)
break;

case att_field_character_set:
field->fld_character_set_id = (USHORT) get_int32(tdgbl);
field->fld_character_set_id = CSetId(get_int32(tdgbl));
break;

case att_field_collation_id:
field->fld_collation_id = (USHORT) get_int32(tdgbl);
field->fld_collation_id = CollId(get_int32(tdgbl));
X.RDB$COLLATION_ID.NULL = FALSE;
X.RDB$COLLATION_ID = field->fld_collation_id;
break;
Expand Down Expand Up @@ -4236,11 +4242,11 @@ burp_fld* get_field(BurpGlobals* tdgbl, burp_rel* relation, USHORT id)
break;

case att_field_character_set:
field->fld_character_set_id = (USHORT) get_int32(tdgbl);
field->fld_character_set_id = CSetId(get_int32(tdgbl));
break;

case att_field_collation_id:
field->fld_collation_id = (USHORT) get_int32(tdgbl);
field->fld_collation_id = CollId(get_int32(tdgbl));
X.RDB$COLLATION_ID.NULL = FALSE;
X.RDB$COLLATION_ID = field->fld_collation_id;
break;
Expand Down Expand Up @@ -8575,9 +8581,8 @@ bool get_schema(BurpGlobals* tdgbl)

QualifiedMetaString name;
bool securityClass = false;
ITransaction* local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;

STORE (TRANSACTION_HANDLE local_trans REQUEST_HANDLE tdgbl->handles_get_schema_req_handle1)
STORE (REQUEST_HANDLE tdgbl->handles_get_schema_req_handle1)
X IN RDB$SCHEMAS
{
X.RDB$SCHEMA_NAME.NULL = TRUE;
Expand Down Expand Up @@ -13385,13 +13390,13 @@ bool WriteRelationMeta::prepareBatch(BurpGlobals* tdgbl)

SLONG sqlLength, sqlSubType, sqlScale, sqlType;
desc.getSqlInfo(&sqlLength, &sqlSubType, &sqlScale, &sqlType);
SLONG characterSetId = field->fld_character_set_id;
CSetId characterSetId = field->fld_character_set_id;

if (tdgbl->gbl_sw_fix_fss_data && field->fld_character_set_id == CS_UNICODE_FSS &&
((sqlType == SQL_BLOB && field->fld_sub_type == isc_blob_text && !(field->fld_flags & FLD_array)) ||
sqlType == SQL_TEXT || sqlType == SQL_VARYING))
{
characterSetId = tdgbl->gbl_sw_fix_fss_data_id;
characterSetId = CSetId(tdgbl->gbl_sw_fix_fss_data_id);
}
else if (field->fld_flags & FLD_array)
{
Expand Down
19 changes: 10 additions & 9 deletions src/common/CharSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@

#include "CsConvert.h"
#include "IntlUtil.h"
#include "../jrd/intl.h"

namespace Firebird {

template <>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary change

inline void SimpleDelete<charset>::clear(charset* cs)
template <>
inline void SimpleDelete<charset>::clear(charset* cs)
{
if (cs)
{
if (cs)
{
Firebird::IntlUtil::finiCharset(cs);
delete cs;
}
Firebird::IntlUtil::finiCharset(cs);
delete cs;
}
}

class CharSet
{
Expand Down Expand Up @@ -84,7 +85,7 @@ class CharSet
public:
virtual ~CharSet() {}

USHORT getId() const { return id; }
CSetId getId() const { return id; }
const char* getName() const { return cs->charset_name; }
UCHAR minBytesPerChar() const { return cs->charset_min_bytes_per_char; }
UCHAR maxBytesPerChar() const { return cs->charset_max_bytes_per_char; }
Expand Down Expand Up @@ -133,7 +134,7 @@ class CharSet
const ULONG startPos, const ULONG length) const = 0;

private:
USHORT id;
CSetId id;
charset* cs;
UCHAR sqlMatchAny[sizeof(ULONG)];
UCHAR sqlMatchOne[sizeof(ULONG)];
Expand Down
2 changes: 1 addition & 1 deletion src/common/CvtFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ ISC_TIMESTAMP_TZ CVT_format_string_to_datetime(const dsc* desc, const Firebird::
if (format.isEmpty())
cb->err(Arg::Gds(isc_sysf_invalid_null_empty) << Arg::Str(STRINGIZE(format)));

USHORT dtype;
TTypeId dtype;
UCHAR* sourceString;
const USHORT stringLength = CVT_get_string_ptr_common(desc, &dtype, &sourceString, nullptr, 0, 0, cb);

Expand Down
1 change: 1 addition & 0 deletions src/common/StdHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <utility>
#include <variant>
#include <cstddef>
#include <stdexcept>
#include "boost/type_traits/copy_cv.hpp"

namespace Firebird {
Expand Down
3 changes: 2 additions & 1 deletion src/common/TextType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,15 @@
#include "firebird.h"
#include "iberror.h"
#include "../jrd/intl_classes.h"
#include "../common/TextType.h"
#include "../common/IntlUtil.h"
#include "../common/classes/Aligner.h"


namespace Firebird {


TextType::TextType(TTYPE_ID _type, texttype *_tt, USHORT _attributes, CharSet* _cs)
TextType::TextType(TTypeId _type, texttype *_tt, USHORT _attributes, CharSet* _cs)
: tt(_tt), cs(_cs), type(_type), attributes(_attributes)
{
if (cs->getSqlMatchAnyLength() != 0)
Expand Down
7 changes: 4 additions & 3 deletions src/common/TextType.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define COMMON_TEXTTYPE_H

#include "../common/classes/QualifiedMetaString.h"
#include "../jrd/intl.h"

struct texttype;

Expand All @@ -41,7 +42,7 @@ class CharSet;
class TextType
{
public:
TextType(TTYPE_ID _type, texttype* _tt, USHORT _attributes, CharSet* _cs);
TextType(TTypeId _type, texttype* _tt, USHORT _attributes, CharSet* _cs);

private:
TextType(const TextType&); // Not implemented
Expand Down Expand Up @@ -77,7 +78,7 @@ class TextType
ULONG dstLen,
UCHAR* dst);

USHORT getType() const
TTypeId getType() const
{
return type;
}
Expand All @@ -103,7 +104,7 @@ class TextType
CharSet* cs;

private:
TTYPE_ID type;
TTypeId type;
USHORT attributes;

public:
Expand Down
4 changes: 2 additions & 2 deletions src/common/classes/MetaString.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class MetaString
MetaString() noexcept { init(); count = 0; }
MetaString(const char* s) noexcept { assign(s); }
MetaString(const char* s, FB_SIZE_T l) noexcept { assign(s, l); }
MetaString(const MetaString& m) noexcept { set(m); }
MetaString(const MetaString& m) noexcept = default;
MetaString(const AbstractString& s) noexcept { assign(s.c_str(), s.length()); }
explicit MetaString(MemoryPool&) noexcept { init(); count = 0; }
MetaString(MemoryPool&, const char* s) noexcept { assign(s); }
Expand Down Expand Up @@ -214,7 +214,7 @@ class MetaString
MetaString& clear() noexcept { return assign(nullptr, 0); }
MetaString& operator=(const char* s) noexcept { return assign(s); }
MetaString& operator=(const AbstractString& s) noexcept { return assign(s.c_str(), s.length()); }
MetaString& operator=(const MetaString& m) noexcept { return set(m); }
MetaString& operator=(const MetaString& m) noexcept = default;
char* getBuffer(const FB_SIZE_T l) noexcept;

FB_SIZE_T length() const noexcept { return count; }
Expand Down
Loading
Loading