MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / INF_transaction_info

Function INF_transaction_info

src/jrd/inf.cpp:1181–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1179
1180
1181void INF_transaction_info(const jrd_tra* transaction,
1182 const ULONG item_length,
1183 const UCHAR* items,
1184 const ULONG output_length,
1185 UCHAR* info)
1186{
1187/**************************************
1188 *
1189 * I N F _ t r a n s a c t i o n _ i n f o
1190 *
1191 **************************************
1192 *
1193 * Functional description
1194 * Process requests for transaction info.
1195 *
1196 **************************************/
1197 CHECK_INPUT("INF_transaction_info");
1198
1199 UCHAR buffer[MAXPATHLEN];
1200 ULONG length;
1201
1202 const UCHAR* const end_items = items + item_length;
1203 const UCHAR* const end = info + output_length;
1204 UCHAR* start_info;
1205
1206 if (items[0] == isc_info_length)
1207 {
1208 start_info = info;
1209 items++;
1210 }
1211 else
1212 start_info = 0;
1213
1214 while (items < end_items && *items != isc_info_end && info < end)
1215 {
1216 UCHAR item = *items++;
1217
1218 switch (item)
1219 {
1220 case isc_info_end:
1221 break;
1222
1223 case isc_info_tra_id:
1224 length = INF_convert(transaction->tra_number, buffer);
1225 break;
1226
1227 case isc_info_tra_oldest_interesting:
1228 length = INF_convert(transaction->tra_oldest, buffer);
1229 break;
1230
1231 case isc_info_tra_oldest_snapshot:
1232 length = INF_convert(transaction->tra_oldest_active, buffer);
1233 break;
1234
1235 case isc_info_tra_oldest_active:
1236 length = INF_convert(
1237 transaction->tra_lock ? transaction->tra_lock->lck_data : 0,
1238 buffer);

Callers 1

getInfoMethod · 0.85

Calls 4

INF_convertFunction · 0.85
INF_put_itemFunction · 0.85
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected