8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:43:04 +01:00
This commit is contained in:
asfernandes 2009-06-25 02:29:13 +00:00
parent e6a117ea91
commit 097b0ca2c2
8 changed files with 21 additions and 20 deletions

View File

@ -918,7 +918,7 @@ btree_page* BTR_find_page(thread_db* tdbb,
{
#ifdef SCROLLABLE_CURSORS
const temporary_key* tkey =
backwards ? upper : ignoreNulls ? &firstNotNullKey : lower;
backwards ? upper : (ignoreNulls ? &firstNotNullKey : lower);
#else
const temporary_key* tkey = ignoreNulls ? &firstNotNullKey : lower;
#endif
@ -963,7 +963,7 @@ btree_page* BTR_find_page(thread_db* tdbb,
#ifdef SCROLLABLE_CURSORS
if (backwards)
{
while (page->btr_sibling)
while (page->btr_sibling)
{
page = (btree_page*) CCH_HANDOFF(tdbb, window, page->btr_sibling,
LCK_read, pag_index);

View File

@ -1623,6 +1623,7 @@ bool DPM_next(thread_db* tdbb,
slot = ppage->ppg_count - 1;
}
#endif
for (; slot >= 0 && slot < ppage->ppg_count;)
{
const SLONG page_number = ppage->ppg_page[slot];
@ -1660,11 +1661,13 @@ bool DPM_next(thread_db* tdbb,
#endif
const data_page* dpage = (data_page*) CCH_HANDOFF(tdbb, window,
page_number, lock_type, pag_data);
#ifdef SCROLLABLE_CURSORS
if (backwards && line >= dpage->dpg_count) {
line = dpage->dpg_count - 1;
}
#endif
for (; line >= 0 && line < dpage->dpg_count;
#ifdef SCROLLABLE_CURSORS
backwards ? line-- : line++

View File

@ -70,7 +70,7 @@ using namespace Jrd;
/*
* The variable DBSERVER_BASE_LEVEL was originally IB_MAJOR_VER but with
* the change to Firebird this number could no longer be used.
* The DBSERVER_BASE_LEVEL for firebird starts at 6 which is the base level
* The DBSERVER_BASE_LEVEL for Firebird starts at 6 which is the base level
* of InterBase(r) from which Firebird was derived.
* It is expected that this value will increase as changes are added to
* Firebird
@ -87,10 +87,10 @@ typedef Firebird::HalfStaticArray<UCHAR, BUFFER_SMALL> CountsBuffer;
static USHORT get_counts(USHORT, CountsBuffer&);
#define CHECK_INPUT(fcn) \
if (!items || item_length <= 0 || !info || output_length <= 0) \
{ \
ERR_post(Firebird::Arg::Gds(isc_internal_rejected_params) << Firebird::Arg::Str(fcn)); \
} \
do { \
if (!items || item_length <= 0 || !info || output_length <= 0) \
ERR_post(Firebird::Arg::Gds(isc_internal_rejected_params) << Firebird::Arg::Str(fcn)); \
} while (false)

View File

@ -1021,7 +1021,7 @@ jrd_tra* TRA_reconnect(thread_db* tdbb, const UCHAR* id, USHORT length)
const SLONG number = gds__vax_integer(id, length);
if (number > dbb->dbb_next_transaction)
PAG_header(tdbb, true);
const UCHAR state = (number > dbb->dbb_next_transaction) ?
255 : limbo_transaction(tdbb, number);

View File

@ -137,7 +137,7 @@ static const in_sw_tab_t* findSwitch(const in_sw_tab_t* table, string sw)
for (const in_sw_tab_t* in_sw_tab = table; in_sw_tab->in_sw_name; in_sw_tab++)
{
if ((sw.length() >= in_sw_tab->in_sw_min_length) &&
if ((sw.length() >= in_sw_tab->in_sw_min_length) &&
switchMatch(sw, in_sw_tab->in_sw_name))
{
return in_sw_tab;

View File

@ -83,9 +83,9 @@ void TraceSvcUtil::setAttachInfo(const string& service_name, const string& user,
const string& pwd, bool isAdmin)
{
ISC_STATUS_ARRAY status = {0};
ClumpletWriter spb(ClumpletWriter::SpbAttach, MAXBUF, isc_spb_current_version);
if (user.isEmpty() && !isAdmin)
{
string isc_user;
@ -164,14 +164,14 @@ void TraceSvcUtil::startSession(TraceSession& session, bool /*interactive*/)
}
ClumpletWriter spb(ClumpletWriter::SpbStart, MAXBUF);
spb.insertTag(isc_action_svc_trace_start);
spb.insertBytes(isc_spb_trc_cfg, p, len);
if (session.ses_name.hasData())
{
spb.insertBytes(isc_spb_trc_name,
reinterpret_cast<const UCHAR*> (session.ses_name.c_str()),
spb.insertBytes(isc_spb_trc_name,
reinterpret_cast<const UCHAR*> (session.ses_name.c_str()),
session.ses_name.length());
}
@ -236,7 +236,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
status_exception::raise(status);
}
char *p = results;
char* p = results;
bool ignoreTruncation = false;
while (*p != isc_info_end)
@ -249,7 +249,7 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
case isc_info_svc_line:
{
unsigned short l = isc_vax_integer (p, sizeof(l));
unsigned short l = isc_vax_integer(p, sizeof(l));
p += sizeof(l);
if (l)
{
@ -281,7 +281,6 @@ void TraceSvcUtil::runService(size_t spbSize, const UCHAR* spb)
Arg::Num(static_cast<unsigned char>(p[-1])));
}
}
} while (!m_stop);
}
@ -315,7 +314,7 @@ int CLIB_ROUTINE main(int argc, char* argv[])
**************************************
*
* Functional description
* Invoke real nbackup main function
* Invoke real trace main function
*
**************************************/

View File

@ -141,7 +141,6 @@ int gsec(Firebird::UtilSvc* uSvc)
tdsec->tsec_interactive = !uSvc->isService();
internal_user_data* user_data = tdsec->tsec_user_data;
SSHORT ret = parse_cmd_line(argv, tdsec);
Firebird::PathName databaseName;
bool databaseNameEntered = user_data->database_name_entered;

View File

@ -117,7 +117,7 @@ SSHORT SECURITY_exec_line(ISC_STATUS* isc_status,
SSHORT ret = 0;
// check for non-printable characters in user name
for (const TEXT *p = io_user_data->user_name; *p; p++)
for (const TEXT* p = io_user_data->user_name; *p; p++)
{
if (! isprint(*p)) {
return GsecMsg75; // Add special error message for this case ?