diff options
author | unknown <tomas@poseidon.mysql.com> | 2007-03-01 08:34:59 +0700 |
---|---|---|
committer | unknown <tomas@poseidon.mysql.com> | 2007-03-01 08:34:59 +0700 |
commit | f9bfa7806ea6af3e849673a8b6a70aacc16b6a02 (patch) | |
tree | 49148597623c1d46dcd2b291b8fdf7632e5ea782 /ndb/tools | |
parent | 5a25c67a59b1e80fba4a0487508c899e6ae88d8f (diff) | |
download | mariadb-git-f9bfa7806ea6af3e849673a8b6a70aacc16b6a02.tar.gz |
ndb - rel5.1.16 NdbRecAttr print of blob length assumed uint64 aligned buffer
ndb - 5.1.16 uint64 align for ndb_restore
(backport)
ndb/src/ndbapi/NdbRecAttr.cpp:
ndb - rel5.1.16 NdbRecAttr print of blob length assumed uint64 aligned buffer
(backport)
ndb/tools/restore/Restore.cpp:
ndb - 5.1.16 uint64 align for ndb_restore
(backport)
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/restore/Restore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ndb/tools/restore/Restore.cpp b/ndb/tools/restore/Restore.cpp index 9aa79f4dc94..8b2e9a799a4 100644 --- a/ndb/tools/restore/Restore.cpp +++ b/ndb/tools/restore/Restore.cpp @@ -54,7 +54,12 @@ BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Ui return true; case 64: for(i = 0; i<arraySize; i++){ - attr_data->u_int64_value[i] = Twiddle64(attr_data->u_int64_value[i]); + // allow unaligned + char* p = (char*)&attr_data->u_int64_value[i]; + Uint64 x; + memcpy(&x, p, sizeof(Uint64)); + x = Twiddle64(x); + memcpy(p, &x, sizeof(Uint64)); } return true; default: |