Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
de87348
Port of TABLESPACES implementation from RedDatabase
romansimakov Apr 17, 2020
1c5d6fe
Merge remote-tracking branch 'origin/firebird_master' into port2fireb…
romansimakov Jan 10, 2021
2f9ac74
Now checks and erasing are performed in transaction and
romansimakov May 16, 2020
766fc1b
Avoid deleting an index tree if it does not exist
romansimakov May 28, 2020
1cf0b81
Wrong constant for the object.
romansimakov May 28, 2020
6598a01
Now to delete the tables while deleting a tablespace we use the same …
romansimakov Jun 10, 2020
390547a
Now we get tablespace before operations on index data and by the mome…
romansimakov Jun 17, 2020
5eeaddd
Added looking up tablespace in BTR_description after reading pagespac…
romansimakov Jun 20, 2020
bb73db9
Corrupted index after altering its tablespace
romansimakov Jul 17, 2020
30b58c4
Do not allow ALTER TABLESPACE for tables which are not commited. RDB$…
ilya071294 May 13, 2021
9bb1f42
Remove wrong line which was added accidentally during merge
ilya071294 May 13, 2021
f8c52a8
Fix race condition when several attachments are simultaneously findin…
ilya071294 May 13, 2021
09b9ae7
Remove assertion which is wrong because pageSpace is NULL during tabl…
ilya071294 May 13, 2021
83630ed
Fix closing and deletion of tablespace file after DROP TABLESPACE <NA…
ilya071294 May 13, 2021
e2929aa
Do not create tablespace file immediately at CREATE TABLESPACE to mak…
ilya071294 May 13, 2021
f44a17d
Post dfw_drop_tablespace before trigger execution like in other DDL n…
ilya071294 May 13, 2021
89b2dc2
Do not allow to ALTER TABLESPACE for a table if the tablespace was dr…
ilya071294 May 13, 2021
d2cdd8e
Fix crash by checking existence of a relation at dfw_clear_datapages.…
ilya071294 May 13, 2021
70469e6
Print ID of a missing tablespace in the error message
ilya071294 May 13, 2021
9f1aa54
Get the SR lock for a tablespace when putting it into tablespaces cache
ilya071294 May 13, 2021
b709ae1
Do not try to find a tablespace during ALTER TABLE DROP TABLESPACE to…
ilya071294 May 13, 2021
ca7a668
Avoid assertion failure in ~thread_db() when opening of a tablespace …
ilya071294 May 13, 2021
72a92fb
Flush DB pages before closing a tablespace file. It prevents server c…
ilya071294 May 13, 2021
df16a6e
Do not allow to ALTER TABLESPACE for an index if the tablespace was d…
ilya071294 May 13, 2021
c8c9876
Do not move index pages when the index is deleted in the same transac…
ilya071294 May 13, 2021
936f2dd
Fix build
ilya071294 May 13, 2021
4e66b10
Merge branch 'firebird_master' into port2firebird_tablespaces
ilya071294 Apr 4, 2022
7426dac
Add ability to ALTER TABLESPACE for tables which are not committed
ilya071294 Apr 8, 2022
75d81b3
Fix DROP TABLE for tables which are not committed
ilya071294 Apr 8, 2022
b8ef3d5
Add some useful assertions for SR lock of tablespace
ilya071294 Apr 8, 2022
2bc0e21
Remove redundant code which was accidentally added during merge of ta…
ilya071294 Apr 8, 2022
a2a0867
Put a relation into cache only if opening of a tablespace file contai…
ilya071294 Apr 8, 2022
ebea006
Fix error messages and gbak help
ilya071294 Apr 8, 2022
31cb30e
Open a tablespace file during index deletion to fix crash when DROP I…
ilya071294 Apr 8, 2022
37b8c07
Don't call MET_tablespace function here because it's already called i…
ilya071294 Apr 8, 2022
7a56031
Eliminate situation when an index implicitly moves from one tablespac…
ilya071294 Apr 8, 2022
e4d2d72
Fix an issue when pages of indexes for GTT were allocated in DB_PAGE_…
ilya071294 Apr 8, 2022
c41c2bd
Add TABLESPACE DEFAULT clause to CREATE INDEX
ilya071294 Apr 8, 2022
344a610
Restore const qualifiers. Use RWLock on page spaces only if SuperServ…
ilya071294 Apr 8, 2022
035b504
1. If TABLESPACE clause is omitted in CREATE INDEX, an index will use…
ilya071294 Apr 8, 2022
d1ae05e
Use checkObjectExist() function in appropriate places
ilya071294 Apr 8, 2022
9741cff
Do not recreate an index if ALTER INDEX specifies a tablespace which …
ilya071294 Apr 8, 2022
095034f
Add an ability to specify a tablespace for PK, FK, UNIQUE constraints…
ilya071294 Apr 8, 2022
ac0990c
Add tablespace-related header files to VS projects
ilya071294 Apr 8, 2022
80cb22e
Temporarily disable tablespace-related clauses which are not fully im…
ilya071294 Apr 8, 2022
16f6593
Do not allow to use SET TABLESPACE clause in ALTER TABLE more than once
ilya071294 Apr 8, 2022
039e3ef
Fix typos in the error message and comments
ilya071294 Apr 8, 2022
d9e66fc
Change the data type of RDB$OFFLINE and RDB$READ_ONLY to BOOLEAN
ilya071294 Apr 8, 2022
cf021e6
Always store an absolute path to a tablespace file in RDB$TABLESPACES
ilya071294 Apr 8, 2022
a2066fa
Do not allow to restore a database if paths for some tablespaces are …
ilya071294 Apr 8, 2022
cbe164e
Restrict access to tablespace files by DatabaseAccess entry of firebi…
ilya071294 Apr 8, 2022
a480ce2
Add -TABLESPACE_ORIG(INAL_PATHS) option to gbak which allows to resto…
ilya071294 Apr 8, 2022
1159813
Add -TS <tablespace> <path> option to gbak which allows to set a path…
ilya071294 Apr 8, 2022
66c7fde
1. Read tablespace names from a mapping file as case sensitive.
ilya071294 Apr 8, 2022
112012b
Rename gbak options -TABLESPACE_* to -TS_*
ilya071294 Apr 8, 2022
eb097ad
Correct the argument of the error message
ilya071294 Apr 8, 2022
a9430d4
Fix the phase 0 of create_tablespace DFW
ilya071294 Apr 8, 2022
282a198
Do not allow to set a tablespace for GTT's indexes
ilya071294 Apr 8, 2022
49c6fbf
Release the exclusive lock on a database after moving a relation or a…
ilya071294 Apr 8, 2022
503ab38
Add missing tablespaces-related messages
ilya071294 Apr 12, 2022
9ff293d
Fix build
ilya071294 Apr 12, 2022
bb40f20
Fix assertion at TipCache::generateStatementId()
ilya071294 Apr 12, 2022
9e07d5c
Fix usage of tablespaces-related messages
ilya071294 Apr 15, 2022
00cd260
Increase ODS version to 14.0 and backup version to 12
ilya071294 Apr 15, 2022
1557ca5
Undo changes which are not related to tablespaces
ilya071294 May 4, 2022
9f3fa6b
Remove unused BTR_delete_index argument
ilya071294 May 5, 2022
ca374ee
Remove unused function
ilya071294 May 5, 2022
d898f74
Correct copyright and comments
ilya071294 May 5, 2022
c1d6e88
Correct code formatting
ilya071294 May 5, 2022
5634fb6
1. Remove unused startSequence argument from DPM_scan_pages().
ilya071294 May 6, 2022
4dce809
Fix warning
ilya071294 May 6, 2022
ec37910
Merge branch 'firebird_master' into port2firebird_tablespaces
Jul 11, 2024
c3a8314
Fixed errors after merge with firebird_master
Jul 11, 2024
5ff5d24
Fix a bug when it was possible to create several tablespaces with the…
ilya071294 May 13, 2022
06d819a
Use 4-byte unsigned integer for page space id
ilya071294 May 16, 2022
63e2418
Temporarily reduce the maximum amount of tablespaces
ilya071294 May 18, 2022
3d51bcb
Create ObjectsArray in the default memory pool instead of the dbb per…
ilya071294 May 20, 2022
3a7b980
Do not store tablespaces privileges in RDB$USER_PRIVILEGES because th…
ilya071294 Jun 21, 2022
c31777e
Add apply_tablespaces_ddl parameter to replication.conf
ilya071294 Jun 8, 2022
d8be9fe
Always enable replication if a plugin name is specified in replicatio…
ilya071294 Jul 8, 2022
2f1a46b
Add a missing argument to gfix message about inconsistent flags
ilya071294 Jan 16, 2023
9753088
Fix an ambiguity in the parser which causes the server to crash due t…
ilya071294 Oct 9, 2023
cdacf7a
Flush only pages from a page space of a tablespace which is being alt…
ilya071294 Mar 30, 2022
9adb486
Delete indexes after tables during DROP TABLESPACE INCLUDING CONTENTS…
ilya071294 Sep 5, 2022
8a3436a
Do not execute DDL triggers for a table when it's deleted during DROP…
ilya071294 Sep 5, 2022
bbebeaa
Disable INCLUDING CONTENTS clause in DROP TABLESPACE because it still…
ilya071294 Sep 9, 2022
b3ffd1c
fix after tablespace porting
Jul 16, 2024
55d3f60
Added ability to comment on tablespaces
Aug 5, 2024
39553b7
Added "IF EXISTS" for drop clause for tablespace
Aug 5, 2024
785a411
Added CREATE IF NOT EXISTS for tablespaces
Aug 5, 2024
55dfad1
Merge branch 'firebird_master' into port2firebird_tablespaces2
Oct 28, 2024
5747e47
Fix the show tablespace TS command error
Oct 28, 2024
794912a
Fix inability to create TS after BEGIN BACKUP
Sep 19, 2024
47d48a2
Fix create/alter TS clauses after merge
Oct 28, 2024
423a62e
Merge branch 'firebird_master' into port2firebird_tablespaces2
Nov 11, 2024
cabcf28
fix restore TS error: validation error for column RDB$TABLESPACE_ID v…
Nov 7, 2024
ac94102
Increase ODS version for FB 6.0
Nov 11, 2024
55c7d81
Add small fixes after the TS porting branch update
Nov 11, 2024
362ee8d
Try to fix windows build for tablespaces
Nov 12, 2024
b3ffc01
Merge branch 'master' into port2firebird_tablespaces2
Nov 12, 2024
9c87830
Try to fix macos build for tablespaces
Nov 12, 2024
c94f003
Add readme.tablespaces
Mar 20, 2025
c84ca58
Add the ability to move the contents of a tablespace to PRIMARY durin…
Mar 20, 2025
6877029
Make the main database file as PRIMARY TS
May 27, 2025
4d4a74c
Fix readme for tablespaces
May 28, 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
Prev Previous commit
Next Next commit
1. Remove unused startSequence argument from DPM_scan_pages().
2. Remove RDB$PAGE_SEQUENCE field from index on RDB$PAGES because DPM_scan_pages() doesn't use the field anymore.
  • Loading branch information
ilya071294 committed May 11, 2022
commit 5634fb6836e679a89d58b60f07a15f203e54f97c
9 changes: 1 addition & 8 deletions src/jrd/dpm.epp
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,7 @@ SLONG DPM_prefetch_bitmap(thread_db* tdbb, jrd_rel* relation, PageBitmap* bitmap
#endif


void DPM_scan_pages(thread_db* tdbb, SCHAR pagType /*= 0*/, int relId /*= 0*/, ULONG startSequence /*= 0*/)
void DPM_scan_pages(thread_db* tdbb, SCHAR pagType /*= 0*/, int relId /*= 0*/)
{
/**************************************
*
Expand Down Expand Up @@ -2115,7 +2115,6 @@ void DPM_scan_pages(thread_db* tdbb, SCHAR pagType /*= 0*/, int relId /*= 0*/, U
FOR(REQUEST_HANDLE request) X IN RDB$PAGES
WITH X.RDB$RELATION_ID = relId
AND X.RDB$PAGE_TYPE = pagType
AND X.RDB$PAGE_SEQUENCE >= startSequence
{
relation = MET_relation(tdbb, X.RDB$RELATION_ID);
relPages = relation->getBasePages();
Expand All @@ -2142,12 +2141,6 @@ void DPM_scan_pages(thread_db* tdbb, SCHAR pagType /*= 0*/, int relId /*= 0*/, U
CORRUPT(257); // msg 257 bad record in RDB$PAGES
}

if ((sequence == startSequence) && (vector = *address))
{
fb_assert(vector->count() > sequence);
fb_assert((*vector)[sequence] == X.RDB$PAGE_NUMBER);
}

vector = *address = vcl::newVector(*dbb->dbb_permanent, *address, sequence + 1);
(*vector)[sequence] = X.RDB$PAGE_NUMBER;
}
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/dpm_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void DPM_pages(Jrd::thread_db*, SSHORT, int, ULONG, ULONG);
#ifdef SUPERSERVER_V2
SLONG DPM_prefetch_bitmap(Jrd::thread_db*, Jrd::jrd_rel*, Jrd::PageBitmap*, SLONG);
#endif
void DPM_scan_pages(Jrd::thread_db*, SCHAR pagType = 0, int relId = 0, ULONG startSequence = 0);
void DPM_scan_pages(Jrd::thread_db*, SCHAR pagType = 0, int relId = 0);
void DPM_store(Jrd::thread_db*, Jrd::record_param*, Jrd::PageStack&, const Jrd::RecordStorageType type);
RecordNumber DPM_store_blob(Jrd::thread_db*, Jrd::blb*, Jrd::Record*);
void DPM_rewrite_header(Jrd::thread_db*, Jrd::record_param*);
Expand Down
5 changes: 2 additions & 3 deletions src/jrd/idx.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,10 @@ static const struct ini_idx_t indices[] =
INDEX(57, rel_tablespaces, idx_unique, 1)
SEGMENT(f_ts_name, idx_metadata) // tablespace name
}},
// define index RDB$INDEX_58 for RDB$PAGES RDB$PAGE_TYPE, RDB$RELATION_ID, RDB$PAGE_SEQUENCE;
INDEX(58, rel_pages, 0, 3)
// define index RDB$INDEX_58 for RDB$PAGES RDB$PAGE_TYPE, RDB$RELATION_ID;
INDEX(58, rel_pages, 0, 2)
SEGMENT(f_pag_type, idx_numeric), // page type
SEGMENT(f_pag_id, idx_numeric), // relation id
SEGMENT(f_pag_seq, idx_numeric) // page sequence
}}
};

Expand Down