From 7bb6f550eed2268cef05eadf298fce3b205d4c71 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Wed, 25 Dec 2013 23:36:56 +0000 Subject: [PATCH] Misc. --- src/dsql/DdlNodes.epp | 4 ++-- src/jrd/UserManagement.cpp | 2 ++ src/jrd/btr.cpp | 2 +- src/jrd/recsrc/IndexTableScan.cpp | 6 +++--- src/utilities/fbsvcmgr/fbsvcmgr.cpp | 2 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index 8628a2f684..aa857bc003 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -9191,10 +9191,10 @@ void CreateAlterUserNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScra // alter current user UserId* usr = tdbb->getAttachment()->att_user; fb_assert(usr); + if (!usr) - { (Arg::Gds(isc_random) << "Missing user name for ALTER CURRENT USER").raise(); - } + text = usr->usr_user_name; } text.upper(); diff --git a/src/jrd/UserManagement.cpp b/src/jrd/UserManagement.cpp index 01e9c05fc7..5e554310c4 100644 --- a/src/jrd/UserManagement.cpp +++ b/src/jrd/UserManagement.cpp @@ -289,6 +289,7 @@ void UserManagement::execute(USHORT id) merge(merged, cur); ++cur; } + while (old != oldEnd) { merge(merged, old); @@ -440,6 +441,7 @@ RecordBuffer* UserManagement::getList(thread_db* tdbb, jrd_rel* relation) private: UserManagement* userManagement; }; + FillSnapshot fillSnapshot(this); LocalStatus status; diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index 5a5c4ff633..2230d73a79 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -555,7 +555,7 @@ static void checkForLowerKeySkip(bool& skipLowerKey, else { // Check if we have a duplicate node (for the same page) - if (node.prefix < lower.key_length) + if (node.prefix < lower.key_length) { if (node.prefix + node.length == lower.key_length) skipLowerKey = (memcmp(node.data, lower.key_data + node.prefix, node.length) == 0); diff --git a/src/jrd/recsrc/IndexTableScan.cpp b/src/jrd/recsrc/IndexTableScan.cpp index 61adc14188..7ec7e912a0 100644 --- a/src/jrd/recsrc/IndexTableScan.cpp +++ b/src/jrd/recsrc/IndexTableScan.cpp @@ -520,9 +520,9 @@ UCHAR* IndexTableScan::openStream(thread_db* tdbb, Impure* impure, win* window) { UCHAR* pointer = NULL; // If END_BUCKET is reached BTR_find_leaf will return NULL - while (!(pointer = BTR_find_leaf(page, limit_ptr, impure->irsb_nav_data, NULL, - (idx->idx_flags & idx_descending), - (retrieval->irb_generic & (irb_starting | irb_partial)) ))) + while (!(pointer = BTR_find_leaf(page, limit_ptr, impure->irsb_nav_data, NULL, + (idx->idx_flags & idx_descending), + (retrieval->irb_generic & (irb_starting | irb_partial))))) { page = (Ods::btree_page*) CCH_HANDOFF(tdbb, window, page->btr_sibling, LCK_read, pag_index); diff --git a/src/utilities/fbsvcmgr/fbsvcmgr.cpp b/src/utilities/fbsvcmgr/fbsvcmgr.cpp index b4c97c2051..2eaab2cd8d 100644 --- a/src/utilities/fbsvcmgr/fbsvcmgr.cpp +++ b/src/utilities/fbsvcmgr/fbsvcmgr.cpp @@ -609,8 +609,10 @@ const char* capArray[] = { void printCapabilities(const char*& p) { printMessage(57); + int caps = getNumeric(p); bool print = false; + for (unsigned i = 0; capArray[i]; ++i) { if (caps & (1 << i))