mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
ndb - 5.1.16 uint64 align for ndb_restore
storage/ndb/tools/restore/Restore.cpp: uint64 align patch
This commit is contained in:
parent
125d74e1fd
commit
5c65904072
1 changed files with 6 additions and 1 deletions
|
@ -59,7 +59,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…
Reference in a new issue