mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Backported CORE-6141: fbsvcmgr action_repair rpr_list_limbo_trans does not show list of transactions in LIMBO state
This commit is contained in:
parent
5bbc7d2ad3
commit
5cc9880778
@ -2466,6 +2466,12 @@ C --
|
||||
PARAMETER (GDS__fbsvcmgr_fp_empty = 336986162)
|
||||
INTEGER*4 GDS__fbsvcmgr_bad_arg
|
||||
PARAMETER (GDS__fbsvcmgr_bad_arg = 336986164)
|
||||
INTEGER*4 GDS__fbsvcmgr_info_limbo
|
||||
PARAMETER (GDS__fbsvcmgr_info_limbo = 336986170)
|
||||
INTEGER*4 GDS__fbsvcmgr_limbo_state
|
||||
PARAMETER (GDS__fbsvcmgr_limbo_state = 336986171)
|
||||
INTEGER*4 GDS__fbsvcmgr_limbo_advise
|
||||
PARAMETER (GDS__fbsvcmgr_limbo_advise = 336986172)
|
||||
INTEGER*4 GDS__utl_trusted_switch
|
||||
PARAMETER (GDS__utl_trusted_switch = 337051649)
|
||||
INTEGER*4 GDS__nbackup_missing_param
|
||||
|
@ -2461,6 +2461,12 @@ const
|
||||
gds_fbsvcmgr_fp_empty = 336986162;
|
||||
isc_fbsvcmgr_bad_arg = 336986164;
|
||||
gds_fbsvcmgr_bad_arg = 336986164;
|
||||
isc_fbsvcmgr_info_limbo = 336986170;
|
||||
gds_fbsvcmgr_info_limbo = 336986170;
|
||||
isc_fbsvcmgr_limbo_state = 336986171;
|
||||
gds_fbsvcmgr_limbo_state = 336986171;
|
||||
isc_fbsvcmgr_limbo_advise = 336986172;
|
||||
gds_fbsvcmgr_limbo_advise = 336986172;
|
||||
isc_utl_trusted_switch = 337051649;
|
||||
gds_utl_trusted_switch = 337051649;
|
||||
isc_nbackup_missing_param = 337117213;
|
||||
|
@ -4743,6 +4743,9 @@ const
|
||||
isc_fbsvcmgr_fp_read = 336986161;
|
||||
isc_fbsvcmgr_fp_empty = 336986162;
|
||||
isc_fbsvcmgr_bad_arg = 336986164;
|
||||
isc_fbsvcmgr_info_limbo = 336986170;
|
||||
isc_fbsvcmgr_limbo_state = 336986171;
|
||||
isc_fbsvcmgr_limbo_advise = 336986172;
|
||||
isc_utl_trusted_switch = 337051649;
|
||||
isc_nbackup_missing_param = 337117213;
|
||||
isc_nbackup_allowed_switches = 337117214;
|
||||
|
@ -1229,6 +1229,9 @@ static const struct {
|
||||
{"fbsvcmgr_fp_read", 336986161},
|
||||
{"fbsvcmgr_fp_empty", 336986162},
|
||||
{"fbsvcmgr_bad_arg", 336986164},
|
||||
{"fbsvcmgr_info_limbo", 336986170},
|
||||
{"fbsvcmgr_limbo_state", 336986171},
|
||||
{"fbsvcmgr_limbo_advise", 336986172},
|
||||
{"utl_trusted_switch", 337051649},
|
||||
{"nbackup_missing_param", 337117213},
|
||||
{"nbackup_allowed_switches", 337117214},
|
||||
|
@ -1263,6 +1263,9 @@ const ISC_STATUS isc_fbsvcmgr_fp_open = 336986160L;
|
||||
const ISC_STATUS isc_fbsvcmgr_fp_read = 336986161L;
|
||||
const ISC_STATUS isc_fbsvcmgr_fp_empty = 336986162L;
|
||||
const ISC_STATUS isc_fbsvcmgr_bad_arg = 336986164L;
|
||||
const ISC_STATUS isc_fbsvcmgr_info_limbo = 336986170L;
|
||||
const ISC_STATUS isc_fbsvcmgr_limbo_state = 336986171L;
|
||||
const ISC_STATUS isc_fbsvcmgr_limbo_advise = 336986172L;
|
||||
const ISC_STATUS isc_utl_trusted_switch = 337051649L;
|
||||
const ISC_STATUS isc_nbackup_missing_param = 337117213L;
|
||||
const ISC_STATUS isc_nbackup_allowed_switches = 337117214L;
|
||||
@ -1315,7 +1318,7 @@ const ISC_STATUS isc_trace_switch_user_only = 337182757L;
|
||||
const ISC_STATUS isc_trace_switch_param_miss = 337182758L;
|
||||
const ISC_STATUS isc_trace_param_act_notcompat = 337182759L;
|
||||
const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L;
|
||||
const ISC_STATUS isc_err_max = 1259;
|
||||
const ISC_STATUS isc_err_max = 1262;
|
||||
|
||||
#else /* c definitions */
|
||||
|
||||
@ -2548,6 +2551,9 @@ const ISC_STATUS isc_err_max = 1259;
|
||||
#define isc_fbsvcmgr_fp_read 336986161L
|
||||
#define isc_fbsvcmgr_fp_empty 336986162L
|
||||
#define isc_fbsvcmgr_bad_arg 336986164L
|
||||
#define isc_fbsvcmgr_info_limbo 336986170L
|
||||
#define isc_fbsvcmgr_limbo_state 336986171L
|
||||
#define isc_fbsvcmgr_limbo_advise 336986172L
|
||||
#define isc_utl_trusted_switch 337051649L
|
||||
#define isc_nbackup_missing_param 337117213L
|
||||
#define isc_nbackup_allowed_switches 337117214L
|
||||
@ -2600,7 +2606,7 @@ const ISC_STATUS isc_err_max = 1259;
|
||||
#define isc_trace_switch_param_miss 337182758L
|
||||
#define isc_trace_param_act_notcompat 337182759L
|
||||
#define isc_trace_mandatory_switch_miss 337182760L
|
||||
#define isc_err_max 1259
|
||||
#define isc_err_max 1262
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1232,6 +1232,9 @@ Data source : @4"}, /* eds_statement */
|
||||
{336986161, "could not read file @1"}, /* fbsvcmgr_fp_read */
|
||||
{336986162, "empty file @1"}, /* fbsvcmgr_fp_empty */
|
||||
{336986164, "Invalid or missing parameter for switch @1"}, /* fbsvcmgr_bad_arg */
|
||||
{336986170, "Unknown tag (@1) in isc_info_svc_limbo_trans block after isc_svc_query()"}, /* fbsvcmgr_info_limbo */
|
||||
{336986171, "Unknown tag (@1) in isc_spb_tra_state block after isc_svc_query()"}, /* fbsvcmgr_limbo_state */
|
||||
{336986172, "Unknown tag (@1) in isc_spb_tra_advise block after isc_svc_query()"}, /* fbsvcmgr_limbo_advise */
|
||||
{337051649, "Switches trusted_user and trusted_role are not supported from command line"}, /* utl_trusted_switch */
|
||||
{337117213, "Missing parameter for switch @1"}, /* nbackup_missing_param */
|
||||
{337117214, "Only one of -LOCK, -UNLOCK, -FIXUP, -BACKUP or -RESTORE should be specified"}, /* nbackup_allowed_switches */
|
||||
|
@ -1228,6 +1228,9 @@ static const struct {
|
||||
{336986161, -901}, /* 49 fbsvcmgr_fp_read */
|
||||
{336986162, -901}, /* 50 fbsvcmgr_fp_empty */
|
||||
{336986164, -901}, /* 52 fbsvcmgr_bad_arg */
|
||||
{336986170, -901}, /* 58 fbsvcmgr_info_limbo */
|
||||
{336986171, -901}, /* 59 fbsvcmgr_limbo_state */
|
||||
{336986172, -901}, /* 60 fbsvcmgr_limbo_advise */
|
||||
{337051649, -901}, /* 1 utl_trusted_switch */
|
||||
{337117213, -901}, /* 29 nbackup_missing_param */
|
||||
{337117214, -901}, /* 30 nbackup_allowed_switches */
|
||||
|
@ -1228,6 +1228,9 @@ static const struct {
|
||||
{336986161, "00000"}, // 49 fbsvcmgr_fp_read
|
||||
{336986162, "00000"}, // 50 fbsvcmgr_fp_empty
|
||||
{336986164, "00000"}, // 52 fbsvcmgr_bad_arg
|
||||
{336986170, "00000"}, // 58 fbsvcmgr_info_limbo
|
||||
{336986171, "00000"}, // 59 fbsvcmgr_limbo_state
|
||||
{336986172, "00000"}, // 60 fbsvcmgr_limbo_advise
|
||||
{337051649, "00000"}, // 1 utl_trusted_switch
|
||||
{337117213, "00000"}, // 29 nbackup_missing_param
|
||||
{337117214, "00000"}, // 30 nbackup_allowed_switches
|
||||
|
@ -16,7 +16,7 @@ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUM
|
||||
('2016-01-18 19:20:48', 'ISQL', 17, 195)
|
||||
('2010-07-10 10:50:30', 'GSEC', 18, 105)
|
||||
('2019-10-19 12:52:29', 'GSTAT', 21, 63)
|
||||
('2013-12-19 17:31:31', 'FBSVCMGR', 22, 58)
|
||||
('2019-12-10 17:55:05', 'FBSVCMGR', 22, 61)
|
||||
('2009-07-18 12:12:12', 'UTL', 23, 2)
|
||||
('2015-01-07 18:01:51', 'NBACKUP', 24, 77)
|
||||
('2009-07-20 07:55:48', 'FBTRACEMGR', 25, 41)
|
||||
|
@ -3276,16 +3276,16 @@ Analyzing database pages ...', NULL, NULL);
|
||||
(NULL, 'usage', 'fbsvcmgr.cpp', NULL, 22, 31, NULL, ' (will list header info in database employee on local machine)', NULL, NULL);
|
||||
(NULL, 'usage', 'fbsvcmgr.cpp', NULL, 22, 32, NULL, 'fbsvcmgr yourserver:service_mgr user sysdba password masterkey info_server_version info_svr_db_info', NULL, NULL);
|
||||
(NULL, 'usage', 'fbsvcmgr.cpp', NULL, 22, 33, NULL, ' (will show firebird version and databases usage on yourserver)', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 34, NULL, 'Transaction @1 is in limbo', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 35, NULL, 'Multidatabase transaction @1 is in limbo', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 36, NULL, 'Host Site: @1', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 37, NULL, 'Transaction @1', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 34, NULL, 'Transaction in limbo', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 35, NULL, 'Multidatabase transaction in limbo', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 36, NULL, 'Host Site', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 37, NULL, 'Transaction', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 38, NULL, 'has been prepared', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 39, NULL, 'has been committed', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 40, NULL, 'has been rolled back', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 41, NULL, 'is not available', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 42, NULL, 'Remote Site: @1', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 43, NULL, 'Database Path: @1', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 42, NULL, 'Remote Site', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 43, NULL, 'Database Path', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 44, NULL, 'Automated recovery would commit this transaction', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 45, NULL, 'Automated recovery would rollback this transaction', NULL, NULL);
|
||||
(NULL, 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 46, NULL, 'No idea should it be commited or rolled back', NULL, NULL);
|
||||
@ -3300,6 +3300,9 @@ Analyzing database pages ...', NULL, NULL);
|
||||
(NULL, 'usage', 'fbsvcmgr.cpp', NULL, 22, 55, NULL, 'Information requests:', NULL, NULL);
|
||||
(NULL, 'usage', 'fbsvcmgr.cpp', NULL, 22, 56, NULL, 'Actions:', NULL, NULL);
|
||||
(NULL, 'printCapabilities', 'fbsvcmgr.cpp', NULL, 22, 57, NULL, 'Server capabilities:', NULL, NULL);
|
||||
('fbsvcmgr_info_limbo', 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 58, NULL, 'Unknown tag (@1) in isc_info_svc_limbo_trans block after isc_svc_query()', NULL, NULL);
|
||||
('fbsvcmgr_limbo_state', 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 59, NULL, 'Unknown tag (@1) in isc_spb_tra_state block after isc_svc_query()', NULL, NULL);
|
||||
('fbsvcmgr_limbo_advise', 'printInfo', 'fbsvcmgr.cpp', NULL, 22, 60, NULL, 'Unknown tag (@1) in isc_spb_tra_advise block after isc_svc_query()', NULL, NULL);
|
||||
-- UTL (messages common for many utilities)
|
||||
-- All messages use the new format.
|
||||
('utl_trusted_switch', 'checkService', 'UtilSvc.cpp', NULL, 23, 1, NULL, 'Switches trusted_user and trusted_role are not supported from command line', NULL, NULL);
|
||||
|
@ -1225,6 +1225,9 @@ COMMIT WORK;
|
||||
(-901, '00', '000', 22, 49, 'fbsvcmgr_fp_read', NULL, NULL)
|
||||
(-901, '00', '000', 22, 50, 'fbsvcmgr_fp_empty', NULL, NULL)
|
||||
(-901, '00', '000', 22, 52, 'fbsvcmgr_bad_arg', NULL, NULL)
|
||||
(-901, '00', '000', 22, 58, 'fbsvcmgr_info_limbo', NULL, NULL)
|
||||
(-901, '00', '000', 22, 59, 'fbsvcmgr_limbo_state', NULL, NULL)
|
||||
(-901, '00', '000', 22, 60, 'fbsvcmgr_limbo_advise', NULL, NULL)
|
||||
-- UTILITIES
|
||||
(-901, '00', '000', 23, 1, 'utl_trusted_switch', NULL, NULL)
|
||||
-- NBACKUP
|
||||
|
@ -563,10 +563,16 @@ const SvcSwitches actionSwitch[] =
|
||||
|
||||
// print information, returned by isc_svc_query() call
|
||||
|
||||
USHORT getShort(const char*& p)
|
||||
{
|
||||
const USHORT num = (USHORT) isc_vax_integer(p, sizeof(USHORT));
|
||||
p += sizeof(USHORT);
|
||||
return num;
|
||||
}
|
||||
|
||||
bool getLine(string& dest, const char*& p)
|
||||
{
|
||||
const USHORT length = (USHORT) isc_vax_integer(p, sizeof(USHORT));
|
||||
p += sizeof(USHORT);
|
||||
const USHORT length = getShort(p);
|
||||
dest.assign(p, length);
|
||||
p += length;
|
||||
return length > 0;
|
||||
@ -740,6 +746,8 @@ bool printInfo(const char* p, size_t pSize, UserPrint& up, ULONG& stdinRq)
|
||||
bool ignoreTruncation = false;
|
||||
stdinRq = 0;
|
||||
const char* const end = p + pSize;
|
||||
USHORT l;
|
||||
const char* limboEnd;
|
||||
|
||||
while (p < end && *p != isc_info_end)
|
||||
{
|
||||
@ -791,7 +799,12 @@ bool printInfo(const char* p, size_t pSize, UserPrint& up, ULONG& stdinRq)
|
||||
break;
|
||||
|
||||
case isc_info_svc_limbo_trans:
|
||||
while (*p != isc_info_flag_end)
|
||||
l = getShort(p);
|
||||
limboEnd = &p[l];
|
||||
if (limboEnd > end)
|
||||
limboEnd = end;
|
||||
|
||||
while (*p != isc_info_flag_end && p < limboEnd)
|
||||
{
|
||||
switch (*p++)
|
||||
{
|
||||
@ -814,7 +827,7 @@ bool printInfo(const char* p, size_t pSize, UserPrint& up, ULONG& stdinRq)
|
||||
printMessage(41);
|
||||
break;
|
||||
default:
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_info_err) <<
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_limbo_state) <<
|
||||
Arg::Num(static_cast<unsigned char>(p[-1])));
|
||||
}
|
||||
break;
|
||||
@ -837,7 +850,7 @@ bool printInfo(const char* p, size_t pSize, UserPrint& up, ULONG& stdinRq)
|
||||
printMessage(46);
|
||||
break;
|
||||
default:
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_info_err) <<
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_info_limbo) <<
|
||||
Arg::Num(static_cast<unsigned char>(p[-1])));
|
||||
}
|
||||
break;
|
||||
@ -860,10 +873,11 @@ bool printInfo(const char* p, size_t pSize, UserPrint& up, ULONG& stdinRq)
|
||||
printInt64(p, 37);
|
||||
break;
|
||||
default:
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_info_err) <<
|
||||
status_exception::raise(Arg::Gds(isc_fbsvcmgr_info_limbo) <<
|
||||
Arg::Num(static_cast<unsigned char>(p[-1])));
|
||||
}
|
||||
}
|
||||
if (*p == isc_info_flag_end)
|
||||
p++;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user