|
From: <asf...@us...> - 2011-10-27 01:04:22
|
Revision: 53598
http://firebird.svn.sourceforge.net/firebird/?rev=53598&view=rev
Author: asfernandes
Date: 2011-10-27 01:04:14 +0000 (Thu, 27 Oct 2011)
Log Message:
-----------
Misc.
Modified Paths:
--------------
firebird/trunk/doc/sql.extensions/README.merge.txt
firebird/trunk/src/auth/AuthDbg.cpp
firebird/trunk/src/common/cvt.cpp
firebird/trunk/src/common/isc_sync.cpp
firebird/trunk/src/common/os/posix/isc_ipc.cpp
firebird/trunk/src/common/unicode_util.cpp
firebird/trunk/src/dbs/metadata.sql
firebird/trunk/src/dsql/StmtNodes.cpp
firebird/trunk/src/jrd/btr.cpp
firebird/trunk/src/jrd/shut.cpp
firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp
firebird/trunk/src/jrd/trace/TraceConfigStorage.h
firebird/trunk/src/jrd/vio.cpp
firebird/trunk/src/lock/lock.cpp
firebird/trunk/src/remote/client/interface.cpp
firebird/trunk/src/yvalve/why.cpp
Modified: firebird/trunk/doc/sql.extensions/README.merge.txt
===================================================================
--- firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/doc/sql.extensions/README.merge.txt 2011-10-27 01:04:14 UTC (rev 53598)
@@ -32,7 +32,7 @@
VALUES <left paren> <value list> <right paren>
Syntax rules:
- 1. At least one of <merge when matched> and <merge when not matched> should be specified.
+ 1. At least one of <merge when matched> or <merge when not matched> should be specified.
Scope:
DSQL, PSQL
Modified: firebird/trunk/src/auth/AuthDbg.cpp
===================================================================
--- firebird/trunk/src/auth/AuthDbg.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/auth/AuthDbg.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -65,21 +65,21 @@
str.erase();
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugServerInstance::startAuthentication: tA-tag=%d dpb=%p\n", tags->trustedAuth, dpb);
+ fprintf(stderr, "DebugServer::startAuthentication: tA-tag=%d dpb=%p\n", tags->trustedAuth, dpb);
#endif
if (tags->trustedAuth && dpb && dpb->find(tags->trustedAuth))
{
unsigned int len;
const UCHAR* s = dpb->get(&len);
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugServerInstance::startAuthentication: get()=%.*s\n", len, s);
+ fprintf(stderr, "DebugServer::startAuthentication: get()=%.*s\n", len, s);
#endif
str.assign(s, len);
}
str += '_';
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugServerInstance::startAuthentication: %s\n", str.c_str());
+ fprintf(stderr, "DebugServer::startAuthentication: %s\n", str.c_str());
#endif
return AUTH_MORE_DATA;
}
@@ -96,7 +96,7 @@
try
{
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugServerInstance::contAuthentication: %.*s\n", size, data);
+ fprintf(stderr, "DebugServer::contAuthentication: %.*s\n", size, data);
#endif
Firebird::MasterInterfacePtr()->upgradeInterface(writerInterface, FB_AUTH_WRITER_VERSION, upInfo);
writerInterface->add(Firebird::string((const char*) data, size).c_str());
@@ -114,7 +114,7 @@
*data = reinterpret_cast<const unsigned char*>(str.c_str());
*dataSize = str.length();
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugServerInstance::getData: %.*s\n", *dataSize, *data);
+ fprintf(stderr, "DebugServer::getData: %.*s\n", *dataSize, *data);
#endif
}
@@ -139,14 +139,14 @@
{
str = "HAND";
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugClientInstance::startAuthentication: %s\n", str.c_str());
+ fprintf(stderr, "DebugClient::startAuthentication: %s\n", str.c_str());
#endif
if (dpb && tags->trustedAuth)
{
Firebird::MasterInterfacePtr()->upgradeInterface(dpb, FB_AUTH_CLUMPLETS_VERSION, upInfo);
dpb->add(tags->trustedAuth, str.c_str(), str.length());
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugClientInstance::startAuthentication: DPB filled\n");
+ fprintf(stderr, "DebugClient::startAuthentication: DPB filled\n");
#endif
return AUTH_SUCCESS;
}
@@ -164,7 +164,7 @@
try
{
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugClientInstance::contAuthentication: %.*s\n", size, data);
+ fprintf(stderr, "DebugClient::contAuthentication: %.*s\n", size, data);
#endif
str.assign(data, size);
const char* env = getenv("ISC_DEBUG_AUTH");
@@ -186,7 +186,7 @@
*data = reinterpret_cast<const unsigned char*>(str.c_str());
*dataSize = str.length();
#ifdef AUTH_VERBOSE
- fprintf(stderr, "DebugClientInstance::getData: %.*s\n", *dataSize, *data);
+ fprintf(stderr, "DebugClient::getData: %.*s\n", *dataSize, *data);
#endif
}
Modified: firebird/trunk/src/common/cvt.cpp
===================================================================
--- firebird/trunk/src/common/cvt.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/common/cvt.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -1741,7 +1741,7 @@
* A data conversion error occurred. Complain.
*
**************************************/
- Firebird::string message;
+ string message;
if (desc->dsc_dtype == dtype_blob)
message = "BLOB";
Modified: firebird/trunk/src/common/isc_sync.cpp
===================================================================
--- firebird/trunk/src/common/isc_sync.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/common/isc_sync.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -534,30 +534,35 @@
#ifdef DEB_EVNT
struct AbsPtr
{
- SLONG offset;
- int fn;
- bool bad()
- {
- return offset < 0 || fn < 0;
- }
AbsPtr()
: offset(-1), fn(-1)
{ }
+
bool operator==(const AbsPtr& sec) const
{
return offset == sec.offset && fn == sec.fn;
}
+
+ bool bad()
+ {
+ return offset < 0 || fn < 0;
+ }
+
+ SLONG offset;
+ int fn;
};
static AbsPtr absPtr(const void* s)
{
const int n = getByAddress((UCHAR*) s);
AbsPtr rc;
+
if (n >= 0)
{
- rc.offset = (IPTR)s - (IPTR)(sharedFiles[n].from);
+ rc.offset = (IPTR) s - (IPTR) (sharedFiles[n].from);
rc.fn = sharedFiles[n].fileNum;
}
+
return rc;
}
#endif // DEB_EVNT
@@ -726,6 +731,7 @@
} state;
int code;
};
+
GlobalPtr<Array<Dump> > dump;
GlobalPtr<Mutex> dMutex;
Modified: firebird/trunk/src/common/os/posix/isc_ipc.cpp
===================================================================
--- firebird/trunk/src/common/os/posix/isc_ipc.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/common/os/posix/isc_ipc.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -149,7 +149,7 @@
#endif
#ifdef SA_SIGINFO
-static void CLIB_ROUTINE signal_action(int number, siginfo_t *siginfo, void *context);
+static void CLIB_ROUTINE signal_action(int number, siginfo_t* siginfo, void* context);
#else
static void CLIB_ROUTINE signal_action(int number);
#endif
@@ -346,7 +346,7 @@
#ifdef SA_SIGINFO
-static void CLIB_ROUTINE signal_action(int number, siginfo_t *siginfo, void *context)
+static void CLIB_ROUTINE signal_action(int number, siginfo_t* siginfo, void* context)
#else
static void CLIB_ROUTINE signal_action(int number)
#endif
Modified: firebird/trunk/src/common/unicode_util.cpp
===================================================================
--- firebird/trunk/src/common/unicode_util.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/common/unicode_util.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -1031,6 +1031,7 @@
LocalStatus lastError;
string version;
const int majorArray[] = {4, 3, 5, 6, 0};
+
for (const int* major = majorArray; *major; ++major)
{
for (int minor = 20; minor--; ) // from 19 down to 0
@@ -1054,9 +1055,7 @@
<< Arg::StatusVector(lastError.get())).raise();
}
else
- {
(Arg::Gds(isc_random) << "Could not find acceptable ICU library").raise();
- }
// compiler warning silencer
return *convIcu;
Modified: firebird/trunk/src/dbs/metadata.sql
===================================================================
--- firebird/trunk/src/dbs/metadata.sql 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/dbs/metadata.sql 2011-10-27 01:04:14 UTC (rev 53598)
@@ -32,4 +32,3 @@
/* Index definitions for all user tables */
CREATE UNIQUE INDEX QLI$PROCEDURES_IDX1 ON QLI$PROCEDURES(QLI$PROCEDURE_NAME);
-
Modified: firebird/trunk/src/dsql/StmtNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/dsql/StmtNodes.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -218,7 +218,6 @@
dsql_ctx* oldContext;
string oldAlias, oldInternalAlias;
AutoSetRestore<USHORT> autoFlags;
- bool hasModContext;
};
} // namespace
Modified: firebird/trunk/src/jrd/btr.cpp
===================================================================
--- firebird/trunk/src/jrd/btr.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/jrd/btr.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -2376,9 +2376,9 @@
UCHAR* ptr;
size_t length;
- if (isNull) {
+
+ if (isNull)
length = 0;
- }
else if (itype >= idx_first_intl_string || itype == idx_metadata)
{
DSC to;
@@ -2394,24 +2394,23 @@
length = INTL_string_to_key(tdbb, itype, desc, &to, key_type);
}
else
- {
length = MOV_get_string(desc, &ptr, &buffer, MAX_KEY);
- }
if (length)
{
// clear key_empty flag, because length is >= 1
key->key_flags &= ~key_empty;
- if (length > sizeof(key->key_data)) {
+
+ if (length > sizeof(key->key_data))
length = sizeof(key->key_data);
- }
+
if (descending && ((*ptr == desc_end_value_prefix) || (*ptr == desc_end_value_check)))
{
*p++ = desc_end_value_prefix;
- if ((length + 1) > sizeof(key->key_data)) {
+ if ((length + 1) > sizeof(key->key_data))
length = sizeof(key->key_data) - 1;
- }
}
+
memcpy(p, ptr, length);
p += length;
}
@@ -2419,19 +2418,18 @@
{
// Leave key_empty flag, because the string is an empty string
if (descending && ((pad == desc_end_value_prefix) || (pad == desc_end_value_check)))
- {
*p++ = desc_end_value_prefix;
- }
+
*p++ = pad;
}
+
while (p > key->key_data)
{
- if (*--p != pad) {
+ if (*--p != pad)
break;
- }
}
- key->key_length = p + 1 - key->key_data;
+ key->key_length = p + 1 - key->key_data;
return;
}
Modified: firebird/trunk/src/jrd/shut.cpp
===================================================================
--- firebird/trunk/src/jrd/shut.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/jrd/shut.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -244,7 +244,8 @@
}
}
- if (!exclusive && !successful && (timeout > 0 || flag & (isc_dpb_shut_attachment | isc_dpb_shut_transaction)))
+ if (!exclusive && !successful &&
+ (timeout > 0 || flag & (isc_dpb_shut_attachment | isc_dpb_shut_transaction)))
{
notify_shutdown(tdbb, 0, -1); // Tell everyone we're giving up
attachment->att_flags &= ~ATT_shutdown_manager;
Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp
===================================================================
--- firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/jrd/trace/TraceConfigStorage.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -306,10 +306,8 @@
void ConfigStorage::release()
{
fb_assert(m_recursive > 0);
+ fb_assert(m_mutexTID == getThreadId());
- const FB_THREAD_ID currTID = getThreadId();
- fb_assert(m_mutexTID == currTID);
-
if (--m_recursive == 0)
{
checkDirty();
Modified: firebird/trunk/src/jrd/trace/TraceConfigStorage.h
===================================================================
--- firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/jrd/trace/TraceConfigStorage.h 2011-10-27 01:04:14 UTC (rev 53598)
@@ -116,9 +116,9 @@
void putItem(ITEM tag, ULONG len, const void* data);
bool getItemLength(ITEM& tag, ULONG& len);
- int m_recursive;
+ int m_recursive;
FB_THREAD_ID m_mutexTID;
- int m_cfg_file;
+ int m_cfg_file;
bool m_dirty;
};
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/jrd/vio.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -4264,7 +4264,8 @@
jrd_rel* relation = NULL;
jrd_tra* transaction = NULL;
- AutoPtr<GarbageCollector> gc(FB_NEW(*attachment->att_pool) GarbageCollector(*attachment->att_pool, dbb));
+ AutoPtr<GarbageCollector> gc(FB_NEW(*attachment->att_pool) GarbageCollector(
+ *attachment->att_pool, dbb));
try
{
Modified: firebird/trunk/src/lock/lock.cpp
===================================================================
--- firebird/trunk/src/lock/lock.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/lock/lock.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -2307,7 +2307,8 @@
}
-bool LockManager::init_owner_block(Arg::StatusVector& statusVector, own* owner, UCHAR owner_type, LOCK_OWNER_T owner_id)
+bool LockManager::init_owner_block(Arg::StatusVector& statusVector, own* owner, UCHAR owner_type,
+ LOCK_OWNER_T owner_id)
{
/**************************************
*
Modified: firebird/trunk/src/remote/client/interface.cpp
===================================================================
--- firebird/trunk/src/remote/client/interface.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/remote/client/interface.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -592,8 +592,7 @@
static bool get_new_dpb(ClumpletWriter&, const ParametersSet&);
static void handle_error(ISC_STATUS);
static void info(IStatus*, Rdb*, P_OP, USHORT, USHORT, USHORT,
- const UCHAR*, USHORT, const UCHAR*, ULONG, UCHAR*,
- AuthClientPlugins* authItr = NULL);
+ const UCHAR*, USHORT, const UCHAR*, ULONG, UCHAR*, AuthClientPlugins* authItr = NULL);
static void init(IStatus*, rem_port*, P_OP, PathName&, ClumpletWriter&);
static Rtr* make_transaction(Rdb*, USHORT);
static void mov_dsql_message(const UCHAR*, const rem_fmt*, UCHAR*, const rem_fmt*);
@@ -620,16 +619,10 @@
static void unsupported();
static void zap_packet(PACKET *);
-static void authFillParametersBlock(AuthClientPlugins& authItr,
- ClumpletWriter& dpb,
- const Auth::AuthTags* tags,
- rem_port* port);
-static void authReceiveResponse(AuthClientPlugins& authItr,
- rem_port* port,
- Rdb* rdb,
- const Auth::AuthTags* tags,
- IStatus* status,
- PACKET* packet);
+static void authFillParametersBlock(AuthClientPlugins& authItr, ClumpletWriter& dpb,
+ const Auth::AuthTags* tags, rem_port* port);
+static void authReceiveResponse(AuthClientPlugins& authItr, rem_port* port, Rdb* rdb,
+ const Auth::AuthTags* tags, IStatus* status, PACKET* packet);
static AtomicCounter remote_event_id;
@@ -5843,10 +5836,8 @@
}
// Let plugins try to add data to DPB in order to avoid extra network roundtrip
-static void authFillParametersBlock(AuthClientPlugins& authItr,
- ClumpletWriter& dpb,
- const Auth::AuthTags* tags,
- rem_port* port)
+static void authFillParametersBlock(AuthClientPlugins& authItr, ClumpletWriter& dpb,
+ const Auth::AuthTags* tags, rem_port* port)
{
LocalStatus s;
Auth::DpbImplementation di(dpb);
@@ -5879,12 +5870,8 @@
}
}
-static void authReceiveResponse(AuthClientPlugins& authItr,
- rem_port* port,
- Rdb* rdb,
- const Auth::AuthTags* tags,
- IStatus* status,
- PACKET* packet)
+static void authReceiveResponse(AuthClientPlugins& authItr, rem_port* port, Rdb* rdb,
+ const Auth::AuthTags* tags, IStatus* status, PACKET* packet)
{
LocalStatus s;
@@ -5985,11 +5972,8 @@
(Arg::Gds(isc_login) << Arg::StatusVector(s.get())).raise();
}
-static void init(IStatus* status,
- rem_port* port,
- P_OP op,
- PathName& file_name,
- ClumpletWriter& dpb)
+static void init(IStatus* status, rem_port* port, P_OP op, PathName& file_name,
+ ClumpletWriter& dpb)
{
/**************************************
*
@@ -6012,8 +5996,8 @@
AuthClientPlugins authItr(PluginType::AuthClient, FB_AUTH_CLIENT_VERSION, upInfo);
authFillParametersBlock(authItr, dpb,
- op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST,
- port);
+ op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST,
+ port);
if (port->port_protocol < PROTOCOL_VERSION12)
{
@@ -6061,8 +6045,8 @@
send_packet(port, packet);
authReceiveResponse(authItr, port, rdb,
- op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST,
- status, packet);
+ op == op_service_attach ? &Auth::SVC_ATTACH_LIST : &Auth::DB_ATTACH_LIST,
+ status, packet);
}
catch (const Exception&)
{
Modified: firebird/trunk/src/yvalve/why.cpp
===================================================================
--- firebird/trunk/src/yvalve/why.cpp 2011-10-27 00:22:23 UTC (rev 53597)
+++ firebird/trunk/src/yvalve/why.cpp 2011-10-27 01:04:14 UTC (rev 53598)
@@ -4754,15 +4754,13 @@
{
ClumpletWriter spb(ClumpletReader::SpbSendItems, MAX_DPB_SIZE, sendItems, sendLength);
if (!regular.next)
- {
populateSpb(spb, isc_info_svc_auth_block);
- }
checkSpbLen = receiveLength;
checkSpbPresent = receiveItems;
YEntry<YService> entry(status, this, SERV_QUERY);
- entry.next()->query(status, spb.getBufferLength(), spb.getBuffer(), receiveLength, receiveItems,
- bufferLength, buffer);
+ entry.next()->query(status, spb.getBufferLength(), spb.getBuffer(),
+ receiveLength, receiveItems, bufferLength, buffer);
checkSpbLen = 0;
checkSpbPresent = NULL;
}
@@ -4780,9 +4778,7 @@
{
ClumpletWriter spb(ClumpletReader::SpbStart, MAX_DPB_SIZE, spbItems, spbLength);
if (!regular.next)
- {
populateSpb(spb, isc_spb_auth_block);
- }
YEntry<YService> entry(status, this, SERV_START);
entry.next()->start(status, spb.getBufferLength(), spb.getBuffer());
@@ -5081,7 +5077,8 @@
svcName.trim();
ClumpletReader spbReader(ClumpletReader::SpbAttach, spb, spbLength);
- if ((spbReader.find(isc_spb_auth_block) && spbReader.getClumpLength() > 0) || ISC_check_if_remote(svcName, false))
+ if ((spbReader.find(isc_spb_auth_block) && spbReader.getClumpLength() > 0) ||
+ ISC_check_if_remote(svcName, false))
{
IProvider* provider = NULL;
service = getServiceManagerByName(&provider, status, svcName.c_str(), spbLength, spb);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|