diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-21 17:57:44 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-21 17:57:44 +0100 |
commit | a3f7796dd93baebe835a98992c775a099da0b0b2 (patch) | |
tree | 7dd5625f5ffe0454b14b26978c7b28c755879eb2 /ndb | |
parent | f813e0dac0d9f31140b699f3903940b50c9481fc (diff) | |
download | mariadb-git-a3f7796dd93baebe835a98992c775a099da0b0b2.tar.gz |
Bug#8070
corrected possible unalignment in NdbRecAttr access methods
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/ndbapi/NdbRecAttr.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp index da03df13027..29eab64a84f 100644 --- a/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/ndb/include/ndbapi/NdbRecAttr.hpp @@ -304,7 +304,9 @@ inline Int64 NdbRecAttr::int64_value() const { - return *(Int64*)theRef; + Int64 val; + memcpy(&val,theRef,8); + return val; } inline @@ -332,7 +334,9 @@ inline Uint64 NdbRecAttr::u_64_value() const { - return *(Uint64*)theRef; + Uint64 val; + memcpy(&val,theRef,8); + return val; } inline @@ -360,14 +364,18 @@ inline float NdbRecAttr::float_value() const { - return *(float*)theRef; + float val; + memcpy(&val,theRef,sizeof(val)); + return val; } inline double NdbRecAttr::double_value() const { - return *(double*)theRef; + double val; + memcpy(&val,theRef,sizeof(val)); + return val; } inline |