mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
Misc
This commit is contained in:
parent
c0adcd8258
commit
312a391d78
@ -242,7 +242,7 @@ EXPORTS
|
||||
isc_sqlcode @165
|
||||
isc_sql_interprete @164
|
||||
isc_sqlcode_s @278
|
||||
fb_sqlstate
|
||||
fb_sqlstate @279
|
||||
|
||||
; Event functions
|
||||
|
||||
|
@ -63,10 +63,10 @@ ISC_STATUS StatusHolder::save(const ISC_STATUS* status)
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
{
|
||||
const char *temp = reinterpret_cast<const char*>(*from++);
|
||||
const char* temp = reinterpret_cast<const char*>(*from++);
|
||||
|
||||
const size_t len = strlen(temp);
|
||||
char *string = FB_NEW(*getDefaultMemoryPool()) char[len + 1];
|
||||
char* string = FB_NEW(*getDefaultMemoryPool()) char[len + 1];
|
||||
memcpy(string, temp, len + 1);
|
||||
|
||||
*to++ = (ISC_STATUS)(IPTR) string;
|
||||
|
@ -811,7 +811,7 @@ void UTLD_save_status_strings(ISC_STATUS* vector)
|
||||
case isc_arg_string:
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
p = (TEXT *) * vector;
|
||||
p = (TEXT*) *vector;
|
||||
|
||||
if (status != isc_arg_cstring)
|
||||
l = strlen(p) + 1;
|
||||
|
@ -2280,6 +2280,7 @@ void API_ROUTINE fb_sqlstate(char* sqlstate, const ISC_STATUS* status_vector)
|
||||
// step #2, see if we can find a mapping.
|
||||
gdscode = 0;
|
||||
s = status_vector;
|
||||
|
||||
while ((*s != isc_arg_end) && (!have_sqlstate))
|
||||
{
|
||||
if (*s == isc_arg_gds)
|
||||
@ -2328,6 +2329,7 @@ void API_ROUTINE fb_sqlstate(char* sqlstate, const ISC_STATUS* status_vector)
|
||||
}
|
||||
} // while
|
||||
}
|
||||
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
@ -617,7 +617,6 @@ void ISC_EXPORT isc_sqlcode_s(const ISC_STATUS*,
|
||||
void ISC_EXPORT fb_sqlstate(char*,
|
||||
const ISC_STATUS*);
|
||||
|
||||
|
||||
void ISC_EXPORT isc_sql_interprete(short,
|
||||
ISC_SCHAR*,
|
||||
short);
|
||||
|
@ -809,12 +809,12 @@ static void error(CompilerScratch* csb, ...)
|
||||
case isc_arg_string:
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_cstring:
|
||||
*p++ = (ISC_STATUS) va_arg(args, int);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_number:
|
||||
@ -3395,12 +3395,12 @@ static void warning(CompilerScratch* csb, ...)
|
||||
case isc_arg_string:
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_cstring:
|
||||
*p++ = (ISC_STATUS) va_arg(args, int);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_number:
|
||||
|
@ -296,11 +296,13 @@ void API_ROUTINE perf_get_info(FB_API_HANDLE* handle, PERF* perf)
|
||||
perf->perf_max_memory = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
const SLONG temp = isc_vax_integer(p, 2);
|
||||
fb_assert(temp <= MAX_SSHORT);
|
||||
p += temp + 2;
|
||||
}
|
||||
|
||||
perf->perf_marks = 0;
|
||||
break;
|
||||
|
||||
|
@ -1366,8 +1366,6 @@ static bool get_merge_join(
|
||||
for (ptr = rsb->rsb_arg, tail = impure->irsb_mrg_rpt; ptr < end;
|
||||
ptr += 2, tail++)
|
||||
{
|
||||
ULONG key[32];
|
||||
|
||||
RecordSource* sort_rsb = *ptr;
|
||||
SortMap* map = (SortMap*) sort_rsb->rsb_arg[0];
|
||||
merge_file* mfb = &tail->irsb_mrg_file;
|
||||
@ -2231,6 +2229,7 @@ static bool get_record(thread_db* tdbb,
|
||||
case rsb_skip:
|
||||
{
|
||||
irsb_skip_n* skip = (irsb_skip_n*) impure;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
|
@ -600,7 +600,7 @@ static ISC_STATUS error(ISC_STATUS * status_vector, ...)
|
||||
case isc_arg_string:
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
/****
|
||||
|
@ -78,13 +78,13 @@ void STUFF_STATUS_function(ISC_STATUS* status_vector, ISC_STATUS status, va_list
|
||||
|
||||
case isc_arg_interpreted:
|
||||
case isc_arg_sql_state:
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_cstring:
|
||||
len = (int) va_arg(args, int);
|
||||
*p++ = (ISC_STATUS) (len >= MAX_ERRSTR_LEN) ? MAX_ERRSTR_LEN : len;
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT *);
|
||||
*p++ = (ISC_STATUS) va_arg(args, TEXT*);
|
||||
break;
|
||||
|
||||
case isc_arg_number:
|
||||
|
Loading…
Reference in New Issue
Block a user