From: <ale...@us...> - 2014-09-30 14:21:48
|
Revision: 60064 http://sourceforge.net/p/firebird/code/60064 Author: alexpeshkoff Date: 2014-09-30 14:21:44 +0000 (Tue, 30 Sep 2014) Log Message: ----------- Fixed windows build Modified Paths: -------------- firebird/trunk/src/alice/alice.cpp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp firebird/trunk/src/auth/SecurityDatabase/LegacyServer.h firebird/trunk/src/iscguard/cntl_guard.cpp firebird/trunk/src/jrd/CryptoManager.cpp firebird/trunk/src/jrd/Monitoring.cpp firebird/trunk/src/jrd/cch.cpp firebird/trunk/src/jrd/dfw.epp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/nbak.cpp firebird/trunk/src/jrd/nbak.h firebird/trunk/src/jrd/ods.h firebird/trunk/src/jrd/pag.cpp firebird/trunk/src/jrd/shut.cpp firebird/trunk/src/lock/print.cpp firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp firebird/trunk/src/remote/server/os/win32/window.cpp firebird/trunk/src/utilities/gstat/dba.epp firebird/trunk/src/utilities/gstat/dbaswi.h firebird/trunk/src/utilities/gstat/ppg.cpp firebird/trunk/src/utilities/nbackup/nbackup.cpp Modified: firebird/trunk/src/alice/alice.cpp =================================================================== --- firebird/trunk/src/alice/alice.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/alice/alice.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -46,7 +46,6 @@ #include "../alice/exe_proto.h" #include "../common/msg_encode.h" #include "../yvalve/gds_proto.h" -#include "../jrd/svc.h" #include "../alice/alice_proto.h" #include "../common/utils_proto.h" #include "../common/classes/Switches.h" Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -28,7 +28,6 @@ #include <stdlib.h> #include <time.h> #include "../jrd/ibase.h" -#include "../jrd/jrd.h" #include "../auth/SecurityDatabase/LegacyServer.h" #include "../auth/SecurityDatabase/LegacyHash.h" #include "../common/enc_proto.h" @@ -124,6 +123,21 @@ namespace Auth { +class SecurityDatabaseServer FB_FINAL : public Firebird::StdPlugin<Firebird::Api::ServerImpl<SecurityDatabaseServer> > +{ +public: + explicit SecurityDatabaseServer(Firebird::IPluginConfig* p) + : iParameter(p) + { } + + // IServer implementation + int authenticate(Firebird::IStatus* status, Firebird::IServerBlock* sBlock, Firebird::IWriter* writerInterface); + int release(); + +private: + Firebird::RefPtr<Firebird::IPluginConfig> iParameter; +}; + class SecurityDatabase FB_FINAL : public Firebird::RefCntIface<Firebird::Api::TimerImpl<SecurityDatabase> > { public: Modified: firebird/trunk/src/auth/SecurityDatabase/LegacyServer.h =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/LegacyServer.h 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/auth/SecurityDatabase/LegacyServer.h 2014-09-30 14:21:44 UTC (rev 60064) @@ -43,21 +43,6 @@ namespace Auth { -class SecurityDatabaseServer FB_FINAL : public Firebird::StdPlugin<Firebird::Api::ServerImpl<SecurityDatabaseServer> > -{ -public: - explicit SecurityDatabaseServer(Firebird::IPluginConfig* p) - : iParameter(p) - { } - - // IServer implementation - int authenticate(Firebird::IStatus* status, Firebird::IServerBlock* sBlock, Firebird::IWriter* writerInterface); - int release(); - -private: - Firebird::RefPtr<Firebird::IPluginConfig> iParameter; -}; - void registerLegacyServer(Firebird::IPluginManager* iPlugin); } // namespace Auth Modified: firebird/trunk/src/iscguard/cntl_guard.cpp =================================================================== --- firebird/trunk/src/iscguard/cntl_guard.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/iscguard/cntl_guard.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -24,7 +24,6 @@ #include "firebird.h" #include <stdio.h> #include "../iscguard/cntlg_proto.h" -#include "../remote/remote.h" #include "../utilities/install/install_nt.h" #include "../common/isc_proto.h" #include "../yvalve/gds_proto.h" Modified: firebird/trunk/src/jrd/CryptoManager.cpp =================================================================== --- firebird/trunk/src/jrd/CryptoManager.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/CryptoManager.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -410,7 +410,7 @@ } // nbackup state check - if (dbb.dbb_backup_manager && dbb.dbb_backup_manager->getState() != nbak_state_normal) + if (dbb.dbb_backup_manager && dbb.dbb_backup_manager->getState() != Ods::hdr_nbak_normal) { if (static_cast<ULONG>(currentPage.exchangeAdd(-1)) >= lastPage) { Modified: firebird/trunk/src/jrd/Monitoring.cpp =================================================================== --- firebird/trunk/src/jrd/Monitoring.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/Monitoring.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -1178,13 +1178,13 @@ switch (bm->getState()) { - case nbak_state_normal: + case Ods::hdr_nbak_normal: backup_state = backup_state_normal; break; - case nbak_state_stalled: + case Ods::hdr_nbak_stalled: backup_state = backup_state_stalled; break; - case nbak_state_merge: + case Ods::hdr_nbak_merge: backup_state = backup_state_merge; break; } Modified: firebird/trunk/src/jrd/cch.cpp =================================================================== --- firebird/trunk/src/jrd/cch.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/cch.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -785,10 +785,10 @@ BackupManager* bm = dbb->dbb_backup_manager; const int bak_state = bm->getState(); - fb_assert(bak_state != nbak_state_unknown); + fb_assert(bak_state != Ods::hdr_nbak_unknown); ULONG diff_page = 0; - if (!isTempPage && bak_state != nbak_state_normal) + if (!isTempPage && bak_state != Ods::hdr_nbak_normal) { diff_page = bm->getPageIndex(tdbb, bdb->bdb_page.getPageNum()); NBAK_TRACE(("Reading page %d:%06d, state=%d, diff page=%d", @@ -797,7 +797,7 @@ // In merge mode, if we are reading past beyond old end of file and page is in .delta file // then we maintain actual page in difference file. Always read it from there. - if (isTempPage || bak_state == nbak_state_normal || !diff_page) + if (isTempPage || bak_state == Ods::hdr_nbak_normal || !diff_page) { NBAK_TRACE(("Reading page %d:%06d, state=%d, diff page=%d from DISK", bdb->bdb_page.getPageSpaceID(), bdb->bdb_page.getPageNum(), bak_state, diff_page)); @@ -1163,7 +1163,7 @@ { BackupManager::StateReadGuard stateGuard(tdbb); const int backup_state = bm->getState(); - if (backup_state == nbak_state_stalled || backup_state == nbak_state_merge) + if (backup_state == Ods::hdr_nbak_stalled || backup_state == Ods::hdr_nbak_merge) bm->flushDifference(); } @@ -1814,7 +1814,7 @@ const int backup_state = bm->getState(); - if (backup_state == nbak_state_normal) + if (backup_state == Ods::hdr_nbak_normal) return true; // Temporary pages don't write to delta @@ -1825,7 +1825,7 @@ switch (backup_state) { - case nbak_state_stalled: + case Ods::hdr_nbak_stalled: bdb->bdb_difference_page = bm->getPageIndex(tdbb, bdb->bdb_page.getPageNum()); if (!bdb->bdb_difference_page) { @@ -1843,7 +1843,7 @@ } break; - case nbak_state_merge: + case Ods::hdr_nbak_merge: bdb->bdb_difference_page = bm->getPageIndex(tdbb, bdb->bdb_page.getPageNum()); if (bdb->bdb_difference_page) { @@ -4820,7 +4820,7 @@ if (bdb->bdb_page.getPageNum() >= 0) { - fb_assert(backup_state != nbak_state_unknown); + fb_assert(backup_state != Ods::hdr_nbak_unknown); page->pag_pageno = bdb->bdb_page.getPageNum(); #ifdef NBAK_DEBUG @@ -4855,8 +4855,8 @@ const bool isTempPage = pageSpace->isTemporary(); if (!isTempPage && - (backup_state == nbak_state_stalled || - (backup_state == nbak_state_merge && bdb->bdb_difference_page))) + (backup_state == Ods::hdr_nbak_stalled || + (backup_state == Ods::hdr_nbak_merge && bdb->bdb_difference_page))) { const bool res = @@ -4870,7 +4870,7 @@ return false; } } - if (!isTempPage && backup_state == nbak_state_stalled) + if (!isTempPage && backup_state == Ods::hdr_nbak_stalled) { // We finished. Adjust transaction accounting and get ready for exit if (bdb->bdb_page == HEADER_PAGE_NUMBER) Modified: firebird/trunk/src/jrd/dfw.epp =================================================================== --- firebird/trunk/src/jrd/dfw.epp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/dfw.epp 2014-09-30 14:21:44 UTC (rev 60064) @@ -1935,7 +1935,7 @@ case 3: { BackupManager::StateReadGuard stateGuard(tdbb); - if (dbb->dbb_backup_manager->getState() != nbak_state_normal) + if (dbb->dbb_backup_manager->getState() != Ods::hdr_nbak_normal) { ERR_post(Arg::Gds(isc_no_meta_update) << Arg::Gds(isc_wrong_backup_state)); @@ -1975,7 +1975,7 @@ { BackupManager::StateReadGuard stateGuard(tdbb); - if (dbb->dbb_backup_manager->getState() != nbak_state_normal) + if (dbb->dbb_backup_manager->getState() != Ods::hdr_nbak_normal) { ERR_post(Arg::Gds(isc_no_meta_update) << Arg::Gds(isc_wrong_backup_state)); Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/jrd.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -1538,7 +1538,7 @@ // Initialize backup difference subsystem. This must be done before WAL and shadowing // is enabled because nbackup it is a lower level subsystem - dbb->dbb_backup_manager = FB_NEW(*dbb->dbb_permanent) BackupManager(tdbb, dbb, nbak_state_unknown); + dbb->dbb_backup_manager = FB_NEW(*dbb->dbb_permanent) BackupManager(tdbb, dbb, Ods::hdr_nbak_unknown); dbb->dbb_backup_manager->initializeAlloc(tdbb); PAG_init2(tdbb, 0); @@ -2619,7 +2619,7 @@ // Initialize backup difference subsystem. This must be done before WAL and shadowing // is enabled because nbackup it is a lower level subsystem - dbb->dbb_backup_manager = FB_NEW(*dbb->dbb_permanent) BackupManager(tdbb, dbb, nbak_state_normal); + dbb->dbb_backup_manager = FB_NEW(*dbb->dbb_permanent) BackupManager(tdbb, dbb, Ods::hdr_nbak_normal); dbb->dbb_backup_manager->dbCreating = true; PAG_format_header(tdbb); Modified: firebird/trunk/src/jrd/nbak.cpp =================================================================== --- firebird/trunk/src/jrd/nbak.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/nbak.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -94,7 +94,7 @@ { GlobalRWLock::invalidate(tdbb); NBAK_TRACE( ("invalidate state stateLock(%p)", this) ); - backup_manager->setState(nbak_state_unknown); + backup_manager->setState(Ods::hdr_nbak_unknown); backup_manager->closeDelta(); } @@ -175,7 +175,7 @@ if (!m_success) { NBAK_TRACE( ("invalidate state") ); - dbb->dbb_backup_manager->setState(nbak_state_unknown); + dbb->dbb_backup_manager->setState(Ods::hdr_nbak_unknown); } releaseHeader(); @@ -239,7 +239,7 @@ Ods::header_page* header = (Ods::header_page*) window.win_buffer; // Check state - if (backup_state != nbak_state_normal) + if (backup_state != Ods::hdr_nbak_normal) { NBAK_TRACE(("begin backup - invalid state %d", backup_state)); stateGuard.setSuccess(); @@ -256,7 +256,7 @@ { // no reasons to set it to unknown if we just failed to create difference file stateGuard.setSuccess(); - backup_state = nbak_state_normal; + backup_state = Ods::hdr_nbak_normal; throw; } @@ -313,7 +313,7 @@ GenerateGuid(&guid); // Set state in database header page. All changes are written to main database file yet. CCH_MARK_MUST_WRITE(tdbb, &window); - const int newState = nbak_state_stalled; // Should be USHORT? + const int newState = Ods::hdr_nbak_stalled; // Should be USHORT? header->hdr_flags = (header->hdr_flags & ~Ods::hdr_backup_mask) | newState; const ULONG adjusted_scn = ++header->hdr_header.pag_scn; // Generate new SCN PAG_replace_entry_first(tdbb, header, Ods::HDR_backup_guid, sizeof(guid), @@ -333,7 +333,7 @@ // Determine actual DB size (raw devices support) ULONG BackupManager::getPageCount() { - if (backup_state != nbak_state_stalled) + if (backup_state != Ods::hdr_nbak_stalled) { // calculate pages only when database is locked for backup: // other case such service is just dangerous @@ -449,21 +449,21 @@ { // scope StateReadGuard stateGuard(tdbb); // Nobody is doing end_backup but database isn't in merge state. - if ( (recover || backup_state != nbak_state_stalled) && (backup_state != nbak_state_merge ) ) + if ( (recover || backup_state != Ods::hdr_nbak_stalled) && (backup_state != Ods::hdr_nbak_merge ) ) { NBAK_TRACE(("invalid state %d", backup_state)); endLock.unlockWrite(tdbb); return; } - if (backup_state == nbak_state_stalled && !extendDatabase(tdbb)) + if (backup_state == Ods::hdr_nbak_stalled && !extendDatabase(tdbb)) status_exception::raise(tdbb->tdbb_status_vector); } // Here backup state can be changed. Need to check it again after lock StateWriteGuard stateGuard(tdbb, &window); - if ( (recover || backup_state != nbak_state_stalled) && (backup_state != nbak_state_merge ) ) + if ( (recover || backup_state != Ods::hdr_nbak_stalled) && (backup_state != Ods::hdr_nbak_merge ) ) { stateGuard.setSuccess(); NBAK_TRACE(("invalid state %d", backup_state)); @@ -482,7 +482,7 @@ NBAK_TRACE(("difference file %s, current backup state is %d", diff_name.c_str(), backup_state)); // Set state in database header - backup_state = nbak_state_merge; + backup_state = Ods::hdr_nbak_merge; #ifdef NBAK_DEBUG adjusted_scn = #endif @@ -570,7 +570,7 @@ header = (Ods::header_page*) window.win_buffer; // Set state in database header - backup_state = nbak_state_normal; + backup_state = Ods::hdr_nbak_normal; CCH_MARK_MUST_WRITE(tdbb, &window); // Adjust state header->hdr_flags = (header->hdr_flags & ~Ods::hdr_backup_mask) | backup_state; @@ -612,7 +612,7 @@ void BackupManager::initializeAlloc(thread_db* tdbb) { StateReadGuard stateGuard(tdbb); - if (getState() != nbak_state_normal) + if (getState() != Ods::hdr_nbak_normal) actualizeAlloc(tdbb, false); } @@ -708,7 +708,7 @@ LocalAllocReadGuard localAllocGuard(this); const ULONG diff_page = findPageIndex(tdbb, db_page); - if (diff_page || backup_state == nbak_state_merge && allocIsValid) + if (diff_page || backup_state == Ods::hdr_nbak_merge && allocIsValid) return diff_page; } @@ -905,7 +905,7 @@ if (dbCreating) { - backup_state = nbak_state_normal; + backup_state = Ods::hdr_nbak_normal; return true; } @@ -969,7 +969,7 @@ if (!explicit_diff_name) generateFilename(); - if (new_backup_state == nbak_state_normal || missed_cycle) + if (new_backup_state == Ods::hdr_nbak_normal || missed_cycle) { // Page allocation table cache is no longer valid. LocalAllocWriteGuard localAllocGuard(this); @@ -987,7 +987,7 @@ closeDelta(); } - if (new_backup_state != nbak_state_normal && !diff_file) + if (new_backup_state != Ods::hdr_nbak_normal && !diff_file) openDelta(); // Adjust state at the very and to ensure proper error handling backup_state = new_backup_state; Modified: firebird/trunk/src/jrd/nbak.h =================================================================== --- firebird/trunk/src/jrd/nbak.h 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/nbak.h 2014-09-30 14:21:44 UTC (rev 60064) @@ -111,12 +111,6 @@ virtual void invalidate(thread_db* tdbb); }; -// Note this flags MUST correspond with backup mask in ods.h -const USHORT nbak_state_normal = 0x000; // Normal mode. Changes are simply written to main files -const USHORT nbak_state_stalled = 0x400; // 1024 Main files are locked. Changes are written to diff file -const USHORT nbak_state_merge = 0x800; // 2048 Merging changes from diff file into main files -const USHORT nbak_state_unknown = USHORT(~0); // State is unknown. Needs to be read from disk - /* * The functional responsibilities of NBAK are: * 1. to redirect writes to difference files when asked (ALTER DATABASE BEGIN @@ -130,7 +124,7 @@ * 5. to increment SCN on each change of backup state * * The backup state cycle is: - * nbak_state_normal -> nbak_state_stalled -> nbak_state_merge -> nbak_state_normal + * hdr_nbak_normal -> hdr_nbak_stalled -> hdr_nbak_merge -> hdr_nbak_normal * - In normal state writes go directly to the main database files. * - In stalled state writes go to the difference file only and the main files are * read-only. @@ -169,9 +163,9 @@ * take WRITE lock of this kind. READ lock is necessary to read the table. * * LCK_backup_end is used to ensure reliable execution of state transition from - * nbak_state_merge to nbak_state_normal (MERGE process). Taking of WRITE (LCK_EX) + * hdr_nbak_merge to hdr_nbak_normal (MERGE process). Taking of WRITE (LCK_EX) * lock of this kind is needed to perform the MERGE. Every new attachment attempts - * to finalize incomplete merge if the database is in nbak_state_merge mode and + * to finalize incomplete merge if the database is in hdr_nbak_merge mode and * this lock is not taken. */ @@ -330,7 +324,7 @@ ~BackupManager(); // Set difference file name in header. - // State must be locked and equal to nbak_state_normal to call this method + // State must be locked and equal to hdr_nbak_normal to call this method void setDifference(thread_db* tdbb, const char* filename); // Return current backup state @@ -374,7 +368,7 @@ { fb_assert(tdbb->tdbb_flags & TDBB_backup_write_locked); tdbb->tdbb_flags &= ~TDBB_backup_write_locked; - stateLock->unlockWrite(tdbb, backup_state == nbak_state_unknown); + stateLock->unlockWrite(tdbb, backup_state == Ods::hdr_nbak_unknown); } bool lockStateRead(thread_db* tdbb, SSHORT wait) Modified: firebird/trunk/src/jrd/ods.h =================================================================== --- firebird/trunk/src/jrd/ods.h 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/ods.h 2014-09-30 14:21:44 UTC (rev 60064) @@ -400,10 +400,15 @@ const USHORT hdr_SQL_dialect_3 = 0x10; // 16 database SQL dialect 3 const USHORT hdr_read_only = 0x20; // 32 Database is ReadOnly. If not set, DB is RW const USHORT hdr_encrypted = 0x40; // 64 Database is encrypted -// backup status mask - see bit values in nbak.h const USHORT hdr_backup_mask = 0xC00; const USHORT hdr_shutdown_mask = 0x1080; +// Values for backup mask +const USHORT hdr_nbak_normal = 0x000; // Normal mode. Changes are simply written to main files +const USHORT hdr_nbak_stalled = 0x400; // 1024 Main files are locked. Changes are written to diff file +const USHORT hdr_nbak_merge = 0x800; // 2048 Merging changes from diff file into main files +const USHORT hdr_nbak_unknown = USHORT(~0); // State is unknown. Needs to be read from disk + // Values for shutdown mask const USHORT hdr_shutdown_none = 0x0; const USHORT hdr_shutdown_multi = 0x80; Modified: firebird/trunk/src/jrd/pag.cpp =================================================================== --- firebird/trunk/src/jrd/pag.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/pag.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -750,7 +750,7 @@ const ULONG relative_bit = pageNum.getPageNum() - sequence * pageMgr.pagesPerPIP; BackupManager::StateReadGuard stateGuard(tdbb); - const bool nbak_stalled = dbb->dbb_backup_manager->getState() == nbak_state_stalled; + const bool nbak_stalled = dbb->dbb_backup_manager->getState() == Ods::hdr_nbak_stalled; USHORT next_init_pages = 1; // ensure there are space on disk for faked page @@ -1188,7 +1188,7 @@ notUseFSCache); } - if (dbb->dbb_backup_manager->getState() != nbak_state_normal) + if (dbb->dbb_backup_manager->getState() != Ods::hdr_nbak_normal) dbb->dbb_backup_manager->setForcedWrites(forceWrite, notUseFSCache); } Modified: firebird/trunk/src/jrd/shut.cpp =================================================================== --- firebird/trunk/src/jrd/shut.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/jrd/shut.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -435,7 +435,7 @@ BackupManager::StateReadGuard stateGuard(tdbb); - if (dbb->dbb_backup_manager->getState() != nbak_state_normal) + if (dbb->dbb_backup_manager->getState() != Ods::hdr_nbak_normal) { ERR_post(Arg::Gds(isc_bad_shutdown_mode) << Arg::Str(dbb->dbb_filename)); } Modified: firebird/trunk/src/lock/print.cpp =================================================================== --- firebird/trunk/src/lock/print.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/lock/print.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -36,14 +36,57 @@ #include <stdlib.h> #include <string.h> #include "../common/file_params.h" -#include "../jrd/jrd.h" -#include "../jrd/lck.h" +#include "../jrd/que.h" +#include "../jrd/pag.h" +#include "../lock/lock_proto.h" #include "../common/gdsassert.h" #include "../common/db_alias.h" #include "../yvalve/gds_proto.h" #include "../common/isc_proto.h" #include "../common/isc_s_proto.h" +namespace Jrd { +// Lock types + +enum lck_t { + LCK_database = 1, // Root of lock tree + LCK_relation, // Individual relation lock + LCK_bdb, // Individual buffer block + LCK_tra, // Individual transaction lock + LCK_rel_exist, // Relation existence lock + LCK_idx_exist, // Index existence lock + LCK_attachment, // Attachment lock + LCK_shadow, // Lock to synchronize addition of shadows + LCK_sweep, // Sweep lock for single sweeper + LCK_expression, // Expression index caching mechanism + LCK_prc_exist, // Procedure existence lock + LCK_update_shadow, // shadow update sync lock + LCK_backup_alloc, // Lock for page allocation table in backup spare file + LCK_backup_database, // Lock to protect writing to database file + LCK_backup_end, // Lock to protect end_backup consistency + LCK_rel_partners, // Relation partners lock + LCK_page_space, // Page space ID lock + LCK_dsql_cache, // DSQL cache lock + LCK_monitor, // Lock to dump the monitoring data + LCK_tt_exist, // TextType existence lock + LCK_cancel, // Cancellation lock + LCK_btr_dont_gc, // Prevent removal of b-tree page from index + LCK_shared_counter, // Database-wide shared counter + LCK_tra_pc, // Precommitted transaction lock + LCK_fun_exist, // Function existence lock + LCK_rel_rescan, // Relation forced rescan lock + LCK_crypt, // Crypt lock for single crypt thread + LCK_crypt_status // Notifies about changed database encryption status +}; + +// Lock owner types + +enum lck_owner_t { + LCK_OWNER_database = 1, // A database is the owner of the lock + LCK_OWNER_attachment // An attachment is the owner of the lock +}; +} + #ifdef HAVE_UNISTD_H #include <unistd.h> #endif Modified: firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp =================================================================== --- firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/plugins/udr_engine/UdrEngine.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -147,7 +147,7 @@ const string& entryPoint); public: - void open(IStatus* status, IExternalContext* context, Utf8* name, uint nameSize); + void open(IStatus* status, IExternalContext* context, Utf8* name, unsigned nameSize); void openAttachment(IStatus* status, IExternalContext* context); void closeAttachment(IStatus* status, IExternalContext* context); IExternalFunction* makeFunction(IStatus* status, IExternalContext* context, @@ -231,7 +231,7 @@ public: void getCharSet(IStatus* status, IExternalContext* context, - Utf8* name, uint nameSize) + Utf8* name, unsigned nameSize) { strncpy(name, context->getClientCharSet(), nameSize); @@ -301,7 +301,7 @@ public: void getCharSet(IStatus* status, IExternalContext* context, - Utf8* name, uint nameSize) + Utf8* name, unsigned nameSize) { strncpy(name, context->getClientCharSet(), nameSize); @@ -377,7 +377,7 @@ public: void getCharSet(IStatus* status, IExternalContext* context, - Utf8* name, uint nameSize) + Utf8* name, unsigned nameSize) { strncpy(name, context->getClientCharSet(), nameSize); @@ -621,7 +621,7 @@ } -void Engine::open(IStatus* /*status*/, IExternalContext* /*context*/, Utf8* name, uint nameSize) +void Engine::open(IStatus* /*status*/, IExternalContext* /*context*/, Utf8* name, unsigned nameSize) { strncpy(name, "UTF-8", nameSize); } Modified: firebird/trunk/src/remote/server/os/win32/window.cpp =================================================================== --- firebird/trunk/src/remote/server/os/win32/window.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/remote/server/os/win32/window.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -30,7 +30,6 @@ #include "../../remote/server/os/win32/property.rh" #include "../jrd/ibase.h" -#include "../jrd/svc.h" #include "../jrd/jrd_proto.h" #include "../../remote/server/os/win32/window_proto.h" #include "../../remote/server/os/win32/propty_proto.h" Modified: firebird/trunk/src/utilities/gstat/dba.epp =================================================================== --- firebird/trunk/src/utilities/gstat/dba.epp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/utilities/gstat/dba.epp 2014-09-30 14:21:44 UTC (rev 60064) @@ -41,7 +41,6 @@ #include "../jrd/ibase.h" #include "../jrd/ods.h" #include "../jrd/btn.h" -#include "../jrd/svc.h" #include "../jrd/license.h" #include "../common/msg_encode.h" #include "../common/gdsassert.h" Modified: firebird/trunk/src/utilities/gstat/dbaswi.h =================================================================== --- firebird/trunk/src/utilities/gstat/dbaswi.h 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/utilities/gstat/dbaswi.h 2014-09-30 14:21:44 UTC (rev 60064) @@ -24,7 +24,7 @@ #ifndef DBA_DBASWI_H #define DBA_DBASWI_H -//#include "../common/common.h" +#include "../common/classes/Switches.h" #include "../jrd/constants.h" // Switch handling constants. Note that the first IN_SW_DATA_ITEMS Modified: firebird/trunk/src/utilities/gstat/ppg.cpp =================================================================== --- firebird/trunk/src/utilities/gstat/ppg.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/utilities/gstat/ppg.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -31,7 +31,6 @@ #include "../jrd/ibase.h" #include "../jrd/ods.h" #include "../common/os/guid.h" -#include "../jrd/nbak.h" #include "../yvalve/gds_proto.h" #include "../common/classes/DbImplementation.h" @@ -196,10 +195,10 @@ uSvc->printf(false, ", "); switch (flags & hdr_backup_mask) { - case Jrd::nbak_state_stalled: + case Ods::hdr_nbak_stalled: uSvc->printf(false, "backup lock"); break; - case Jrd::nbak_state_merge: + case Ods::hdr_nbak_merge: uSvc->printf(false, "backup merge"); break; default: Modified: firebird/trunk/src/utilities/nbackup/nbackup.cpp =================================================================== --- firebird/trunk/src/utilities/nbackup/nbackup.cpp 2014-09-30 10:28:15 UTC (rev 60063) +++ firebird/trunk/src/utilities/nbackup/nbackup.cpp 2014-09-30 14:21:44 UTC (rev 60064) @@ -37,7 +37,6 @@ #include "../common/db_alias.h" #include "../jrd/ods.h" -#include "../jrd/nbak.h" #include "../yvalve/gds_proto.h" #include "../common/os/path_utils.h" #include "../common/os/guid.h" @@ -52,6 +51,8 @@ #include "../common/classes/Switches.h" #include "../utilities/nbackup/nbkswi.h" #include "../common/isc_f_proto.h" +#include "../common/StatusArg.h" +#include "../common/classes/objects_array.h" #ifdef HAVE_UNISTD_H #include <unistd.h> @@ -214,7 +215,7 @@ return rc; } #else // HAVE_POSIX_FADVISE - int fb_fadvise(int, off_t, off_t, int) + int fb_fadvise(int, int, int, int) { return 0; } @@ -715,12 +716,12 @@ status_exception::raise(Arg::Gds(isc_nbackup_err_eofdb) << dbname.c_str()); const int backup_state = header.hdr_flags & Ods::hdr_backup_mask; - if (backup_state != Jrd::nbak_state_stalled) + if (backup_state != Ods::hdr_nbak_stalled) { status_exception::raise(Arg::Gds(isc_nbackup_fixup_wrongstate) << dbname.c_str() << - Arg::Num(Jrd::nbak_state_stalled)); + Arg::Num(Ods::hdr_nbak_stalled)); } - header.hdr_flags = (header.hdr_flags & ~Ods::hdr_backup_mask) | Jrd::nbak_state_normal; + header.hdr_flags = (header.hdr_flags & ~Ods::hdr_backup_mask) | Ods::hdr_nbak_normal; seek_file(dbase, 0); write_file(dbase, &header, sizeof(header)); close_database(); @@ -1047,7 +1048,7 @@ Arg::Num(ODS_CURRENT)); } - if ((header->hdr_flags & Ods::hdr_backup_mask) != Jrd::nbak_state_stalled) + if ((header->hdr_flags & Ods::hdr_backup_mask) != Ods::hdr_nbak_stalled) status_exception::raise(Arg::Gds(isc_nbackup_db_notlock) << Arg::Num(header->hdr_flags)); Array<UCHAR> unaligned_page_buffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |