Bugfix.
This commit is contained in:
parent
ec99c0e258
commit
903ba4b97b
1 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
#include <lladd/operations/linearHash.h>
|
#include <lladd/operations/linearHash.h>
|
||||||
#include <lladd/hash.h>
|
#include <lladd/hash.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -71,6 +72,8 @@ static int operateUndoDelete(int xid, Page * p, lsn_t lsn, recordid rid, const v
|
||||||
assert(keySize == sizeof(int));
|
assert(keySize == sizeof(int));
|
||||||
assert(valSize == sizeof(recordid));
|
assert(valSize == sizeof(recordid));
|
||||||
|
|
||||||
|
rid.size = sizeof(hashEntry) + keySize + valSize;
|
||||||
|
|
||||||
ThashInstantInsert(xid, rid, argBytes, keySize,
|
ThashInstantInsert(xid, rid, argBytes, keySize,
|
||||||
argBytes + keySize, valSize);
|
argBytes + keySize, valSize);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -147,7 +150,7 @@ int TlogicalHashDelete(int xid, recordid hashRid, void * key, int keySize, void
|
||||||
|
|
||||||
Tupdate(xid, hashRid, arg, OPERATION_LINEAR_DELETE);
|
Tupdate(xid, hashRid, arg, OPERATION_LINEAR_DELETE);
|
||||||
free(arg);
|
free(arg);
|
||||||
hashRid.size = sizeof(recordid);
|
/* hashRid.size = sizeof(recordid); */
|
||||||
ThashInstantDelete(xid, hashRid, key, keySize, valSize);
|
ThashInstantDelete(xid, hashRid, key, keySize, valSize);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -561,6 +564,8 @@ void instant_rehash(int xid, recordid hashRid, int next_split, int i, int keySiz
|
||||||
|
|
||||||
void instant_insertIntoBucket(int xid, recordid hashRid, int bucket_number, hashEntry * bucket_contents,
|
void instant_insertIntoBucket(int xid, recordid hashRid, int bucket_number, hashEntry * bucket_contents,
|
||||||
hashEntry * e, int keySize, int valSize, int skipDelete) {
|
hashEntry * e, int keySize, int valSize, int skipDelete) {
|
||||||
|
|
||||||
|
assert(hashRid.size == sizeof(hashEntry) + valSize + keySize);
|
||||||
recordid deleteMe;
|
recordid deleteMe;
|
||||||
if(!skipDelete) {
|
if(!skipDelete) {
|
||||||
if(instant_deleteFromBucket(xid, hashRid, bucket_number, bucket_contents, e+1, keySize, valSize, &deleteMe)) {
|
if(instant_deleteFromBucket(xid, hashRid, bucket_number, bucket_contents, e+1, keySize, valSize, &deleteMe)) {
|
||||||
|
@ -577,7 +582,7 @@ void instant_insertIntoBucket(int xid, recordid hashRid, int bucket_number, hash
|
||||||
/*@todo consider recovery for insertIntoBucket. */
|
/*@todo consider recovery for insertIntoBucket. */
|
||||||
|
|
||||||
hashRid.slot = bucket_number;
|
hashRid.slot = bucket_number;
|
||||||
assert(hashRid.size == sizeof(hashEntry) + valSize + keySize);
|
|
||||||
TreadUnlocked(xid, hashRid, bucket_contents);
|
TreadUnlocked(xid, hashRid, bucket_contents);
|
||||||
|
|
||||||
assert(hashRid.size == sizeof(hashEntry) + keySize + valSize);
|
assert(hashRid.size == sizeof(hashEntry) + keySize + valSize);
|
||||||
|
|
Loading…
Reference in a new issue