MCPcopy Create free account
hub / github.com/MariaDB/server / SetBinValue

Method SetBinValue

storage/connect/value.cpp:834–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832/***********************************************************************/
833template <class TYPE>
834void TYPVAL<TYPE>::SetBinValue(void *p)
835{
836#if defined(UNALIGNED_OK)
837 // x86 can cast non-aligned memory directly
838 Tval = *(TYPE *)p;
839#else
840 // Prevent unaligned memory access on MIPS and ArmHF platforms.
841 // Make use of memcpy instead of straight pointer dereferencing.
842 // Currently only used by WriteColumn of binary files.
843 // From original author: Vicentiu Ciorbaru <vicentiu@mariadb.org>
844 memcpy(&Tval, p, sizeof(TYPE));
845#endif
846 Null = false;
847} // end of SetBinValue
848
849/***********************************************************************/
850/* GetBinValue: fill a buffer with the internal binary value. */

Callers 8

ReadColumnMethod · 0.80
SetSwapValueFunction · 0.80
CntIndexReadFunction · 0.80
CntIndexRangeFunction · 0.80
InitBinFindMethod · 0.80
SaveMethod · 0.80
BlockTestMethod · 0.80
MakeJsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected