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

Function INF_put_item

src/jrd/inf.cpp:979–1021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977
978
979UCHAR* INF_put_item(UCHAR item,
980 ULONG length,
981 const void* data,
982 UCHAR* ptr,
983 const UCHAR* end,
984 const bool inserting)
985{
986/**************************************
987 *
988 * I N F _ p u t _ i t e m
989 *
990 **************************************
991 *
992 * Functional description
993 * Put information item in output buffer if there is room, and
994 * return an updated pointer. If there isn't room for the item,
995 * indicate truncation and return NULL.
996 * If we are inserting, we don't need space for isc_info_end, since it was calculated already.
997 *
998 **************************************/
999
1000 if ((ptr + length + (inserting ? 3 : 4) >= end) || (length > MAX_USHORT))
1001 {
1002 if (ptr < end)
1003 {
1004 *ptr++ = isc_info_truncated;
1005 if (ptr < end && !inserting)
1006 *ptr++ = isc_info_end;
1007 }
1008 return NULL;
1009 }
1010
1011 *ptr++ = item;
1012 STUFF_WORD(ptr, length);
1013
1014 if (length)
1015 {
1016 memmove(ptr, data, length);
1017 ptr += length;
1018 }
1019
1020 return ptr;
1021}
1022
1023
1024ULONG INF_request_info(const Request* request,

Callers 6

INF_blob_infoFunction · 0.85
INF_database_infoFunction · 0.85
INF_request_infoFunction · 0.85
INF_transaction_infoFunction · 0.85
query2Method · 0.85
queryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected