mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
Backport #5913 - Increase number of formats/versions of views from 255 to 32K (CORE-5647).
This commit is contained in:
parent
224cfde065
commit
14eac8b76b
@ -207,8 +207,6 @@ const size_t MAX_ARRAY_DIMENSIONS = 16;
|
||||
|
||||
const size_t MAX_SORT_ITEMS = 255; // ORDER BY f1,...,f255
|
||||
|
||||
const int MAX_TABLE_VERSIONS = 255; // maybe this should be in ods.h.
|
||||
|
||||
const size_t MAX_DB_PER_TRANS = 256; // A multi-db txn can span up to 256 dbs
|
||||
|
||||
// relation types
|
||||
|
@ -5674,8 +5674,16 @@ static bool make_version(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_
|
||||
null_view = blob_id.isEmpty();
|
||||
external_flag = REL.RDB$EXTERNAL_FILE[0];
|
||||
|
||||
if (REL.RDB$FORMAT == MAX_TABLE_VERSIONS)
|
||||
raiseTooManyVersionsError(obj_relation, work->dfw_name);
|
||||
if (REL.RDB$VIEW_BLR.NULL)
|
||||
{
|
||||
if (REL.RDB$FORMAT == MAX_TABLE_VERSIONS)
|
||||
raiseTooManyVersionsError(obj_relation, work->dfw_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (REL.RDB$FORMAT == MAX_VIEW_VERSIONS)
|
||||
raiseTooManyVersionsError(obj_view, work->dfw_name);
|
||||
}
|
||||
|
||||
MODIFY REL USING
|
||||
blb* blob = blb::create(tdbb, transaction, &REL.RDB$RUNTIME);
|
||||
|
@ -721,4 +721,10 @@ const USHORT PAGE_ALIGNMENT = 1024;
|
||||
// size of raw I/O operation for header page
|
||||
const USHORT RAW_HEADER_SIZE = 1024; // ROUNDUP(HDR_SIZE, PAGE_ALIGNMENT);
|
||||
|
||||
// max number of table formats (aka versions), limited by "UCHAR rhd_format"
|
||||
const int MAX_TABLE_VERSIONS = 255;
|
||||
|
||||
// max number of view formats (aka versions), limited by "SSHORT RDB$FORMAT"
|
||||
const int MAX_VIEW_VERSIONS = MAX_SSHORT;
|
||||
|
||||
#endif // JRD_ODS_H
|
||||
|
@ -46,6 +46,7 @@ BEGIN {
|
||||
print ""
|
||||
print "#include \"fb_types.h\""
|
||||
print "#define ODS_TESTING"
|
||||
print "#include \"../common/common.h\""
|
||||
print "#include \"../jrd/ods.h\""
|
||||
print ""
|
||||
print "using namespace Ods;"
|
||||
|
Loading…
Reference in New Issue
Block a user