3333
3434#include " ../jrd/TempSpace.h"
3535
36- using Firebird::TempFile ;
36+ using namespace Firebird ;
3737
3838// Static definitions/initializations
3939
4040const size_t MIN_TEMP_BLOCK_SIZE = 64 * 1024 ;
4141
42- Firebird:: GlobalPtr<Firebird:: Mutex> TempSpace::initMutex;
43- Firebird:: TempDirectoryList* TempSpace::tempDirs = NULL ;
42+ GlobalPtr<Mutex> TempSpace::initMutex;
43+ TempDirectoryList* TempSpace::tempDirs = NULL ;
4444FB_SIZE_T TempSpace::minBlockSize = 0 ;
4545offset_t TempSpace::globalCacheUsage = 0 ;
4646
@@ -98,7 +98,7 @@ FB_SIZE_T TempSpace::FileBlock::write(offset_t offset, const void* buffer, FB_SI
9898// Constructor
9999//
100100
101- TempSpace::TempSpace (MemoryPool& p, const Firebird:: PathName& prefix, bool dynamic)
101+ TempSpace::TempSpace (MemoryPool& p, const PathName& prefix, bool dynamic)
102102 : pool(p), filePrefix(p, prefix),
103103 logicalSize(0 ), physicalSize(0 ), localCacheUsage(0 ),
104104 head(NULL ), tail(NULL ), tempFiles(p),
@@ -107,11 +107,11 @@ TempSpace::TempSpace(MemoryPool& p, const Firebird::PathName& prefix, bool dynam
107107{
108108 if (!tempDirs)
109109 {
110- Firebird:: MutexLockGuard guard (initMutex, FB_FUNCTION);
110+ MutexLockGuard guard (initMutex, FB_FUNCTION);
111111 if (!tempDirs)
112112 {
113113 MemoryPool& def_pool = *getDefaultMemoryPool ();
114- tempDirs = FB_NEW_POOL (def_pool) Firebird:: TempDirectoryList (def_pool);
114+ tempDirs = FB_NEW_POOL (def_pool) TempDirectoryList (def_pool);
115115 minBlockSize = Config::getTempBlockSize ();
116116
117117 if (minBlockSize < MIN_TEMP_BLOCK_SIZE)
@@ -284,7 +284,7 @@ void TempSpace::extend(FB_SIZE_T size)
284284 localCacheUsage += size;
285285 globalCacheUsage += size;
286286 }
287- catch (const Firebird:: BadAlloc&)
287+ catch (const BadAlloc&)
288288 {
289289 // not enough memory
290290 }
@@ -371,18 +371,19 @@ TempSpace::Block* TempSpace::findBlock(offset_t& offset) const
371371
372372TempFile* TempSpace::setupFile (FB_SIZE_T size)
373373{
374- Firebird::StaticStatusVector status_vector;
374+ LocalStatus ls;
375+ CheckStatusWrapper localStatus (&ls);
375376
376377 for (FB_SIZE_T i = 0 ; i < tempDirs->getCount (); i++)
377378 {
378379 TempFile* file = NULL ;
379380
380- Firebird:: PathName directory = (*tempDirs)[i];
381+ PathName directory = (*tempDirs)[i];
381382 PathUtils::ensureSeparator (directory);
382383
383384 for (FB_SIZE_T j = 0 ; j < tempFiles.getCount (); j++)
384385 {
385- Firebird:: PathName dirname, filename;
386+ PathName dirname, filename;
386387 PathUtils::splitLastComponent (dirname, filename, tempFiles[j]->getName ());
387388 PathUtils::ensureSeparator (dirname);
388389 if (!directory.compare (dirname))
@@ -402,20 +403,20 @@ TempFile* TempSpace::setupFile(FB_SIZE_T size)
402403
403404 file->extend (size);
404405 }
405- catch (const Firebird:: system_error& ex)
406+ catch (const system_error& ex)
406407 {
407- ex.stuffException (status_vector );
408+ ex.stuffException (&localStatus );
408409 continue ;
409410 }
410411
411412 return file;
412413 }
413414
414415 // no room in all directories
415- Firebird:: Arg::Gds status (isc_out_of_temp_space);
416- status .append (Firebird:: Arg::StatusVector (status_vector. begin () ));
417- iscLogStatus (NULL , status. value () );
418- status .raise ();
416+ Arg::Gds status_vector (isc_out_of_temp_space);
417+ status_vector .append (Arg::StatusVector (&localStatus ));
418+ iscLogStatus (NULL , &localStatus );
419+ status_vector .raise ();
419420
420421 return NULL ; // compiler silencer
421422}
@@ -480,7 +481,7 @@ void TempSpace::releaseSpace(offset_t position, FB_SIZE_T size)
480481 const offset_t end = position + size;
481482 fb_assert (end <= getSize ()); // Block ends in file
482483
483- if (freeSegments.locate (Firebird:: locEqual, end))
484+ if (freeSegments.locate (locEqual, end))
484485 {
485486 // The next segment is found to be adjacent
486487 Segment* const next_seg = &freeSegments.current ();
@@ -502,7 +503,7 @@ void TempSpace::releaseSpace(offset_t position, FB_SIZE_T size)
502503 return ;
503504 }
504505
505- if (freeSegments.locate (Firebird:: locLess, position))
506+ if (freeSegments.locate (locLess, position))
506507 {
507508 // Check the prior segment for being adjacent
508509 Segment* const prior_seg = &freeSegments.current ();
0 commit comments