 				BtCursor *crsr = c->Cursor; // The BTree cursor
 				uint32 payloadSize; // Number of bytes in the record
 				int64 payloadSize64; // Number of bytes in the record
+				char *rec = nullptr; // Pointer to complete record-data
 				if (crsr)
 				{
 					// The record is stored in a B-Tree

				//
				// If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 when the result is guaranteed to only be used as the argument of a length()
				// or typeof() function, respectively.  The loading of large blobs can be skipped for length() and all content loading can be skipped for typeof().
				
				
				uint32 *aType;        // aType[i] holds the numeric type of the i-th column
				uint32 *aOffset;      // aOffset[i] is offset to start of data for i-th column
				int nField;        // number of fields in the record
				int len;           // The length of the serialized data for the column
				int i;             // Loop counter
				char *zData;       // Part of the record being decoded
				Mem sMem;          // For storing the record being decoded
				u8 *zIdx;          // Index into header
				u8 *zEndHdr;       // Pointer to first byte after the header
				uint32 offset;        // Offset into the data
				uint32 szField;       // Number of bytes in the content of a field
				int szHdr;         // Size of the header size field at start of record
				int avail;         // Number of bytes of available data
				uint32 t;             // A type code from the record header
				Mem *pReg;         // PseudoTable input register


				int p1 = op->P1; // P1 value of the opcode
				int p2 = op->P2; // column number to retrieve
				VdbeCursor *c = nullptr; // The VDBE cursor
				_memset(&sMem, 0, sizeof(sMem));
				_assert(p1 < Cursors.length);
				_assert(op->P3 > 0 && op->P3 <= Mems.length);
				Mem *dest = &mems[op->P3]; // Where to write the extracted value
				MemAboutToChange(this, dest);
				char *rec = nullptr; // Pointer to complete record-data

				// This block sets the variable payloadSize to be the total number of bytes in the record.
				//

				default:    res = res>=0; break;
				}

				if (op->P5 & AFF_BIT_STOREP2)
				{
					out_ = &mems[op->P2];
					MemAboutToChange(this, out_);
					MemSetTypeFlag(out_, MEM_Int);
					out_->u.I = res;
					REGISTER_TRACE(op->P2, out_);
				}
				else if (res)
					pc = op->P2-1;

				// Undo any changes made by applyAffinity() to the input registers.
				in1->Flags = (MEM)(in1->Flags&~MEM_TypeMask) | (flags1&MEM_TypeMask);
				in3->Flags = (MEM)(in3->Flags&~MEM_TypeMask) | (flags3&MEM_TypeMask);
				break; }
			case OP_Permutation: {
				// Opcode: Permutation * * * P4 *
