mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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)
This commit is contained in:
parent
5a25c67a59
commit
f9bfa7806e
2 changed files with 25 additions and 20 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue