8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 08:43:03 +01:00

Merge branch 'B3_0_Release' of https://github.com/FirebirdSQL/firebird into B3_0_Release

This commit is contained in:
Paul Reeves 2016-04-13 11:22:44 +02:00
commit 0adc6a4749
7 changed files with 57 additions and 31 deletions

View File

@ -2,6 +2,11 @@
* v3.0 Final Release
**************************
* Bugfix CORE-5194
Invalid COMPUTED BY definition generated by ISQL (extract metadata)
Contributor(s):
Adriano dos Santos Fernandes <adrianosf at gmail.com>
* Bugfix CORE-5189
Codes of operation of user management plugin are missing in public API
Contributor(s):

View File

@ -390,6 +390,27 @@ void defineComputed(DsqlCompilerScratch* dsqlScratch, RelationSourceNode* relati
field->subType = desc.dsc_sub_type;
}
if (field->precision == 0 && field->scale != 0)
{
switch (field->dtype)
{
case dtype_short:
field->precision = 4;
break;
case dtype_long:
field->precision = 9;
break;
case dtype_int64:
field->precision = 18;
break;
default:
fb_assert(!DTYPE_IS_EXACT(field->dtype));
}
}
dsqlScratch->resetContextStack();
// Generate the source text.

View File

@ -1816,7 +1816,7 @@ bool ISQL_printNumericType(const char* fieldName, const int fieldType, const int
// We are ODS >= 10 and could be any Dialect
FOR FLD1 IN RDB$FIELDS WITH
FLD1.RDB$FIELD_NAME EQ fieldName
AND FLD1.RDB$FIELD_PRECISION NOT MISSING
AND NOT FLD1.RDB$FIELD_PRECISION EQ 0
// We are Dialect >=3 since FIELD_PRECISION is non-NULL
if (FLD1.RDB$FIELD_SUB_TYPE > 0 && FLD1.RDB$FIELD_SUB_TYPE <= MAX_INTSUBTYPES)
@ -1847,13 +1847,13 @@ bool ISQL_printNumericType(const char* fieldName, const int fieldType, const int
case INTEGER:
isqlGlob.printf("NUMERIC(9, %d)", -fieldScale);
break;
case BIGINT:
isqlGlob.printf("NUMERIC(18, %d)", -fieldScale);
break;
case DOUBLE_PRECISION:
isqlGlob.printf("NUMERIC(15, %d)", -fieldScale);
break;
default:
// BIGINT can't happen there because it would have an explicit field_precision
// and then would be caught by the previous if().
fb_assert(fieldType != BIGINT);
isqlGlob.printf("%s", Column_types[i].type_name);
}
}

View File

@ -263,6 +263,7 @@ public:
return (baseSelectivity < MAXIMUM_SELECTIVITY);
}
IndexedRelationships indexedRelationships;
StreamType stream;
bool baseUnique;
double baseCost;
@ -270,8 +271,6 @@ public:
int baseIndexes;
bool baseNavigated;
bool used;
IndexedRelationships indexedRelationships;
int previousExpectedStreams;
};

View File

@ -33,14 +33,14 @@
#include "../jrd/TempSpace.h"
using Firebird::TempFile;
using namespace Firebird;
// Static definitions/initializations
const size_t MIN_TEMP_BLOCK_SIZE = 64 * 1024;
Firebird::GlobalPtr<Firebird::Mutex> TempSpace::initMutex;
Firebird::TempDirectoryList* TempSpace::tempDirs = NULL;
GlobalPtr<Mutex> TempSpace::initMutex;
TempDirectoryList* TempSpace::tempDirs = NULL;
FB_SIZE_T TempSpace::minBlockSize = 0;
offset_t TempSpace::globalCacheUsage = 0;
@ -98,7 +98,7 @@ FB_SIZE_T TempSpace::FileBlock::write(offset_t offset, const void* buffer, FB_SI
// Constructor
//
TempSpace::TempSpace(MemoryPool& p, const Firebird::PathName& prefix, bool dynamic)
TempSpace::TempSpace(MemoryPool& p, const PathName& prefix, bool dynamic)
: pool(p), filePrefix(p, prefix),
logicalSize(0), physicalSize(0), localCacheUsage(0),
head(NULL), tail(NULL), tempFiles(p),
@ -107,11 +107,11 @@ TempSpace::TempSpace(MemoryPool& p, const Firebird::PathName& prefix, bool dynam
{
if (!tempDirs)
{
Firebird::MutexLockGuard guard(initMutex, FB_FUNCTION);
MutexLockGuard guard(initMutex, FB_FUNCTION);
if (!tempDirs)
{
MemoryPool& def_pool = *getDefaultMemoryPool();
tempDirs = FB_NEW_POOL(def_pool) Firebird::TempDirectoryList(def_pool);
tempDirs = FB_NEW_POOL(def_pool) TempDirectoryList(def_pool);
minBlockSize = Config::getTempBlockSize();
if (minBlockSize < MIN_TEMP_BLOCK_SIZE)
@ -284,7 +284,7 @@ void TempSpace::extend(FB_SIZE_T size)
localCacheUsage += size;
globalCacheUsage += size;
}
catch (const Firebird::BadAlloc&)
catch (const BadAlloc&)
{
// not enough memory
}
@ -371,18 +371,19 @@ TempSpace::Block* TempSpace::findBlock(offset_t& offset) const
TempFile* TempSpace::setupFile(FB_SIZE_T size)
{
Firebird::StaticStatusVector status_vector;
LocalStatus ls;
CheckStatusWrapper localStatus(&ls);
for (FB_SIZE_T i = 0; i < tempDirs->getCount(); i++)
{
TempFile* file = NULL;
Firebird::PathName directory = (*tempDirs)[i];
PathName directory = (*tempDirs)[i];
PathUtils::ensureSeparator(directory);
for (FB_SIZE_T j = 0; j < tempFiles.getCount(); j++)
{
Firebird::PathName dirname, filename;
PathName dirname, filename;
PathUtils::splitLastComponent(dirname, filename, tempFiles[j]->getName());
PathUtils::ensureSeparator(dirname);
if (!directory.compare(dirname))
@ -402,9 +403,9 @@ TempFile* TempSpace::setupFile(FB_SIZE_T size)
file->extend(size);
}
catch (const Firebird::system_error& ex)
catch (const system_error& ex)
{
ex.stuffException(status_vector);
ex.stuffException(&localStatus);
continue;
}
@ -412,10 +413,10 @@ TempFile* TempSpace::setupFile(FB_SIZE_T size)
}
// no room in all directories
Firebird::Arg::Gds status(isc_out_of_temp_space);
status.append(Firebird::Arg::StatusVector(status_vector.begin()));
iscLogStatus(NULL, status.value());
status.raise();
Arg::Gds status_vector(isc_out_of_temp_space);
status_vector.append(Arg::StatusVector(&localStatus));
iscLogStatus(NULL, &localStatus);
status_vector.raise();
return NULL; // compiler silencer
}
@ -480,7 +481,7 @@ void TempSpace::releaseSpace(offset_t position, FB_SIZE_T size)
const offset_t end = position + size;
fb_assert(end <= getSize()); // Block ends in file
if (freeSegments.locate(Firebird::locEqual, end))
if (freeSegments.locate(locEqual, end))
{
// The next segment is found to be adjacent
Segment* const next_seg = &freeSegments.current();
@ -502,7 +503,7 @@ void TempSpace::releaseSpace(offset_t position, FB_SIZE_T size)
return;
}
if (freeSegments.locate(Firebird::locLess, position))
if (freeSegments.locate(locLess, position))
{
// Check the prior segment for being adjacent
Segment* const prior_seg = &freeSegments.current();

View File

@ -3,16 +3,16 @@
*** DO NOT EDIT ***
TO CHANGE ANY INFORMATION IN HERE PLEASE
EDIT src/misc/writeBuildNum.sh
FORMAL BUILD NUMBER:32474
FORMAL BUILD NUMBER:32480
*/
#define PRODUCT_VER_STRING "3.0.0.32474"
#define FILE_VER_STRING "WI-V3.0.0.32474"
#define LICENSE_VER_STRING "WI-V3.0.0.32474"
#define FILE_VER_NUMBER 3, 0, 0, 32474
#define PRODUCT_VER_STRING "3.0.0.32480"
#define FILE_VER_STRING "WI-V3.0.0.32480"
#define LICENSE_VER_STRING "WI-V3.0.0.32480"
#define FILE_VER_NUMBER 3, 0, 0, 32480
#define FB_MAJOR_VER "3"
#define FB_MINOR_VER "0"
#define FB_REV_NO "0"
#define FB_BUILD_NO "32474"
#define FB_BUILD_NO "32480"
#define FB_BUILD_TYPE "V"
#define FB_BUILD_SUFFIX "Firebird 3.0"

View File

@ -9,7 +9,7 @@ BuildType=V
MajorVer=3
MinorVer=0
RevNo=0
BuildNum=32474
BuildNum=32480
NowAt=`pwd`
cd `dirname $0`